gdamore / tcell

Tcell is an alternate terminal package, similar in some ways to termbox, but better in others.
Apache License 2.0
4.56k stars 308 forks source link

Broken backtab key on st. #309

Closed Sacules closed 4 years ago

Sacules commented 4 years ago

Before 1.3.0, Shift+Tab would be properly detected on st and return 78 and Backtab on tcell.EventKey.Key() and tcell.EventKey.Name() respectively, but now I get 256 and Alt+Rune[[].

gdamore commented 4 years ago

Probably I didn’t have a current terminfo for this when I regenerated the database.

Bios-Marcel commented 4 years ago

Hey @gdamore , we are facing a similar problem in the following issue: https://github.com/Bios-Marcel/cordless/issues/247

In our case it's not Shift+Tab though, but Alt+ArrowKey, which also just gives us Alt+KeyRune.

gdamore commented 4 years ago

I think #369 will address the Alt key mixing with arrow keys.

I'm less confident of Shift Tab.

gdamore commented 4 years ago

So it appears that the "st" terminfo entry lacks kcbt -- which means that we don't encode back tab. This is unfortunate -- we need a more complete terminal definition for it.

gdamore commented 4 years ago

So good news, the git repo for st does have a useful definition that includes kcbt.