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

Unified Diff: webkit/plugins/ppapi/usb_scan_code_conversion.h

Issue 9359048: Calc USB scancodes for key events (linux only for now) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup comments 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/plugins/ppapi/event_conversion.cc ('k') | webkit/plugins/ppapi/usb_scan_code_conversion.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/usb_scan_code_conversion.h
diff --git a/webkit/plugins/ppapi/usb_scan_code_conversion.h b/webkit/plugins/ppapi/usb_scan_code_conversion.h
new file mode 100644
index 0000000000000000000000000000000000000000..be8b998ee9bf72f601b8f2631a61ff96ef7f996c
--- /dev/null
+++ b/webkit/plugins/ppapi/usb_scan_code_conversion.h
@@ -0,0 +1,27 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
Sergey Ulanov 2012/02/15 01:08:12 2012
garykac 2012/02/16 21:12:56 Done.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef WEBKIT_PLUGINS_PPAPI_USB_SCAN_CODE_CONVERSION_H_
+#define WEBKIT_PLUGINS_PPAPI_USB_SCAN_CODE_CONVERSION_H_
+
+#include "ppapi/c/pp_stdint.h"
+
+namespace WebKit {
+class WebKeyboardEvent;
+}
Sergey Ulanov 2012/02/15 01:08:12 // namespace WebKit
garykac 2012/02/16 21:12:56 Done.
+
+namespace webkit {
+namespace ppapi {
+
+// Returns a 32-bit "USB Scan Code" for the key identifier by the supplied
+// WebKeyboardEvent. The supplied event must be a KeyDown or KeyUp.
+// The code consists of the USB Page (in the high-order 16-bit word) and
+// USB Usage Id of the key. If no translation can be performed then zero
+// is returned.
+uint32_t UsbScanCodeForKeyboardEvent(const WebKit::WebKeyboardEvent& key_event);
+
+} // namespace ppapi
+} // namespace webkit
+
+#endif // WEBKIT_PLUGINS_PPAPI_USB_SCAN_CODE_CONVERSION_H_
« no previous file with comments | « webkit/plugins/ppapi/event_conversion.cc ('k') | webkit/plugins/ppapi/usb_scan_code_conversion.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698