Class KeyboardDispatcher
Inheritance
KeyboardDispatcher
Namespace: Evergine.Common.Input.Keyboard
Assembly: Evergine.Common.dll
Syntax
public abstract class KeyboardDispatcher
Constructors
KeyboardDispatcher()
Initializes a new instance of the KeyboardDispatcher class.
Declaration
public KeyboardDispatcher()
Methods
DispatchEvents()
Dispatches accumulated events.
Declaration
public void DispatchEvents()
HandleKeyChar(char)
Handles the given character event.
Declaration
protected void HandleKeyChar(char character)
Parameters
Type | Name | Description |
---|---|---|
char | character | The character. |
HandleKeyChar(string)
Handles the given character event.
Declaration
protected void HandleKeyChar(string characters)
Parameters
Type | Name | Description |
---|---|---|
string | characters | The characters. |
HandleKeyDown(Keys)
Handles the down event of the given key.
Declaration
protected void HandleKeyDown(Keys key)
Parameters
Type | Name | Description |
---|---|---|
Keys | key | The key. |
HandleKeyUp(Keys)
Handles the key up event of the given key.
Declaration
protected void HandleKeyUp(Keys key)
Parameters
Type | Name | Description |
---|---|---|
Keys | key | The key. |
IsKeyDown(Keys)
Declaration
public bool IsKeyDown(Keys key)
Parameters
Type | Name | Description |
---|---|---|
Keys | key | The key to be checked. |
Returns
Type | Description |
---|---|
bool |
|
ReadKeyState(Keys)
Gets the current state of a keyboard key.
Declaration
public ButtonState ReadKeyState(Keys key)
Parameters
Type | Name | Description |
---|---|---|
Keys | key | The key to check. |
Returns
Type | Description |
---|---|
ButtonState | The state of the specified key. |
ResetKeyboardStatus()
Resets the current key statuses for the dispatcher.
Declaration
protected void ResetKeyboardStatus()
Events
KeyChar
Occurs when a key is pressed, and a character is generated.
Declaration
public event EventHandler<KeyCharEventArgs> KeyChar
Event Type
Type | Description |
---|---|
EventHandler<KeyCharEventArgs> |
KeyDown
Occurs when a key is pressed.
Declaration
public event EventHandler<KeyEventArgs> KeyDown
Event Type
Type | Description |
---|---|
EventHandler<KeyEventArgs> |
KeyUp
Occurs when a key is released.
Declaration
public event EventHandler<KeyEventArgs> KeyUp
Event Type
Type | Description |
---|---|
EventHandler<KeyEventArgs> |