Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1605)

Unified Diff: base/keyboard_code_conversion_gtk.cc

Issue 3046041: [Linux Views] Refactor accelerator handler related code. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Prevent ctrl+alt. Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/browser_keyevents_browsertest.cc » ('j') | views/widget/widget_gtk.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/keyboard_code_conversion_gtk.cc
diff --git a/base/keyboard_code_conversion_gtk.cc b/base/keyboard_code_conversion_gtk.cc
index 9e6bfd17e4fedd76d0e97fce8f88062a822ad527..83f41971f4c26ddceabdccd354a6df8a4c48f69b 100644
--- a/base/keyboard_code_conversion_gtk.cc
+++ b/base/keyboard_code_conversion_gtk.cc
@@ -93,6 +93,7 @@ base::KeyboardCode WindowsKeyCodeForGdkKeyCode(int keycode) {
case GDK_Control_R:
return VKEY_CONTROL; // (11) CTRL key
case GDK_Menu:
+ return VKEY_APPS; // (5D) Applications key (Natural keyboard)
case GDK_Alt_L:
case GDK_Alt_R:
return VKEY_MENU; // (12) ALT key
@@ -265,7 +266,6 @@ base::KeyboardCode WindowsKeyCodeForGdkKeyCode(int keycode) {
case GDK_Meta_R:
case GDK_Super_R:
return VKEY_RWIN; // (5C) Right Windows key (Natural keyboard)
- // VKEY_APPS (5D) Applications key (Natural keyboard)
// VKEY_SLEEP (5F) Computer Sleep key
// VKEY_SEPARATOR (6C) Separator key
// VKEY_SUBTRACT (6D) Subtract key
@@ -456,6 +456,8 @@ int GdkKeyCodeForWindowsKeyCode(base::KeyboardCode keycode, bool shift) {
case VKEY_CONTROL:
return GDK_Control_L;
case VKEY_MENU:
+ return GDK_Alt_L;
+ case VKEY_APPS:
return GDK_Menu;
case VKEY_PAUSE:
« no previous file with comments | « no previous file | chrome/browser/browser_keyevents_browsertest.cc » ('j') | views/widget/widget_gtk.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698