Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-57302

Zero-Width Non-Joiner (ZWNJ, U+200C) not inserted in text fields

    XMLWordPrintable

    Details

      Description

      For certain languages, the ZWNJ is an important character in text shaping. For example, the following text in Farsi has an ZWNJ:

      نیم‌فاصله

      For those locales, the U+200C character is often found bound to a key in the keyboard. However, when pressing it, nothing is inserted in text fields in Qt applications.

      To test:

      1. Assign it to the Shift+Space combination. Run:‌xmodmap -e 'keycode 65 = space U200C
      2. Open a Qt application and select a text field
      3. Press Shift+Space

      Nothing is inserted. Since this is a zero-width character, this can usually be seen by noticing if the text editor (like Qt Creator)‌ adds a star indicating the file is modified:‌ it doesn't.

      qttools/src/qev shows the event is properly decoded:

      QKeyEvent(KeyPress, Key_Shift, ShiftModifier) 
      QKeyEvent(ShortcutOverride, 8204, ShiftModifier, text="\u200C") 
      QKeyEvent(KeyPress, 8204, ShiftModifier, text="\u200C") 
      QKeyEvent(KeyRelease, 8204, ShiftModifier, text="\u200C") 
      QKeyEvent(KeyRelease, Key_Shift) 
      

        Attachments

          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

              People

              Assignee:
              esabraha Eskil Abrahamsen Blomfeldt
              Reporter:
              thiago Thiago Macieira
              Votes:
              3 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes