Commit 4738c682 authored by eric@webkit.org's avatar eric@webkit.org
Browse files

2009-10-26 Kinuko Yasuda <kinuko@google.com>

        Reviewed by Jan Alonzo.

        Bug 30619: [Linux] Menu key doesn't work
        https://bugs.webkit.org/show_bug.cgi?id=30619

        Test: manual-tests/keyboard-menukey-event.html
        No new layout tests: testing this will require changes in the test
        controller in a platform-specific way.

        * platform/chromium/KeyCodeConversionGtk.cpp:
        (WebCore::windowsKeyCodeForKeyEvent): changed switch-case code for
        GDK_Menu to return VKEY_APPS instead of VKEY_MENU.
        * platform/gtk/KeyEventGtk.cpp:
        (WebCore::windowsKeyCodeForKeyEvent): changed switch-case code for
        GDK_Menu to return V_APPS instead of VK_MENU.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50051 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 42dab9ba
2009-10-26 Kinuko Yasuda <kinuko@google.com>
Reviewed by Jan Alonzo.
Bug 30619: [Linux] Menu key doesn't work
https://bugs.webkit.org/show_bug.cgi?id=30619
Test: manual-tests/keyboard-menukey-event.html
No new layout tests: testing this will require changes in the test
controller in a platform-specific way.
* platform/chromium/KeyCodeConversionGtk.cpp:
(WebCore::windowsKeyCodeForKeyEvent): changed switch-case code for
GDK_Menu to return VKEY_APPS instead of VKEY_MENU.
* platform/gtk/KeyEventGtk.cpp:
(WebCore::windowsKeyCodeForKeyEvent): changed switch-case code for
GDK_Menu to return V_APPS instead of VK_MENU.
2009-10-25 Anton Muhin <antonm@chromium.org> 2009-10-25 Anton Muhin <antonm@chromium.org>
   
Reviewed by Adam Barth. Reviewed by Adam Barth.
<html lang="en">
<head>
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=UTF-8">
<title>Menu key testing</title>
<script language="javascript" type="text/javascript">
function log(str) {
var li = document.createElement("li");
li.appendChild(document.createTextNode(str));
var results = document.getElementById("results");
results.appendChild(li);
}
</script>
</head>
<body>
<p>
See bug: <a href="https://bugs.webkit.org/show_bug.cgi?id=30619">30619</a>.
Note: this test is only applicable for Linux and Windows.
</p>
<ol>
<li>Click the text input box below and press Menu key.
The test passes if you see 'PASS' below.
<input type="text" oncontextmenu="log('PASS');" />
</li>
<li oncontextmenu="log('PASS');">Click or select somewhere
in this text and press Menu key.
The test passes if you see additional 'PASS' below.
</li>
</ol>
<ul id="results"></ul>
</body>
</html>
...@@ -91,6 +91,7 @@ int windowsKeyCodeForKeyEvent(unsigned keycode) ...@@ -91,6 +91,7 @@ int windowsKeyCodeForKeyEvent(unsigned keycode)
case GDK_Control_R: case GDK_Control_R:
return VKEY_CONTROL; // (11) CTRL key return VKEY_CONTROL; // (11) CTRL key
case GDK_Menu: case GDK_Menu:
return VKEY_APPS; // (5D) Applications key (Natural keyboard)
case GDK_Alt_L: case GDK_Alt_L:
case GDK_Alt_R: case GDK_Alt_R:
return VKEY_MENU; // (12) ALT key return VKEY_MENU; // (12) ALT key
...@@ -261,7 +262,6 @@ int windowsKeyCodeForKeyEvent(unsigned keycode) ...@@ -261,7 +262,6 @@ int windowsKeyCodeForKeyEvent(unsigned keycode)
return VKEY_LWIN; // (5B) Left Windows key (Microsoft Natural keyboard) return VKEY_LWIN; // (5B) Left Windows key (Microsoft Natural keyboard)
case GDK_Meta_R: case GDK_Meta_R:
return VKEY_RWIN; // (5C) Right Windows key (Natural keyboard) return VKEY_RWIN; // (5C) Right Windows key (Natural keyboard)
// VKEY_APPS (5D) Applications key (Natural keyboard)
// VKEY_SLEEP (5F) Computer Sleep key // VKEY_SLEEP (5F) Computer Sleep key
// VKEY_SEPARATOR (6C) Separator key // VKEY_SEPARATOR (6C) Separator key
// VKEY_SUBTRACT (6D) Subtract key // VKEY_SUBTRACT (6D) Subtract key
......
...@@ -200,6 +200,7 @@ static int windowsKeyCodeForKeyEvent(unsigned int keycode) ...@@ -200,6 +200,7 @@ static int windowsKeyCodeForKeyEvent(unsigned int keycode)
case GDK_Control_R: case GDK_Control_R:
return VK_CONTROL; // (11) CTRL key return VK_CONTROL; // (11) CTRL key
case GDK_Menu: case GDK_Menu:
return VK_APPS; // (5D) Applications key (Natural keyboard)
case GDK_Alt_L: case GDK_Alt_L:
case GDK_Alt_R: case GDK_Alt_R:
return VK_MENU; // (12) ALT key return VK_MENU; // (12) ALT key
...@@ -370,7 +371,6 @@ static int windowsKeyCodeForKeyEvent(unsigned int keycode) ...@@ -370,7 +371,6 @@ static int windowsKeyCodeForKeyEvent(unsigned int keycode)
return VK_LWIN; // (5B) Left Windows key (Microsoft Natural keyboard) return VK_LWIN; // (5B) Left Windows key (Microsoft Natural keyboard)
case GDK_Meta_R: case GDK_Meta_R:
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)
// 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
......
Markdown is supported
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