-
-
Notifications
You must be signed in to change notification settings - Fork 346
Description
It seems that terminals have different ways to report keypad keys when in CSI-u mode: ghostty reports them as their text (ASCII) equivalents, but iTerm2 and Alacritty report them as the private-area codes from this table. I'm not really sure which one is more correct, the spec is a little ambiguous about this (the Disambiguate escape codes section only mentions non-text keypad keys).
So currently, when pressing '0' on the keypad in iTerm2, tcell clients receive an event with KeyRune and a Str value of \ue037, which is not useful; these should be translated to their ASCII equivalents. Similarly, keypad enter is returned as KeyRune and Str \ue046, whereas I would expect to get KeyEnter. (I can translate these client-side of course, but I feel I shouldn't have to.)
I saw this TODO comment in the code, but this would only solve half the problem. This table is about non-text keypad keys (e.g. clear and enter), but the printable ones would need another translation table.