1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file.
7 * This file defines the <code>PPB_KeyboardInputEvent_Dev</code> interface,
8 * which provides access to USB key codes that identify the physical key being
17 * The <code>PPB_KeyboardInputEvent_Dev</code> interface is an extension to the
18 * PPB_KeyboardInputEvent</code> interface that provides
20 [version=0.1, macro
="PPB_KEYBOARD_INPUT_EVENT_DEV_INTERFACE"]
21 interface PPB_KeyboardInputEvent_Dev
{
23 * This sets a USB key code in the given <code>PP_Resource</code>. It is
24 * intended that this method be called immediately after any call to
25 * <code>Create</code>.
27 * @param[in] key_event A <code>PP_Resource</code> created by
28 * <code>PPB_KeyboardInputEvent</code>'s <code>Create</code> method.
30 * @param[in] usb_key_code The USB key code to associate with this
31 * <code>key_event</code>.
33 * @return <code>PP_TRUE</code> if the USB key code was set successfully.
35 PP_Bool SetUsbKeyCode
([in] PP_Resource key_event
,
36 [in] uint32_t usb_key_code
);
39 * GetUsbKeyCode() returns the USB key code associated with this keyboard
42 * @param[in] key_event The key event for which to return the key code.
44 * @return The USB key code field for the keyboard event. If there is no
45 * USB scancode associated with this event, or if the PP_Resource does not
46 * support the PPB_InputEvent_API (i.e., it is not an input event), then
49 uint32_t GetUsbKeyCode
([in] PP_Resource key_event
);