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

Unified Diff: ui/events/event.h

Issue 324903002: Remoes X11 dependency in InputMethodEngine. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 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 | « ui/events/cocoa/events_mac.mm ('k') | ui/events/event.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/event.h
diff --git a/ui/events/event.h b/ui/events/event.h
index dfd867ec4626935e93aa2277ac49099243d13f8c..89d0a48cb3b1450c02577c82c435ddcf3ddc3879 100644
--- a/ui/events/event.h
+++ b/ui/events/event.h
@@ -534,10 +534,17 @@ class EVENTS_EXPORT KeyEvent : public Event {
// letter A with acute, U+0410 Cyrillic capital letter A).
void set_character(uint16 character) { character_ = character; }
+ // This allows some platforms other than XKB to set its original key code.
+ // e.g. Key event from Ozone will not have native key event. So it can use
+ // this method to set the xksym value.
+ void set_platform_keycode(uint32 keycode) { platform_keycode_ = keycode; }
+
// Gets the character generated by this key event. It only supports Unicode
// BMP characters.
uint16 GetCharacter() const;
+ // Gets the platform key code. For XKB, this is the xksym value.
+ uint32 platform_keycode() const { return platform_keycode_; }
KeyboardCode key_code() const { return key_code_; }
bool is_char() const { return is_char_; }
@@ -568,6 +575,9 @@ class EVENTS_EXPORT KeyEvent : public Event {
void set_is_char(bool is_char) { is_char_ = is_char; }
private:
+ // The VKEY_? key code for the key event. This key code represent the remapped
+ // key position. e.g. for French keyboard, when user press the key on the
+ // right side of TAB key, |key_code_| is VKEY_A, while |code_| is "KeyQ".
kpschoedel 2014/06/12 16:00:24 For non-Latin languages, it is the unmapped ("US")
Shu Chen 2014/06/13 02:07:15 Done. I've removed the comment here.
KeyboardCode key_code_;
// String of 'code' defined in DOM KeyboardEvent (e.g. 'KeyA', 'Space')
@@ -581,6 +591,18 @@ class EVENTS_EXPORT KeyEvent : public Event {
// share the same type: ET_KEY_PRESSED.
bool is_char_;
+ // The platform related keycode value. For XKB, it's keysym value.
+ // For now, this is used for CharacterComposer in ChromeOS.
+ // Note: for XKB, the keysym vlaue is modifiered value. But for other
+ // platforms, it may be unmodifiered value.
+ uint32 platform_keycode_;
+
+ // String of 'key' defined in DOM KeyboardEvent (e.g. 'a', 'â')
+ // http://www.w3.org/TR/uievents/#keyboard-key-codes.
+ //
+ // This value represents the text that the key event will insert to input
+ // field. For key with modifier key, it may have specifial text.
+ // e.g. CTRL+A has '\x01'.
uint16 character_;
static bool IsRepeated(const KeyEvent& event);
« no previous file with comments | « ui/events/cocoa/events_mac.mm ('k') | ui/events/event.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698