type method

Future<void> type(
  1. String text
)

Types text, one KeyPressMsg per Unicode scalar value, as a terminal sends it (a space arrives as space, a newline as enter).

Implementation

Future<void> type(String text) => _sendAll([
      for (final rune in text.runes)
        ..._decode(utf8.encode(String.fromCharCode(rune))),
    ]);