Chromium Code Reviews| 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..2f9c489eccd6419b2f037000a33031947438e162 |
| --- /dev/null |
| +++ b/webkit/plugins/ppapi/usb_scan_code_conversion.h |
| @@ -0,0 +1,27 @@ |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| +// 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; |
| +} // namespace WebKit |
| + |
| +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); |
|
Wez
2012/02/17 01:35:30
See previous CL re USB "scan code" vs "key code".
garykac
2012/02/22 21:31:07
Done.
|
| + |
| +} // namespace ppapi |
| +} // namespace webkit |
| + |
| +#endif // WEBKIT_PLUGINS_PPAPI_USB_SCAN_CODE_CONVERSION_H_ |