Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(874)

Unified Diff: Source/core/events/KeyboardEvent.cpp

Issue 797243003: [Events] Propagate IME composition event to JS on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Renaming const to match style elsewhere in Blink. Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/events/KeyboardEvent.cpp
diff --git a/Source/core/events/KeyboardEvent.cpp b/Source/core/events/KeyboardEvent.cpp
index ac7ae1f7ad51bd6b10b7387839bb4dd0d16d4968..dbf12a9f88cb4eb07ed149269e520e66474b7be2 100644
--- a/Source/core/events/KeyboardEvent.cpp
+++ b/Source/core/events/KeyboardEvent.cpp
@@ -163,6 +163,14 @@ int KeyboardEvent::keyCode() const
// We match IE.
if (!m_keyEvent)
return 0;
+
+#if OS(ANDROID)
+ // FIXME: Check to see if this applies to other OS.
+ // If the key event belongs to IME composition then propagate to JS.
+ if (m_keyEvent->nativeVirtualKeyCode() == 0xE5) // VKEY_PROCESSKEY
+ return m_keyEvent->nativeVirtualKeyCode();
+#endif
+
if (type() == EventTypeNames::keydown || type() == EventTypeNames::keyup)
return windowsVirtualKeyCodeWithoutLocation(m_keyEvent->windowsVirtualKeyCode());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698