Class KeyboardDispatcher
Inheritance
KeyboardDispatcher
Inherited Members
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()
Dispatch accumulated events.
Declaration
public void DispatchEvents()
HandleKeyChar(char)
Handle the given character event.
Declaration
protected void HandleKeyChar(char character)
Parameters
Type | Name | Description |
---|---|---|
char | character | The character. |
HandleKeyChar(string)
Handle the given characters event.
Declaration
protected void HandleKeyChar(string characters)
Parameters
Type | Name | Description |
---|---|---|
string | characters | The characters. |
HandleKeyDown(Keys)
Handle the down event of the given key.
Declaration
protected void HandleKeyDown(Keys key)
Parameters
Type | Name | Description |
---|---|---|
Keys | key | The key. |
HandleKeyUp(Keys)
Handle the 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 be checked. |
Returns
Type | Description |
---|---|
ButtonState | The state of the specified key. |
ResetKeyboardStatus()
Resets current keys status for 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> |