| Index: ui/events/event.h
|
| diff --git a/ui/events/event.h b/ui/events/event.h
|
| index 6b8f95c5b15971d8835de724673b2976269bea67..ac147f2589fde4ae34457959cc8468ec405e5741 100644
|
| --- a/ui/events/event.h
|
| +++ b/ui/events/event.h
|
| @@ -569,7 +569,7 @@ class EVENTS_EXPORT TouchEvent : public LocatedEvent {
|
| // -- character_ is a UTF-16 character value.
|
| // -- key_code_ is conflated with character_ by some code, because both
|
| // arrive in the wParam field of a Windows event.
|
| -// -- code_ is "".
|
| +// -- code_ is the empty string.
|
| //
|
| class EVENTS_EXPORT KeyEvent : public Event {
|
| public:
|
| @@ -612,6 +612,12 @@ class EVENTS_EXPORT KeyEvent : public Event {
|
| // events in an EventRewriter.
|
| void set_key_code(KeyboardCode key_code) { key_code_ = key_code; }
|
|
|
| + // Returns the same value as key_code(), except that located codes are
|
| + // returned in place of non-located ones (e.g. VKEY_LSHIFT or VKEY_RSHIFT
|
| + // instead of VKEY_SHIFT). This is a hybrid of semantic and physical
|
| + // for legacy DOM reasons.
|
| + KeyboardCode GetLocatedWindowsKeyboardCode() const;
|
| +
|
| // Returns true for [Alt]+<num-pad digit> Unicode alt key codes used by Win.
|
| // TODO(msw): Additional work may be needed for analogues on other platforms.
|
| bool IsUnicodeKeyCode() const;
|
| @@ -635,6 +641,9 @@ class EVENTS_EXPORT KeyEvent : public Event {
|
| void set_is_char(bool is_char) { is_char_ = is_char; }
|
|
|
| private:
|
| + // True if the key press originated from a 'right' key (VKEY_RSHIFT, etc.).
|
| + bool IsRightSideKey() const;
|
| +
|
| KeyboardCode key_code_;
|
|
|
| // String of 'code' defined in DOM KeyboardEvent (e.g. 'KeyA', 'Space')
|
| @@ -657,7 +666,7 @@ class EVENTS_EXPORT KeyEvent : public Event {
|
| // 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'.
|
| - base::char16 character_;
|
| + mutable base::char16 character_;
|
|
|
| static bool IsRepeated(const KeyEvent& event);
|
|
|
|
|