Index: third_party/WebKit/Source/web/WebInputEventConversion.cpp |
diff --git a/third_party/WebKit/Source/web/WebInputEventConversion.cpp b/third_party/WebKit/Source/web/WebInputEventConversion.cpp |
index 547a598111bd370a9c6dd27add8f1f0def382a93..a83ffbe51593913e66942a28e750fcb9147e242e 100644 |
--- a/third_party/WebKit/Source/web/WebInputEventConversion.cpp |
+++ b/third_party/WebKit/Source/web/WebInputEventConversion.cpp |
@@ -328,17 +328,20 @@ void PlatformKeyboardEventBuilder::setKeyType(Type type) |
} |
} |
-// Please refer to bug http://b/issue?id=961192, which talks about Webkit |
-// keyboard event handling changes. It also mentions the list of keys |
-// which don't have associated character events. |
bool PlatformKeyboardEventBuilder::isCharacterKey() const |
{ |
- switch (windowsVirtualKeyCode()) { |
- case VKEY_BACK: |
- case VKEY_ESCAPE: |
+ if (text().length() == 0) |
return false; |
+ |
+ UChar32 c = text().characterStartingAt(0); |
+ switch (c) { |
+ case 0x08: // Backspace |
+ case 0x1B: // Escape |
+ case 0x7F: // Delete |
+ return false; |
+ default: |
+ return true; |
} |
- return true; |
} |
inline PlatformEvent::Type toPlatformTouchEventType(const WebInputEvent::Type type) |