Index: Source/web/WebInputEventConversion.cpp |
diff --git a/Source/web/WebInputEventConversion.cpp b/Source/web/WebInputEventConversion.cpp |
index 4df72e3f4659c04fe5b1350f19fec8012a2fd611..8ce2139b0b880babba18861295c31645115364cc 100644 |
--- a/Source/web/WebInputEventConversion.cpp |
+++ b/Source/web/WebInputEventConversion.cpp |
@@ -319,6 +319,7 @@ PlatformKeyboardEventBuilder::PlatformKeyboardEventBuilder(const WebKeyboardEven |
m_isKeypad = (e.modifiers & WebInputEvent::IsKeyPad); |
m_isSystemKey = e.isSystemKey; |
m_code = Platform::current()->domCodeStringFromEnum(e.domCode); |
+ m_key = Platform::current()->domKeyStringFromEnum(e.domKey); |
Rick Byers
2015/04/20 19:49:46
Wow, I'm surprised we do this every time we create
Habib Virji
2015/04/29 16:00:50
I agree this is not the best use of the embedded A
Rick Byers
2015/04/29 17:34:27
Yes, please do. Maybe add a TODO comment here ref
Habib Virji
2015/04/30 09:07:24
Done.
|
m_modifiers = toPlatformEventModifiers(e.modifiers); |
@@ -678,6 +679,7 @@ WebKeyboardEventBuilder::WebKeyboardEventBuilder(const KeyboardEvent& event) |
return; |
nativeKeyCode = event.keyEvent()->nativeVirtualKeyCode(); |
domCode = Platform::current()->domEnumFromCodeString(event.keyEvent()->code()); |
+ domKey = Platform::current()->domKeyEnumFromString(event.keyEvent()->key()); |
unsigned numberOfCharacters = std::min(event.keyEvent()->text().length(), static_cast<unsigned>(textLengthCap)); |
for (unsigned i = 0; i < numberOfCharacters; ++i) { |
text[i] = event.keyEvent()->text()[i]; |
@@ -713,6 +715,7 @@ WebKeyboardEventBuilder::WebKeyboardEventBuilder(const PlatformKeyboardEvent& ev |
isSystemKey = event.isSystemKey(); |
nativeKeyCode = event.nativeVirtualKeyCode(); |
domCode = Platform::current()->domEnumFromCodeString(event.code()); |
+ domKey = Platform::current()->domKeyEnumFromString(event.key()); |
windowsKeyCode = windowsKeyCodeWithoutLocation(event.windowsVirtualKeyCode()); |
modifiers |= locationModifiersFromWindowsKeyCode(event.windowsVirtualKeyCode()); |