diff options
author | Martin Negyokru <negyokru@inf.u-szeged.hu> | 2023-08-08 17:51:15 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2023-08-21 10:17:03 +0000 |
commit | d326e29a38f812b48268d6e86a058f326808253e (patch) | |
tree | eb69aed6b3e3485d193f71ddd32ed3aa3d97a39c | |
parent | 7bd080150c0fca2ae83e931a9ba03af9b048d92e (diff) |
Add missing AltGr mapping in windowsKeyCodeForQtKey
Unknown windows_key_codes are calculated from
native key codes, breaking any remapping.
Although it is named windows_key_code it is used
on other platforms too.
Fixes: QTBUG-115844
Change-Id: I53956fd6c18a6b85afe97b82696ba4f49618008c
Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
(cherry picked from commit 888afe6d733115c04d28cbc348a5c26ddd77d233)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/core/web_event_factory.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/web_event_factory.cpp b/src/core/web_event_factory.cpp index 3ccfcccb4..f4b37e838 100644 --- a/src/core/web_event_factory.cpp +++ b/src/core/web_event_factory.cpp @@ -558,6 +558,8 @@ static int windowsKeyCodeForQtKey(int qtKey, bool isKeypad) case Qt::Key_QuoteDbl: return VK_OEM_7; // case '\'': case '"': return 0xDE; // VK_OEM_8 (DF) Used for miscellaneous characters; it can vary by keyboard. + case Qt::Key_AltGr: + return 0xE1; // (E1) VK_OEM_AX = ui::VKEY_ALTGR see ui/events/keycodes/keyboard_codes_win.h // VK_OEM_102 (E2) Windows 2000/XP: Either the angle bracket key or the backslash key on the RT 102-key keyboard case Qt::Key_AudioRewind: |