KeyboardService class
A service class for querying the current state of the hardware keyboard.
This class provides utility methods to check if specific keys or key combinations (like Ctrl or Shift) are currently being pressed.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isCtrlPressed → bool
-
Returns
true
if either Ctrl key or the Meta key is currently pressed.no setter - isShiftPressed → bool
-
Returns
true
if either Shift key is currently pressed.no setter - keyboard → HardwareKeyboard
-
The current instance of the hardware keyboard.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
isKeyPressed(
LogicalKeyboardKey key) → bool -
Checks if a specific
key
is currently being pressed. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited