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

Some XKB letter keysyms are not properly converted to corresponding Qt keys

    XMLWordPrintable

    Details

    • Platform/s:
      Linux/Wayland, Linux/X11
    • Commits:
      6ecde6265a08163d47a834cb5591fdb22461d129 (qt/qtbase/dev)

      Description

      Symbol Expected Actual
      XKB_KEY_mu


      0x0b5
      , Latin 1 charset,
      U+00B5 MICRO SIGN
      Qt::Key_mu



      0x0b5
      , Latin 1
      0x07cc, no Qt::Key enum

      corresponds
      to XKB_KEY_Greek_MU, Latin/Greek,
      U+039C GREEK CAPITAL LETTER MU
      XKB_KEY_ydiaeresis


      0x0ff
      , Latin 1 charset,
      U+00FF LATIN SMALL LETTER Y WITH DIAERESIS
      Qt::Key_ydiaeresis



      0x0ff
      , Latin 1 charset
      0x13be, no Qt::Key enum

      corresponds
      to XKB_KEY_Ydiaeresis,
      Latin 9,
      U+0178 LATIN CAPITAL LETTER Y WITH DIAERESIS

      Usually, Qt::Key letters 1 are just upper case versions of corresponding Latin 1 letters, but that's not always the case: some Latin 1 letters 2 do not have their upper-case representation within Latin 1 charset itself 3, as seen in the table above. That letters represented in Qt::Key by their lower-case Latin1 variants instead.

      SOLUTION:
      We should not convert Latin 1 letter to upper-case, if it's upper-case representation doesn't fit to Latin 1 charset. It's lower-case variant should be used as Qt key instead.

      1. https://code.woboq.org/qt6/qtbase/src/corelib/global/qnamespace.h.html#Qt::Key
      2. https://en.wikipedia.org/wiki/Mu_(letter)#Character_encodings
      3. https://en.wikipedia.org/wiki/ISO/IEC_8859-1#Code_page_layout

        Attachments

          Issue Links

          For Gerrit Dashboard: QTBUG-93858
          # Subject Branch Project Status CR V

            Activity

              People

              Assignee:
              liaqi Liang Qi
              Reporter:
              bam80 Andrey Butirsky
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: