Native keyboard implementation using a windows hook.
View code on GitHub
Inheritance Hierarchy
DeltaEngine.Entities UpdateBehavior
DeltaEngine.Input InputDevice
DeltaEngine.Input Keyboard
DeltaEngine.Input.Windows WindowsKeyboard
Namespace: DeltaEngine.Input.Windows
Assembly: DeltaEngine.Input.Windows (in DeltaEngine.Input.Windows.dll) Version: 1.1.1.0 (1.1.1)
Syntax
The WindowsKeyboard type exposes the following members.
Constructors
Name | Description | |
---|---|---|
WindowsKeyboard | Initializes a new instance of the WindowsKeyboard class |
Methods
Name | Description | |
---|---|---|
Dispose | (Overrides InputDevice Dispose .) | |
GetKeyState | (Inherited from Keyboard.) | |
HandleInput | (Inherited from Keyboard.) | |
Update | (Inherited from Keyboard.) | |
UpdateKeyStates | (Overrides Keyboard UpdateKeyStates .) |
Fields
Name | Description | |
---|---|---|
keyboardStates | (Inherited from Keyboard.) | |
newlyPressedKeys | (Inherited from Keyboard.) | |
pressedKeys | ||
releasedKeys |
Properties
Name | Description | |
---|---|---|
IsAvailable | (Inherited from Keyboard.) | |
IsCapsLocked | (Overrides Keyboard IsCapsLocked.) |
Remarks
Examples
[Test, CloseAfterFirstFrame] public void UpdateKeyboard() { var trigger = new KeyTrigger(Key.A); keyboard.Update(new[]{trigger});
[Test, CloseAfterFirstFrame] public void DisposeSetsUnavailable() { keyboard.Dispose(); Assert.IsFalse(keyboard.IsAvailable); }
[Test, CloseAfterFirstFrame] public void UpdateKeyStates() { var mockKeyboard = new MockWindowsKeyboard(); mockKeyboard.SetPressedKey(Key.A); var triggerPressing = new KeyTrigger(Key.A); mockKeyboard.Update(new[] { triggerPressing });
See Also