Chromium Code Reviews| Index: ui/events/event.h |
| diff --git a/ui/events/event.h b/ui/events/event.h |
| index dfd867ec4626935e93aa2277ac49099243d13f8c..9a09633b030cad8105892ebdb8e947119aa1c240 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; } |
|
sadrul
2014/06/12 11:17:43
This isn't actually necessary, is it?
Shu Chen
2014/06/12 13:55:30
Yes, this cl doesn't have code uses this method.
A
kpschoedel
2014/06/12 16:00:24
I have done similar things for issue 380349. There
Shu Chen
2014/06/13 02:07:15
Done. I've removed this method.
|
| + |
| // 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_; } |
| @@ -581,6 +588,8 @@ class EVENTS_EXPORT KeyEvent : public Event { |
| // share the same type: ET_KEY_PRESSED. |
| bool is_char_; |
| + uint32 platform_keycode_; |
| + |
| uint16 character_; |
|
sadrul
2014/06/12 11:17:43
Can you add a comment here explaining the differen
Shu Chen
2014/06/12 13:55:30
Done.
|
| static bool IsRepeated(const KeyEvent& event); |