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

Unified Diff: webkit/plugins/ppapi/event_conversion.cc

Issue 9359048: Calc USB scancodes for key events (linux only for now) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix shared lib build Created 8 years, 10 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 | « webkit/glue/webkit_glue.gypi ('k') | webkit/plugins/ppapi/usb_key_code_conversion.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/event_conversion.cc
diff --git a/webkit/plugins/ppapi/event_conversion.cc b/webkit/plugins/ppapi/event_conversion.cc
index 4b1f2ddecdd22ddce890879e70176728b0e2e0bd..9936ce3c83611d870109e61c5a066ba3e34252f1 100644
--- a/webkit/plugins/ppapi/event_conversion.cc
+++ b/webkit/plugins/ppapi/event_conversion.cc
@@ -18,6 +18,7 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
#include "webkit/plugins/ppapi/common.h"
+#include "webkit/plugins/ppapi/usb_key_code_conversion.h"
using ppapi::EventTimeToPPTimeTicks;
using ppapi::InputEventData;
@@ -81,9 +82,7 @@ void AppendKeyEvent(const WebInputEvent& event,
InputEventData result = GetEventWithCommonFieldsAndType(event);
result.event_modifiers = key_event.modifiers;
result.key_code = key_event.windowsKeyCode;
- // TODO(garykac): Platform-specific code to convert from
- // |key_event.nativeKeyCode| to USB key code.
- result.usb_key_code = 0;
+ result.usb_key_code = UsbKeyCodeForKeyboardEvent(key_event);
result_events->push_back(result);
}
« no previous file with comments | « webkit/glue/webkit_glue.gypi ('k') | webkit/plugins/ppapi/usb_key_code_conversion.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698