From e43a2219fb1c230439a550ef6a3866de55352018 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Mon, 11 Jan 2016 16:06:01 +0100 Subject: 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 --- src/core/web_event_factory.cpp | 6 ++++-- 1 file 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. -- cgit v1.2.3