pyte icon indicating copy to clipboard operation
pyte copied to clipboard

Missing the '=' and '>' control codes

Open kfreezen opened this issue 5 years ago • 3 comments

I ran across this bug while using pyte to strip control codes from output for an expectation script. The two codes are

  • DECKPAM - Set alternate keypad mode
  • DECKPNM - Set alternate numeric keypad mode

I suspect my terminal inserts the DECKPAM code because I use a non-QWERTY keyboard layout.

kfreezen avatar Jan 15 '21 20:01 kfreezen

This issue affects applications interacting with FISH Shell 4.0+, which sends \x1b[=0u and \x1b[=5u sequences by default.

related with: https://github.com/fish-shell/fish-shell/issues/11054

implementation details: https://sw.kovidgoyal.net/kitty/keyboard-protocol/

It causes Terminus package for Sublime Text to display misterious 0u and 5u characters in terminal output.

see: https://forum.sublimetext.com/t/latest-dev-builds-broke-terminus-with-fish-shell/75587/6

deathaxe avatar Apr 17 '25 08:04 deathaxe

Feel free to send a PR adding them.

superbobry avatar Apr 17 '25 10:04 superbobry

It turns out alternative keyboard modes being unrelated with keypad mode escape sequences.

While keypad mode is controlled via ESC = and ESC >, keyboard modes use CSI =, CSI < and CSI >.

deathaxe avatar Apr 18 '25 11:04 deathaxe