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

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

XMLWordPrintable

      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) 
      

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes