holdKey method

void holdKey(
  1. KeySelector key, {
  2. Set<KeyModifier> modifiers = const {},
})

Presses key down (without releasing) — the start of a held-key scenario. Requires keyboardCapabilities with held-state support for the session to track it.

Implementation

void holdKey(KeySelector key, {Set<KeyModifier> modifiers = const {}}) {
  _assertNotDisposed('holdKey');
  _openFrame();
  _dispatcher.dispatch(_lifecycleEvent(key, KeyEventType.down, modifiers));
  _owner.flushBuild();
}