Commit f6dc11e9 authored by Joerg Bornemann's avatar Joerg Bornemann Committed by Allan Sandfeld Jensen
Browse files

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: default avatarAllan Sandfeld Jensen <allan.jensen@qt.io>
Showing with 2 additions and 3 deletions
...@@ -144,7 +144,6 @@ static int windowsKeyCodeForKeyEvent(unsigned int keycode, bool isKeypad) ...@@ -144,7 +144,6 @@ static int windowsKeyCodeForKeyEvent(unsigned int keycode, bool isKeypad)
return VK_SHIFT; // (10) SHIFT key return VK_SHIFT; // (10) SHIFT key
case Qt::Key_Control: case Qt::Key_Control:
return VK_CONTROL; // (11) CTRL key return VK_CONTROL; // (11) CTRL key
case Qt::Key_Menu:
case Qt::Key_Alt: case Qt::Key_Alt:
return VK_MENU; // (12) ALT key return VK_MENU; // (12) ALT key
default: default:
...@@ -167,7 +166,6 @@ static int windowsKeyCodeForKeyEvent(unsigned int keycode, bool isKeypad) ...@@ -167,7 +166,6 @@ static int windowsKeyCodeForKeyEvent(unsigned int keycode, bool isKeypad)
return VK_SHIFT; // (10) SHIFT key return VK_SHIFT; // (10) SHIFT key
case Qt::Key_Control: case Qt::Key_Control:
return VK_CONTROL; // (11) CTRL key return VK_CONTROL; // (11) CTRL key
case Qt::Key_Menu:
case Qt::Key_Alt: case Qt::Key_Alt:
return VK_MENU; // (12) ALT key return VK_MENU; // (12) ALT key
...@@ -357,7 +355,8 @@ static int windowsKeyCodeForKeyEvent(unsigned int keycode, bool isKeypad) ...@@ -357,7 +355,8 @@ static int windowsKeyCodeForKeyEvent(unsigned int keycode, bool isKeypad)
return VK_LWIN; // (5B) Left Windows key (Microsoft Natural keyboard) return VK_LWIN; // (5B) Left Windows key (Microsoft Natural keyboard)
// case Qt::Key_Meta_R: FIXME: What to do here? // case Qt::Key_Meta_R: FIXME: What to do here?
// return VK_RWIN; // (5C) Right Windows key (Natural keyboard) // 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_SLEEP (5F) Computer Sleep key
// VK_SEPARATOR (6C) Separator key // VK_SEPARATOR (6C) Separator key
// VK_SUBTRACT (6D) Subtract key // VK_SUBTRACT (6D) Subtract key
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment