AlecAivazis / survey

A golang library for building interactive and accessible prompts with full support for windows and posix terminals.
MIT License
4.07k stars 351 forks source link

fix: smkx keypad-transmit mode #367

Closed ldez closed 2 years ago

ldez commented 2 years ago

To see the difference between normal/application modes, consider this example:

  • In normal (non-application) mode, the terminal transmits a down-arrow as \E[C, which happens to echo as a down-arrow.
  • In application mode the terminal transmits \EOC, which echoes as C. That is because the \EO is the SS3 control, which says to use the character from the G3 character set for the next cell.

https://invisible-island.net/xterm/xterm.faq.html#xterm_arrows

ESC = Application Keypad (DECKPAM).

ESC > Normal Keypad (DECKPNM), VT100.

https://invisible-island.net/xterm/ctlseqs/ctlseqs.html

See https://vt100.net/docs/vt102-ug/appendixc.html

Fix #228 Fix #341

AlecAivazis commented 2 years ago

Fantastic - thanks for getting this through everyone.

Sorry i wasn't able to contribute much to the conversation but it seems you guys got to a reallly nice spot. I'll merge this once the actions gives us a 👍