Difference between revisions of "PlugIn Development:GameEx Input Keyboard Function"
Jump to navigation
Jump to search
(→C#) |
|||
Line 21: | Line 21: | ||
=== <span class="plugin_text_fx">VB.NET</span> === | === <span class="plugin_text_fx">VB.NET</span> === | ||
<pre class=" | <pre class="code_vb"> | ||
Public Function Input_Keyboard(ByVal code As Integer, ByVal usingdirectinput As Boolean) As Boolean | Public Function Input_Keyboard(ByVal code As Integer, ByVal usingdirectinput As Boolean) As Boolean | ||
Return True | Return True | ||
Line 27: | Line 27: | ||
=== <span class="plugin_text_fx">C#</span> === | === <span class="plugin_text_fx">C#</span> === | ||
<pre class=" | <pre class="code_cs"> | ||
public bool Input_Keyboard(int code, bool usingdirectinput) | public bool Input_Keyboard(int code, bool usingdirectinput) | ||
{ | { |
Latest revision as of 07:15, 28 April 2014
This function is called when the user presses a button on the keyboard.
PLEASE NOTE: This function only fires when the GameEx UI is visible.
Parameters
Code [integer]: The key code of the button pressed.
UsingDirectInput [boolean]: Specifies the Direct Input method.
Parameter Values
The Code integer is a constant, based on the key codes used by Windows. You can learn more about the various vKey codes at MSDN.
The UsingDirectInput boolean is passed as true if Direct Input mode has been detected.
Returns
This function returns a boolean value.
Return Values
Return true and GameEx will process the keyboard key.
Return false and GameEx will not process keyboard key.
Code Examples
VB.NET
Public Function Input_Keyboard(ByVal code As Integer, ByVal usingdirectinput As Boolean) As Boolean Return True End Function
C#
public bool Input_Keyboard(int code, bool usingdirectinput) { return true; }