Provides a way to fetch the current input values from a Keyboard device (virtual or real).
View code on GitHub
Inheritance Hierarchy
DeltaEngine.Entities UpdateBehavior
DeltaEngine.Input InputDevice
DeltaEngine.Input Keyboard
DeltaEngine.Input.GLFW2 GLFWKeyboard
DeltaEngine.Input.GLFW3 GLFWKeyboard
DeltaEngine.Input.Mocks MockKeyboard
DeltaEngine.Input.SharpDX SharpDXKeyboard
DeltaEngine.Input.SlimDX SlimDXKeyboard
DeltaEngine.Input.Windows WindowsKeyboard
DeltaEngine.Input.Xna XnaKeyboard
Namespace: DeltaEngine.Input
Assembly: DeltaEngine.Input (in DeltaEngine.Input.dll) Version: 1.1.1.0 (1.1.1)
Syntax
The Keyboard type exposes the following members.
Constructors
Name | Description | |
---|---|---|
Keyboard | Initializes a new instance of the Keyboard class |
Methods
Name | Description | |
---|---|---|
Dispose | (Inherited from InputDevice.) | |
GetKeyState | ||
HandleInput | ||
Update | (Overrides UpdateBehavior Update(IEnumerable Entity ).) | |
UpdateKeyStates |
Fields
Name | Description | |
---|---|---|
keyboardStates | ||
newlyPressedKeys |
Properties
Name | Description | |
---|---|---|
IsAvailable | (Overrides InputDevice IsAvailable.) | |
IsCapsLocked |
Remarks
Examples
[Test] public void CanCreateKeyboardMessageWithoutParameter() { keyboardMessage = new KeyboardMessage(); Assert.NotNull(keyboardMessage); }
[Test] public void PressedKeyShouldBeEnter() { Assert.AreEqual(new[] { Key.Enter }, keyboardMessage.PressedKeys); }
[TestFixtureTearDown] public void Dispose() { keyboard.Dispose(); }
See Also