Represents a keyboard device and provides methods to query its status. More...
Public Member Functions | |
| override int | GetHashCode () |
| Returns the hash code for this KeyboardDevice. | |
| override string | ToString () |
| Returns a System.String representing this KeyboardDevice. | |
Properties | |
| bool | this [Key key] [get, set] |
| Gets a value indicating the status of the specified Key. | |
| int | NumberOfKeys [get, set] |
| Gets an integer representing the number of keys on this KeyboardDevice. | |
| int | NumberOfFunctionKeys [get, set] |
| Gets an integer representing the number of function keys (F-keys) on this KeyboardDevice. | |
| int | NumberOfLeds [get, set] |
| Gets a value indicating the number of led indicators on this KeyboardDevice. | |
| IntPtr | DeviceID [get, set] |
| Gets an IntPtr representing a device dependent ID. | |
| bool | KeyRepeat [get, set] |
| Gets or sets a System.Boolean indicating key repeat status. | |
| string | Description [get, set] |
| Gets a System.String which describes this instance. | |
| InputDeviceType | DeviceType [get] |
| Gets the InputDeviceType for this instance. | |
Events | |
| EventHandler < KeyboardKeyEventArgs > | KeyDown |
| Occurs when a key is pressed. | |
| EventHandler < KeyboardKeyEventArgs > | KeyUp |
| Occurs when a key is released. | |
Represents a keyboard device and provides methods to query its status.
Definition at line 21 of file KeyboardDevice.cs.
| override int OpenTK.Input.KeyboardDevice.GetHashCode | ( | ) |
Returns the hash code for this KeyboardDevice.
Definition at line 174 of file KeyboardDevice.cs.
| override string OpenTK.Input.KeyboardDevice.ToString | ( | ) |
Returns a System.String representing this KeyboardDevice.
Definition at line 184 of file KeyboardDevice.cs.
00185 { 00186 //return base.ToString(); 00187 return String.Format("ID: {0} ({1}). Keys: {2}, Function keys: {3}, Leds: {4}", 00188 DeviceID, Description, NumberOfKeys, NumberOfFunctionKeys, NumberOfLeds); 00189 }
string OpenTK.Input.KeyboardDevice.Description [get, set] |
Gets a System.String which describes this instance.
Implements OpenTK.Input.IInputDevice.
Definition at line 155 of file KeyboardDevice.cs.
IntPtr OpenTK.Input.KeyboardDevice.DeviceID [get, set] |
Gets an IntPtr representing a device dependent ID.
Definition at line 98 of file KeyboardDevice.cs.
InputDeviceType OpenTK.Input.KeyboardDevice.DeviceType [get] |
Gets the InputDeviceType for this instance.
Implements OpenTK.Input.IInputDevice.
Definition at line 164 of file KeyboardDevice.cs.
bool OpenTK.Input.KeyboardDevice.KeyRepeat [get, set] |
Gets or sets a System.Boolean indicating key repeat status.
If KeyRepeat is true, multiple KeyDown events will be generated while a key is being held. Otherwise only one KeyDown event will be reported.
The rate of the generated KeyDown events is controlled by the Operating System. Usually, one KeyDown event will be reported, followed by a small (250-1000ms) pause and several more KeyDown events (6-30 events per second).
Set to true to handle text input (where keyboard repeat is desirable), but set to false for game input.
Definition at line 122 of file KeyboardDevice.cs.
int OpenTK.Input.KeyboardDevice.NumberOfFunctionKeys [get, set] |
Gets an integer representing the number of function keys (F-keys) on this KeyboardDevice.
Definition at line 80 of file KeyboardDevice.cs.
int OpenTK.Input.KeyboardDevice.NumberOfKeys [get, set] |
Gets an integer representing the number of keys on this KeyboardDevice.
Definition at line 71 of file KeyboardDevice.cs.
int OpenTK.Input.KeyboardDevice.NumberOfLeds [get, set] |
Gets a value indicating the number of led indicators on this KeyboardDevice.
Definition at line 89 of file KeyboardDevice.cs.
bool OpenTK.Input.KeyboardDevice.this[Key key] [get, set] |
Gets a value indicating the status of the specified Key.
| key | The Key to check. |
Definition at line 45 of file KeyboardDevice.cs.
| EventHandler<KeyboardKeyEventArgs> OpenTK.Input.KeyboardDevice.KeyDown |
Occurs when a key is pressed.
Definition at line 134 of file KeyboardDevice.cs.
| EventHandler<KeyboardKeyEventArgs> OpenTK.Input.KeyboardDevice.KeyUp |
Occurs when a key is released.
Definition at line 143 of file KeyboardDevice.cs.
1.6.1