Holds the state of keystrokes by a keyboard.
More...
Holds the state of keystrokes by a keyboard.
Definition at line 9 of file KeyboardState.cs.
| Shift.Input.KeyboardState.KeyboardState |
( |
Keys[] |
keys, |
|
|
bool |
capsLock = false, |
|
|
bool |
numLock = false |
|
) |
| |
|
inline |
Initializes a new instance of the KeyboardState class.
- Parameters
-
| keys | List of keys to be flagged as pressed on initialization. |
| capsLock | Caps Lock state. |
| numLock | Num Lock state. |
Definition at line 117 of file KeyboardState.cs.
| Shift.Input.KeyboardState.KeyboardState |
( |
params Keys[] |
keys | ) |
|
|
inline |
Initializes a new instance of the KeyboardState class.
- Parameters
-
| keys | List of keys to be flagged as pressed on initialization. |
Definition at line 140 of file KeyboardState.cs.
| override bool Shift.Input.KeyboardState.Equals |
( |
object |
obj | ) |
|
|
inline |
Compares whether current instance is equal to specified object.
- Parameters
-
- Returns
- true if the provided KeyboardState instance is same with current; false otherwise.
Definition at line 276 of file KeyboardState.cs.
| override int Shift.Input.KeyboardState.GetHashCode |
( |
| ) |
|
|
inline |
| Keys [] Shift.Input.KeyboardState.GetPressedKeys |
( |
| ) |
|
|
inline |
Returns an array of values holding keys that are currently being pressed.
- Returns
- The keys that are currently being pressed.
Definition at line 212 of file KeyboardState.cs.
| void Shift.Input.KeyboardState.InternalClearAllKeys |
( |
| ) |
|
|
inline |
| void Shift.Input.KeyboardState.InternalClearKey |
( |
Keys |
key | ) |
|
|
inline |
| bool Shift.Input.KeyboardState.InternalGetKey |
( |
Keys |
key | ) |
|
|
inline |
| void Shift.Input.KeyboardState.InternalSetKey |
( |
Keys |
key | ) |
|
|
inline |
| bool Shift.Input.KeyboardState.IsKeyDown |
( |
Keys |
key | ) |
|
|
inline |
Gets whether given key is currently being pressed.
- Parameters
-
- Returns
- true if the key is pressed; false otherwise.
Definition at line 174 of file KeyboardState.cs.
| bool Shift.Input.KeyboardState.IsKeyUp |
( |
Keys |
key | ) |
|
|
inline |
Gets whether given key is currently being not pressed.
- Parameters
-
- Returns
- true if the key is not pressed; false otherwise.
Definition at line 184 of file KeyboardState.cs.
Compares whether two KeyboardState instances are not equal.
- Parameters
-
- Returns
- true if the instances are different; false otherwise.
Definition at line 266 of file KeyboardState.cs.
Compares whether two KeyboardState instances are equal.
- Parameters
-
- Returns
- true if the instances are equal; false otherwise.
Definition at line 248 of file KeyboardState.cs.
| Keys [] Shift.Input.KeyboardState.empty = new Keys[0] |
|
static |
| uint Shift.Input.KeyboardState.keys0 |
| uint Shift.Input.KeyboardState.keys1 |
| uint Shift.Input.KeyboardState.keys2 |
| uint Shift.Input.KeyboardState.keys3 |
| uint Shift.Input.KeyboardState.keys4 |
| uint Shift.Input.KeyboardState.keys5 |
| uint Shift.Input.KeyboardState.keys6 |
| uint Shift.Input.KeyboardState.keys7 |
| bool Shift.Input.KeyboardState.CapsLock |
|
getset |
Gets the current state of the Caps Lock key.
Definition at line 85 of file KeyboardState.cs.
| bool Shift.Input.KeyboardState.NumLock |
|
getset |
Gets the current state of the Num Lock key.
Definition at line 90 of file KeyboardState.cs.
Returns the state of a specified key.
- Parameters
-
- Returns
- The state of the key.
Definition at line 165 of file KeyboardState.cs.
The documentation for this struct was generated from the following file: