pressKey method
Future<void>
pressKey(
- KeyName key, {
- int count = 1,
- Set<
KeyModifier> modifiers = const {},
override
Presses key count times, each press bracketed by modifiers. Throws UnsupportedBackendAction when the backend has no keyboard.
Implementation
@override
Future<void> pressKey(KeyName key, {int count = 1, Set<KeyModifier> modifiers = const {}}) => _call({
'cmd': 'key',
'key': key.name,
'count': count,
'modifiers': [for (final m in modifiers) m.name],
}, extraMs: count * 40);