diff options
author | suzhe@chromium.org <suzhe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-01 04:49:06 +0000 |
---|---|---|
committer | suzhe@chromium.org <suzhe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-01 04:49:06 +0000 |
commit | ad53baa575a30701cf26e77d748252c010fb96ab (patch) | |
tree | 168fccfcfe9852812f34c0675fdc8b0656cb6af5 /chrome/common/native_web_keyboard_event.h | |
parent | 29bba6f380ab785dc70d0632b62e98b47f5f4763 (diff) | |
download | chromium_src-ad53baa575a30701cf26e77d748252c010fb96ab.zip chromium_src-ad53baa575a30701cf26e77d748252c010fb96ab.tar.gz chromium_src-ad53baa575a30701cf26e77d748252c010fb96ab.tar.bz2 |
[Linux]Improve keyboard event handling code of RWHV.
Just like what Mac port already did, this CL changes the method to determine if a keyboard event should be processed by the browser to use a boolean field instead of setting the keyval of os_event to GDK_VoidSymbol. Because in some cases, GDK_VoidSymbol might be valid key value, for example ctrl-b on Arabic keyboard.
BUG=35117 Emacs key binding ctrl-b doesn't work in web page when using Arabic keyboard layout.
TEST=Enable Emacs key theme and switch to Arabic keyboard layout, then try ctrl-b (move cursor backwards) in web page's text area.
Review URL: http://codereview.chromium.org/661149
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40255 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/native_web_keyboard_event.h')
-rw-r--r-- | chrome/common/native_web_keyboard_event.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/chrome/common/native_web_keyboard_event.h b/chrome/common/native_web_keyboard_event.h index 438d159..381ad31 100644 --- a/chrome/common/native_web_keyboard_event.h +++ b/chrome/common/native_web_keyboard_event.h @@ -48,15 +48,16 @@ struct NativeWebKeyboardEvent : public WebKit::WebKeyboardEvent { MSG os_event; #elif defined(OS_MACOSX) NSEvent* os_event; +#elif defined(OS_LINUX) + GdkEventKey* os_event; +#endif // True if the browser should ignore this event if it's not handled by the // renderer. This happens for RawKeyDown events that are created while IME is // active and is necessary to prevent backspace from doing "history back" if // it is hit in ime mode. + // Currently, it's only used by Linux and Mac ports. bool skip_in_browser; -#elif defined(OS_LINUX) - GdkEventKey* os_event; -#endif }; #endif // CHROME_COMMON_NATIVE_WEB_KEYBOARD_EVENT_H_ |