{{+bindTo:partials.standard_nacl_api}}
<h1>PPB_KeyboardInputEvent Struct Reference</h1>
<div id="doxygen-ref">
{{- dummy div to appease doxygen -}}
<div>
<!-- Generated by Doxygen 1.7.6.1 -->
</div>
<!--header-->
<div class="contents">
<!-- doxytag: class="PPB_KeyboardInputEvent" --><h2>
Data Fields</h2><table class="memberdecls">
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a>(* </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___keyboard_input_event__1__2.html#a7f685c043948fdb5a166f5bf6a342e96">Create</a> )(<a class="el" href="group___typedefs.html#ga89b662403e6a687bb914b80114c0d19d">PP_Instance</a> instance, <a class="el" href="group___enums.html#gaca7296cfec99fcb6646b7144d1d6a0c5">PP_InputEvent_Type</a> type, <a class="el" href="group___typedefs.html#ga71cb1042cdeb38d7881b121f3b09ce94">PP_TimeTicks</a> time_stamp, uint32_t modifiers, uint32_t key_code, struct <a class="el" href="struct_p_p___var.html">PP_Var</a> character_text, struct <a class="el" href="struct_p_p___var.html">PP_Var</a> code)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___enums.html#ga4f272d99be14aacafe08dfd4ef830918">PP_Bool</a>(* </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___keyboard_input_event__1__2.html#ae3fed704fb8f527fb7fd94e8c34ac13a">IsKeyboardInputEvent</a> )(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> resource)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint32_t(* </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___keyboard_input_event__1__2.html#a1862b7cf375179c7a990b61ffad1ce6a">GetKeyCode</a> )(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> key_event)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="struct_p_p___var.html">PP_Var</a>(* </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___keyboard_input_event__1__2.html#aaf9bb52daef6052c4f4bf4f84efee9d2">GetCharacterText</a> )(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> character_event)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="struct_p_p___var.html">PP_Var</a>(* </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___keyboard_input_event__1__2.html#a84c476e78ea7c066f9e89b5ae828ffa8">GetCode</a> )(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> key_event)</td></tr>
</table>
<hr /><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>The <code>PPB_KeyboardInputEvent</code> interface contains pointers to several functions related to keyboard input events. </p>
</div><hr /><h2>Field Documentation</h2>
<a class="anchor" id="a7f685c043948fdb5a166f5bf6a342e96"></a><!-- doxytag: member="PPB_KeyboardInputEvent::Create" ref="a7f685c043948fdb5a166f5bf6a342e96" args=")(PP_Instance instance, PP_InputEvent_Type type, PP_TimeTicks time_stamp, uint32_t modifiers, uint32_t key_code, struct PP_Var character_text, struct PP_Var code)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a>(* <a class="el" href="struct_p_p_b___keyboard_input_event__1__2.html#a7f685c043948fdb5a166f5bf6a342e96">PPB_KeyboardInputEvent::Create</a>)(<a class="el" href="group___typedefs.html#ga89b662403e6a687bb914b80114c0d19d">PP_Instance</a> instance, <a class="el" href="group___enums.html#gaca7296cfec99fcb6646b7144d1d6a0c5">PP_InputEvent_Type</a> type, <a class="el" href="group___typedefs.html#ga71cb1042cdeb38d7881b121f3b09ce94">PP_TimeTicks</a> time_stamp, uint32_t modifiers, uint32_t key_code, struct <a class="el" href="struct_p_p___var.html">PP_Var</a> character_text, struct <a class="el" href="struct_p_p___var.html">PP_Var</a> code)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Creates a keyboard input event with the given parameters. </p>
<p>Normally you will get a keyboard event passed through the HandleInputEvent and will not need to create them, but some applications may want to create their own for internal use. The type must be one of the keyboard event types.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">instance</td><td>The instance for which this event occurred.</td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>A <code>PP_InputEvent_Type</code> identifying the type of input event.</td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">time_stamp</td><td>A <code>PP_TimeTicks</code> indicating the time when the event occurred.</td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">modifiers</td><td>A bit field combination of the <code>PP_InputEvent_Modifier</code> flags.</td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">key_code</td><td>This value reflects the DOM KeyboardEvent <code>keyCode</code> field, which is the Windows-style Virtual Key code of the key.</td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">character_text</td><td>This value represents the typed character as a UTF-8 string.</td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">code</td><td>This value represents the DOM3 |code| string that corresponds to the physical key being pressed.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A <code>PP_Resource</code> containing the new keyboard input event. </dd></dl>
</div>
</div>
<a class="anchor" id="aaf9bb52daef6052c4f4bf4f84efee9d2"></a><!-- doxytag: member="PPB_KeyboardInputEvent::GetCharacterText" ref="aaf9bb52daef6052c4f4bf4f84efee9d2" args=")(PP_Resource character_event)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct <a class="el" href="struct_p_p___var.html">PP_Var</a>(* <a class="el" href="struct_p_p_b___keyboard_input_event__1__2.html#aaf9bb52daef6052c4f4bf4f84efee9d2">PPB_KeyboardInputEvent::GetCharacterText</a>)(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> character_event)<code> [read]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p><a class="el" href="struct_p_p_b___keyboard_input_event__1__2.html#aaf9bb52daef6052c4f4bf4f84efee9d2" title="GetCharacterText() returns the typed character as a UTF-8 string for the given character event...">GetCharacterText()</a> returns the typed character as a UTF-8 string for the given character event. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">character_event</td><td>A <code>PP_Resource</code> corresponding to a keyboard event.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A string var representing a single typed character for character input events. For non-character input events the return value will be an undefined var. </dd></dl>
</div>
</div>
<a class="anchor" id="a84c476e78ea7c066f9e89b5ae828ffa8"></a><!-- doxytag: member="PPB_KeyboardInputEvent::GetCode" ref="a84c476e78ea7c066f9e89b5ae828ffa8" args=")(PP_Resource key_event)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct <a class="el" href="struct_p_p___var.html">PP_Var</a>(* <a class="el" href="struct_p_p_b___keyboard_input_event__1__2.html#a84c476e78ea7c066f9e89b5ae828ffa8">PPB_KeyboardInputEvent::GetCode</a>)(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> key_event)<code> [read]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p><a class="el" href="struct_p_p_b___keyboard_input_event__1__2.html#a84c476e78ea7c066f9e89b5ae828ffa8" title="GetCode() returns the DOM |code| field for this keyboard event, as defined in the DOM3 Events spec: h...">GetCode()</a> returns the DOM |code| field for this keyboard event, as defined in the DOM3 Events spec: <a href="http://www.w3.org/TR/DOM-Level-3-Events/">http://www.w3.org/TR/DOM-Level-3-Events/</a>. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">key_event</td><td>The key event for which to return the key code.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The string that contains the DOM |code| for the keyboard event. </dd></dl>
</div>
</div>
<a class="anchor" id="a1862b7cf375179c7a990b61ffad1ce6a"></a><!-- doxytag: member="PPB_KeyboardInputEvent::GetKeyCode" ref="a1862b7cf375179c7a990b61ffad1ce6a" args=")(PP_Resource key_event)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint32_t(* <a class="el" href="struct_p_p_b___keyboard_input_event__1__2.html#a1862b7cf375179c7a990b61ffad1ce6a">PPB_KeyboardInputEvent::GetKeyCode</a>)(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> key_event)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p><a class="el" href="struct_p_p_b___keyboard_input_event__1__2.html#a1862b7cf375179c7a990b61ffad1ce6a" title="GetKeyCode() returns the DOM keyCode field for the keyboard event.">GetKeyCode()</a> returns the DOM keyCode field for the keyboard event. </p>
<p>Chrome populates this with the Windows-style Virtual Key code of the key.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">key_event</td><td>A <code>PP_Resource</code> corresponding to a keyboard event.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The DOM keyCode field for the keyboard event. </dd></dl>
</div>
</div>
<a class="anchor" id="ae3fed704fb8f527fb7fd94e8c34ac13a"></a><!-- doxytag: member="PPB_KeyboardInputEvent::IsKeyboardInputEvent" ref="ae3fed704fb8f527fb7fd94e8c34ac13a" args=")(PP_Resource resource)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group___enums.html#ga4f272d99be14aacafe08dfd4ef830918">PP_Bool</a>(* <a class="el" href="struct_p_p_b___keyboard_input_event__1__2.html#ae3fed704fb8f527fb7fd94e8c34ac13a">PPB_KeyboardInputEvent::IsKeyboardInputEvent</a>)(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> resource)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p><a class="el" href="struct_p_p_b___keyboard_input_event__1__2.html#ae3fed704fb8f527fb7fd94e8c34ac13a" title="IsKeyboardInputEvent() determines if a resource is a keyboard event.">IsKeyboardInputEvent()</a> determines if a resource is a keyboard event. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">resource</td><td>A <code>PP_Resource</code> corresponding to an event.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd><code>PP_TRUE</code> if the given resource is a valid input event. </dd></dl>
</div>
</div>
<hr />The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="ppb__input__event_8h.html">ppb_input_event.h</a></li>
</ul>
</div><!-- contents -->
</div>
{{/partials.standard_nacl_api}}