Class KeyboardInput
Keyboard Input class
public static class KeyboardInput : Object
- Inheritance
-
KeyboardInput
Properties
AnyKeyPressed
Check if any key was just pressed
public static bool AnyKeyPressed { get; }
Property Value
AnyKeyReleased
Check if any key was just released
public static bool AnyKeyReleased { get; }
Property Value
Methods
InvokeKeyDown(Keys)
Invoke KeyDown event handlers
public static void InvokeKeyDown(Keys keys)
Parameters
keysKeys
InvokeKeyUp(Keys)
Invoke KeyUp event handlers
public static void InvokeKeyUp(Keys keyCode)
Parameters
keyCodeKeys
IsKeyDown(Keys)
Check the if the given key from keyboard is down
public static bool IsKeyDown(Keys keyCode)
Parameters
keyCodeKeysKeyboard key (Q, W, A, S, Space, etc)
Returns
IsKeyPressed(Keys)
Check the if the given key was just pressed
public static bool IsKeyPressed(Keys keyCode)
Parameters
keyCodeKeysKeyboard key (Q, W, A, S, Space, etc)
Returns
- bool
Return true if the key was just pressed
IsKeyReleased(Keys)
Check the if the given key was just released
public static bool IsKeyReleased(Keys keyCode)
Parameters
keyCodeKeysKeyboard key (Q, W, A, S, Space, etc)
Returns
- bool
Return true if the key was just released
IsKeyUp(Keys)
Check the if the given key from keyboard is up
public static bool IsKeyUp(Keys keyCode)
Parameters
keyCodeKeysKeyboard key (Q, W, A, S, Space, etc)
Returns
- bool
Return true if the key is not pressed