Class Keyboard
Represents a single hardware keyboard device. Used by the Input to report raw keyboard input events.
Namespace: FlaxEngine
Assembly: FlaxEngine.CSharp.dll
Syntax
[Unmanaged]
public class Keyboard : InputDevice
Constructors
Keyboard()
Properties
InputText
Gets the text entered during the current frame (Unicode format).
Declaration
[Unmanaged]
public string InputText { get; }
Property Value
System.String
|
IsAnyKeyDown
Checks if any keyboard key is currently pressed.
Declaration
[Unmanaged]
public bool IsAnyKeyDown { get; }
Property Value
System.Boolean
|
Methods
GetKey(KeyboardKeys)
Gets keyboard key state.
Declaration
[Unmanaged]
public bool GetKey(KeyboardKeys key)
Parameters
KeyboardKeys
key
Key ID to check. |
Returns
System.Boolean
True if user holds down the key identified by id, otherwise false. |
GetKeyDown(KeyboardKeys)
Gets keyboard key down state.
Declaration
[Unmanaged]
public bool GetKeyDown(KeyboardKeys key)
Parameters
KeyboardKeys
key
Key ID to check |
Returns
System.Boolean
True if user starts pressing down the key, otherwise false. |
GetKeyUp(KeyboardKeys)
Gets keyboard key up state.
Declaration
[Unmanaged]
public bool GetKeyUp(KeyboardKeys key)
Parameters
KeyboardKeys
key
Key ID to check |
Returns
System.Boolean
True if user releases the key, otherwise false. |