summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2017-09-08 12:13:51 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2017-09-08 17:46:09 +0000
commitf6dc11e9b589ae80a6665424b94c5e23567ea9d6 (patch)
treee98ea5d5cfd60e5c7d8a352a918dc5ed5f26872f /src
parent8b5f1a828196bca52750deed85cc1f72ba0d7535 (diff)
Fix translation of Qt::Key_Menu
VK_MENU is the virtual key code for the Alt key, but Qt::Key_Menu is the context menu key which maps to VK_APPS. Now the menu key can be used to invoke the context menu on web pages. Task-number: QTBUG-58306 Change-Id: I8674ab84848b5c8732e4d0cf189909191b85d562 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/core/web_event_factory.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/core/web_event_factory.cpp b/src/core/web_event_factory.cpp
index 7853986b0..f5264708d 100644
--- a/src/core/web_event_factory.cpp
+++ b/src/core/web_event_factory.cpp
@@ -144,7 +144,6 @@ static int windowsKeyCodeForKeyEvent(unsigned int keycode, bool isKeypad)
return VK_SHIFT; // (10) SHIFT key
case Qt::Key_Control:
return VK_CONTROL; // (11) CTRL key
- case Qt::Key_Menu:
case Qt::Key_Alt:
return VK_MENU; // (12) ALT key
default:
@@ -167,7 +166,6 @@ static int windowsKeyCodeForKeyEvent(unsigned int keycode, bool isKeypad)
return VK_SHIFT; // (10) SHIFT key
case Qt::Key_Control:
return VK_CONTROL; // (11) CTRL key
- case Qt::Key_Menu:
case Qt::Key_Alt:
return VK_MENU; // (12) ALT key
@@ -357,7 +355,8 @@ static int windowsKeyCodeForKeyEvent(unsigned int keycode, bool isKeypad)
return VK_LWIN; // (5B) Left Windows key (Microsoft Natural keyboard)
// case Qt::Key_Meta_R: FIXME: What to do here?
// return VK_RWIN; // (5C) Right Windows key (Natural keyboard)
- // VK_APPS (5D) Applications key (Natural keyboard)
+ case Qt::Key_Menu: // (5D) Applications key (Natural keyboard)
+ return VK_APPS;
// VK_SLEEP (5F) Computer Sleep key
// VK_SEPARATOR (6C) Separator key
// VK_SUBTRACT (6D) Subtract key