| Index: sky/engine/public/platform/WebInputEvent.h
|
| diff --git a/sky/engine/public/platform/WebInputEvent.h b/sky/engine/public/platform/WebInputEvent.h
|
| index 5ed33045f6cf258b3a92c2201e8d88c820e21096..bd468004d4697ab04d636a73d04db83fe1f0b8b9 100644
|
| --- a/sky/engine/public/platform/WebInputEvent.h
|
| +++ b/sky/engine/public/platform/WebInputEvent.h
|
| @@ -94,9 +94,8 @@ public:
|
| PointerTypeLast = PointerCancel,
|
|
|
| // WebKeyboardEvent
|
| - RawKeyDown,
|
| - KeyboardTypeFirst = RawKeyDown,
|
| KeyDown,
|
| + KeyboardTypeFirst = KeyDown,
|
| KeyUp,
|
| Char,
|
| KeyboardTypeLast = Char,
|
| @@ -231,16 +230,7 @@ public:
|
|
|
| class WebKeyboardEvent : public WebInputEvent {
|
| public:
|
| - // Caps on string lengths so we can make them static arrays and keep
|
| - // them PODs.
|
| - static const size_t textLengthCap = 4;
|
| -
|
| - // http://www.w3.org/TR/DOM-Level-3-Events/keyset.html lists the
|
| - // identifiers. The longest is 18 characters, so we round up to the
|
| - // next multiple of 4.
|
| - static const size_t keyIdentifierLengthCap = 20;
|
| -
|
| - // |windowsKeyCode| is the Windows key code associated with this key
|
| + // |key| is the Windows key code associated with this key
|
| // event. Sometimes it's direct from the event (i.e. on Windows),
|
| // sometimes it's via a mapping function. If you want a list, see
|
| // WebCore/platform/chromium/KeyboardCodes* . Note that this should
|
| @@ -248,50 +238,21 @@ public:
|
| // what is returned by the Windows API. For example, it should
|
| // store VK_SHIFT instead of VK_RSHIFT. The location information
|
| // should be stored in |modifiers|.
|
| - int windowsKeyCode;
|
| -
|
| - // The actual key code genenerated by the platform. The DOM spec runs
|
| - // on Windows-equivalent codes (thus |windowsKeyCode| above) but it
|
| - // doesn't hurt to have this one around.
|
| - int nativeKeyCode;
|
| -
|
| - // This identifies whether this event was tagged by the system as being
|
| - // a "system key" event (see
|
| - // http://msdn.microsoft.com/en-us/library/ms646286(VS.85).aspx for
|
| - // details). Other platforms don't have this concept, but it's just
|
| - // easier to leave it always false than ifdef.
|
| - // See comment at the top of the file for why an int is used here.
|
| - bool isSystemKey;
|
| -
|
| - // |text| is the text generated by this keystroke. |unmodifiedText| is
|
| - // |text|, but unmodified by an concurrently-held modifiers (except
|
| - // shift). This is useful for working out shortcut keys. Linux and
|
| - // Windows guarantee one character per event. The Mac does not, but in
|
| - // reality that's all it ever gives. We're generous, and cap it a bit
|
| - // longer.
|
| - WebUChar text[textLengthCap];
|
| - WebUChar unmodifiedText[textLengthCap];
|
| -
|
| - // This is a string identifying the key pressed.
|
| - char keyIdentifier[keyIdentifierLengthCap];
|
| + int key;
|
| +
|
| + // |charCode| is the text generated by this keystroke. |unmodifiedCharCode|
|
| + // is |charCode|, but unmodified by an concurrently-held modifiers (except
|
| + // shift). This is useful for working out shortcut keys.
|
| + WebUChar charCode;
|
| + WebUChar unmodifiedCharCode;
|
|
|
| WebKeyboardEvent()
|
| : WebInputEvent(sizeof(WebKeyboardEvent))
|
| - , windowsKeyCode(0)
|
| - , nativeKeyCode(0)
|
| - , isSystemKey(false)
|
| + , key(0)
|
| + , charCode(0)
|
| + , unmodifiedCharCode(0)
|
| {
|
| - memset(&text, 0, sizeof(text));
|
| - memset(&unmodifiedText, 0, sizeof(unmodifiedText));
|
| - memset(&keyIdentifier, 0, sizeof(keyIdentifier));
|
| }
|
| -
|
| - // Sets keyIdentifier based on the value of windowsKeyCode. This is
|
| - // handy for generating synthetic keyboard events.
|
| - BLINK_EXPORT void setKeyIdentifierFromWindowsKeyCode();
|
| -
|
| - static int windowsKeyCodeWithoutLocation(int keycode);
|
| - static int locationModifiersFromWindowsKeyCode(int keycode);
|
| };
|
|
|
| // WebGestureEvent --------------------------------------------------------------
|
|
|