diff options
author | evanm@google.com <evanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-07 01:03:48 +0000 |
---|---|---|
committer | evanm@google.com <evanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-07 01:03:48 +0000 |
commit | 70801a56ae3169b7aa28328a3a52dd6f7872c2f4 (patch) | |
tree | 5879671f91f1a1d9d5716f22f546114afe9d50f5 /webkit/glue/webinputevent.h | |
parent | ae78b256715d34337a126ea6912f9b61439060e3 (diff) | |
download | chromium_src-70801a56ae3169b7aa28328a3a52dd6f7872c2f4.zip chromium_src-70801a56ae3169b7aa28328a3a52dd6f7872c2f4.tar.gz chromium_src-70801a56ae3169b7aa28328a3a52dd6f7872c2f4.tar.bz2 |
Some basic keyboard and focus support.
Review URL: http://codereview.chromium.org/9626
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4944 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webinputevent.h')
-rw-r--r-- | webkit/glue/webinputevent.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/webkit/glue/webinputevent.h b/webkit/glue/webinputevent.h index 31d2d43..dce4394 100644 --- a/webkit/glue/webinputevent.h +++ b/webkit/glue/webinputevent.h @@ -127,7 +127,16 @@ class WebMouseWheelEvent : public WebMouseEvent { class WebKeyboardEvent : public WebInputEvent { public: + // The key_code field is the Windows key code associated with this key event. + // This sometimes matches the ASCII value of the key (for e.g. a-z) but + // officially ignores case, and has its own set of codes for control keys as + // well as other visible letters like punctuation. + // webkit/port/platform/chromium/KeyboardCodes* is an attempt at defining all + // of these keys, but it's not all the way there yet. (E.g., the Windows + // implementation there just passes through the code from the windows message + // directly.) int key_code; + #if defined(OS_MACOSX) // text arrays extracted from the native event. On Mac, there may be // multiple keys sent as a single event if the flags don't change. @@ -137,6 +146,12 @@ class WebKeyboardEvent : public WebInputEvent { #elif defined(OS_WIN) bool system_key; // Set if we receive a SYSKEYDOWN/WM_SYSKEYUP message. MSG actual_message; // Set to the current keyboard message. +#elif defined(OS_LINUX) + // The ASCII character, if available, corresponding to this key event. + // TODO(evanm): temporary hack for test_shell. Ideally we'd either manage + // to stuff everything into key_code, or make this field shared by all + // implementations, but this will have to do for now. + char text; #endif WebKeyboardEvent() |