Class KeyboardDeviceExtensions
public static class KeyboardDeviceExtensions
- Inheritance
-
KeyboardDeviceExtensions
Methods
IsKeyDown(IKeyboardDevice, Keys)
Determines whether the specified key is being pressed down
public static bool IsKeyDown(this IKeyboardDevice keyboardDevice, Keys key)
Parameters
keyboardDevice
IKeyboardDeviceThe keyboard
key
KeysThe key
Returns
- bool
true
if the specified key is being pressed down; otherwise,false
.
IsKeyPressed(IKeyboardDevice, Keys)
Determines whether the specified key is pressed since the previous update.
public static bool IsKeyPressed(this IKeyboardDevice keyboardDevice, Keys key)
Parameters
keyboardDevice
IKeyboardDeviceThe keyboard
key
KeysThe key
Returns
- bool
true
if the specified key is pressed; otherwise,false
.
IsKeyReleased(IKeyboardDevice, Keys)
Determines whether the specified key is released since the previous update.
public static bool IsKeyReleased(this IKeyboardDevice keyboardDevice, Keys key)
Parameters
keyboardDevice
IKeyboardDeviceThe keyboard
key
KeysThe key
Returns
- bool
true
if the specified key is released; otherwise,false
.