-
Notifications
You must be signed in to change notification settings - Fork 291
Closed
Labels
feature-requestRequests for new WASI APIsRequests for new WASI APIs
Description
Along with ANSI escape sequences for display, we should also consider escape sequences for input, so that arrow keys, function keys, page-up/page-down/home/end/etc. can be used.
Assuming we take the approach in #162 of avoiding exposing the termcap/terminfo/TERM information to applications, it seems logical to the same thing for inputs, and just define escape sequences used by WASI, and have implementations translate into those sequences.
At the risk of being too cute, in the Unicode era, we could have quite descriptive sequences, something like this:
Escape sequence | Meaning |
---|---|
␛↑ | up arrow |
␛← | left arrow |
␛↓ | down arrow |
␛→ | right arrow |
␛⁽¹⁾ | F1 |
␛⁽¹²⁾ | F12 |
␛⌦ | Delete |
␛⎀ | Insert |
and so on, with "␛" here representing an actual ESC control character, so we can distinguish between the user entering a literal unicode symbol and pressing one of these special keys.
igrep
Metadata
Metadata
Assignees
Labels
feature-requestRequests for new WASI APIsRequests for new WASI APIs