diff options
author | suzhe@chromium.org <suzhe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-04 19:48:19 +0000 |
---|---|---|
committer | suzhe@chromium.org <suzhe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-04 19:48:19 +0000 |
commit | ee19cb20c9c5a0354d145a6a1ca950797b7cd3aa (patch) | |
tree | 66a1f65060e653ff2a817c73c62505caee94b65f /base | |
parent | e5a8c47bda7fe8e3d8491fdd74cd166da02b8a7b (diff) | |
download | chromium_src-ee19cb20c9c5a0354d145a6a1ca950797b7cd3aa.zip chromium_src-ee19cb20c9c5a0354d145a6a1ca950797b7cd3aa.tar.gz chromium_src-ee19cb20c9c5a0354d145a6a1ca950797b7cd3aa.tar.bz2 |
[Linux Views] Refactor accelerator handler related code.
This CL removes the accelerator handling logic in
accelerator_handler_gtk.cc and implements a much simpler solution in
WidgetGtk. The new approach always sends a key event to the focused View
and native GtkWidget first and only sends it to the focus manager if it's not
handled by any View or native GtkWidget.
BUG=23383 AcceleratorHandler on Windows should not dispatch the KEYUP messages eaten by the FocusManager
BUG=40966 BrowserKeyEventsTest.AccessKeys is crashy
BUG=49701 [Linux Views]Some Emacs keybindings are broken in omnibox and find in page box.
TEST=Press Alt key in different place (web page, omnibox, find bar, etc.) to see if menu bar can be focused correctly. Press alt-F to popup wrench menu and Escape to close it, then try alt key again.
Review URL: http://codereview.chromium.org/3046041
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54947 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/keyboard_code_conversion_gtk.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/base/keyboard_code_conversion_gtk.cc b/base/keyboard_code_conversion_gtk.cc index 9e6bfd1..83f4197 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: |