diff options
author | Alexandru Croitor <alexandru.croitor@theqtcompany.com> | 2016-01-11 16:06:01 +0100 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@theqtcompany.com> | 2016-01-11 15:30:29 +0000 |
commit | e43a2219fb1c230439a550ef6a3866de55352018 (patch) | |
tree | 51dcd0b9f8f5e8f518e1d2bf013ffa43ae9df705 /src/core/web_event_factory.cpp | |
parent | 7a39d2c3082822b9d4b2417d41f08b5def41b1db (diff) |
Send proper key codes for KeyEvents to WebKit.
A few KeyEvents to key code mappings were incorrect or missing. Fix
them.
Change-Id: I74087768fddd467993f04ed8b4c2dc6345d20e8a
Task-number: QTBUG-50354
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Diffstat (limited to 'src/core/web_event_factory.cpp')
-rw-r--r-- | src/core/web_event_factory.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/web_event_factory.cpp b/src/core/web_event_factory.cpp index 1a58ae385..1306f6f3b 100644 --- a/src/core/web_event_factory.cpp +++ b/src/core/web_event_factory.cpp @@ -264,9 +264,10 @@ static int windowsKeyCodeForKeyEvent(unsigned int keycode, bool isKeypad) case Qt::Key_Help: return VK_HELP; // (2F) HELP key case Qt::Key_0: - case Qt::Key_ParenLeft: + case Qt::Key_ParenRight: return VK_0; // (30) 0) key case Qt::Key_1: + case Qt::Key_Exclam: return VK_1; // (31) 1 ! key case Qt::Key_2: case Qt::Key_At: @@ -290,7 +291,7 @@ static int windowsKeyCodeForKeyEvent(unsigned int keycode, bool isKeypad) case Qt::Key_Asterisk: return VK_8; // (38) 8 key '*' case Qt::Key_9: - case Qt::Key_ParenRight: + case Qt::Key_ParenLeft: return VK_9; // (39) 9 key '(' case Qt::Key_A: return VK_A; // (41) A key case 'a': case 'A': return 0x41; @@ -428,6 +429,7 @@ static int windowsKeyCodeForKeyEvent(unsigned int keycode, bool isKeypad) case Qt::Key_BraceRight: return VK_OEM_6; // case ']': case '}': return 0xDD; // VK_OEM_7 (DE) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the 'single-quote/double-quote' key + case Qt::Key_Apostrophe: 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. |