The KeyboardState type exposes the following members.
Constructors
Name | Description | |
---|---|---|
![]() | KeyboardState | Initializes a new instance of the KeyboardState class |
Methods
Name | Description | |
---|---|---|
![]() | Equals(Object) | (Overrides Object..::..Equals(Object).) |
![]() | Equals(KeyboardState) |
Returns true if the other keyboard state contains the same keys, has the same caps lock state
and time value.
|
![]() | Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode | (Overrides Object..::..GetHashCode()()()().) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | ToString | (Inherited from Object.) |
Operators
Name | Description | |
---|---|---|
![]() ![]() | Equality | |
![]() ![]() | Inequality |
Properties
Name | Description | |
---|---|---|
![]() | CapsLock |
Gets whether or not the caps lock is enabled.
|
![]() ![]() | Empty | |
![]() | KeyChars |
Returns all the pressed characters.
For example if the KeyCodes property contains SHIFT and A, this property will return 'A'
or if the KeyCodes property contains CTRL, ALT and Q, this property will return '@'
on a german keyboard.
|
![]() | KeyCodes |
Returns all the pressed keys.
|
![]() | Modifiers |
Returns all the pressed modifier keys in one enumeration.
|
![]() | Time |
Used to distinguish two keyboard states if they contain the same same key codes.
Useful if a key is pressed for a long time which should generate repeated key strokes.
|