press method
Presses a whole KeySequence the way a terminal delivers it: a bare
printable step arrives as typed text, a chord or special step as a key
event. So press(.d.d) sends two TextInputEvents and press(.ctrl.s)
a single KeyEvent, exercising the real text-vs-key routing rather than
a synthetic shortcut. Multi-step sequences dispatch their steps in order,
completing the sequence in the dispatcher.
Implementation
void press(KeySequence sequence) {
_assertNotDisposed('press');
_openFrame();
for (final event in sequence.asInputEvents()) {
_dispatcher.dispatch(event);
}
_owner.flushBuild();
}