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

Unified Diff: ppapi/cpp/input_event.h

Issue 9353013: Add GetUsbKeyCode dev interface for Pepper key events (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add GetUsbScanCode_Dev to Pepper/NaCl interface 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
Index: ppapi/cpp/input_event.h
diff --git a/ppapi/cpp/input_event.h b/ppapi/cpp/input_event.h
index 195ac08f3f14ac4116f68e33360e8fd1b0d28369..5c703bdae55b04dfab43bbeef0b7165713625c05 100644
--- a/ppapi/cpp/input_event.h
+++ b/ppapi/cpp/input_event.h
@@ -281,6 +281,9 @@ class KeyboardInputEvent : public InputEvent {
/// <code>keyCode</code> field. Chrome populates this with the Windows-style
/// Virtual Key code of the key.
///
+ /// @param[in] usb_scan_code The USB scancode that corresponds to the key
+ /// that generated this keyboard event.
+ ///
/// @param[in] character_text This value represents the typed character as a
/// UTF-8 string.
KeyboardInputEvent(Instance* instance,
@@ -288,12 +291,17 @@ class KeyboardInputEvent : public InputEvent {
PP_TimeTicks time_stamp,
uint32_t modifiers,
uint32_t key_code,
+ uint32_t usb_scan_code,
const Var& character_text);
/// Returns the DOM keyCode field for the keyboard event.
/// Chrome populates this with the Windows-style Virtual Key code of the key.
uint32_t GetKeyCode() const;
+ /// Returns the USB scancode that corresponds to the key that generated this
+ /// keyboard event.
+ uint32_t GetUsbScanCode_Dev() const;
+
/// Returns the typed character for the given character event.
///
/// @return A string var representing a single typed character for character

Powered by Google App Engine
This is Rietveld 408576698