KeyEmulator class
A singleton class for sending synthetic key events and typing text.
Constructors
- KeyEmulator.new()
-
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
dispose(
) → void -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
sendKey(
int keyCode, {bool press = true}) → void - Send a key event by platform-specific key code.
-
sendKeyByKey(
Key key, {bool press = true}) → void - Send a key event by Key.
-
sendShortcut(
Key mainKey, List< Key> modifiers, {Duration keyPressDuration = const Duration(milliseconds: 100), Duration delayBetweenKeys = const Duration(milliseconds: 50), Duration finalDelay = const Duration(milliseconds: 200)}) → Future<void> - Sends a keyboard shortcut with multiple modifier keys in a way that ensures proper recognition by the operating system.
-
toString(
) → String -
A string representation of this object.
inherited
-
typeText(
String text, {Duration delay = const Duration(milliseconds: 100)}) → Future< void> -
Types a full
text
string, emulating each character with optional delay.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- keyEventFKeyUp → const int