PlugIn Development:GameEx Input Keyboard Function: Difference between revisions

From Spesoft/GameEx Wiki
Jump to navigation Jump to search
Adultery (talk | contribs)
No edit summary
Adultery (talk | contribs)
Line 8: Line 8:


=== <span style="color:#003300;">VB.NET</span> ===
=== <span style="color:#003300;">VB.NET</span> ===
----
<pre style="font-family:'Lucida Console', Monaco, monospace; border-color:#003300; background-color:#E0EEE0; border-style:solid;">
<pre style="font-family:'Lucida Console', Monaco, monospace; border-color:#003300; background-color:#E0EEE0; border-style:solid;">
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
Line 14: Line 15:


=== <span style="color:#003300;">C#</span> ===
=== <span style="color:#003300;">C#</span> ===
----
<pre style="font-family:'Lucida Console', Monaco, monospace; border-color:#003300; background-color:#E0EEE0; border-style:solid;">
<pre style="font-family:'Lucida Console', Monaco, monospace; border-color:#003300; background-color:#E0EEE0; border-style:solid;">
public bool Input_Keyboard(int code, bool usingdirectinput)
public bool Input_Keyboard(int code, bool usingdirectinput)

Revision as of 06:42, 27 April 2014

This function is called when you press a button on the keyboard. You can return TRUE to continue processing the event or return FALSE and GameEx will not initialize the keyboard event. The Code and UsingDirectInput parameters are passed as the user presses a keyboard key.

PLEASE NOTE: This function only fires when the GameEx UI is visible.

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;
}