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

Windows: QKeyEvent::key() returns invalid value for special characters with Ctrl-modifier in non-English keyboard layouts

    XMLWordPrintable

Details

    • 5055183bc5a8288976f58c65b52276ad17491cad 98b49f88fa1dfe593bf8e4291bd12419d47c26aa

    Description

      In German keyboard layout the Qt::Key_Plus is located in the same key as Qt::Key_RightBracket in English keyboard. When pressing Ctrl and Key_Plus in German layout the result of QKeyEvent::key() is Qt::Key_RightBracket when it should be Qt::Key_Plus. Similar behavior can be seen in other special characters and in other non-English keyboard layouts.

      Tested with German and Finnish keyboard layouts. This is reproducible only in Windows.

      There is a fix proposal for static function toKeyOrUnicode() in qwindowskeymapper.cpp in the attached file in lines 486-487.

      Attachments

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

        Activity

          People

            owolff Oliver Wolff
            qtcomsupport Qt Support
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes