|
|
|
|
|
by rockorager
753 days ago
|
|
> Do you still need terminfo? It depends. If you just want to style some text and maybe do some basic cursor operations: probably not. If you want to use more advanced operations or read key input: probably yes. I disagree. The vast majority of terminals will send the same sequences. There is almost never a case where handling the two options for backspace the same way will result in a bad user experience. What complicates this even more is that many terminals allow the user to modify which sequence the `Backspace` key sends (0x08 vs 0x7F). Any application relying on terminfo, where a user did not modify their terminfo entry, will interpret these wrong if a user has manually changed it. Terminfo is not needed anymore. It served a purpose to let applications know how to talk to a terminal. That era is gone. |
|
Not for function keys in particular not for the modifiers. Just take a look at the output of 'infocmp' between your favorite terminal and your favorite terminal with tmux running in it or even just a different terminal itself.
Another issue is knowing capabilities, total number of colors, allowed attributes, default state of attributes, allowed actions when certain attributes are enabled or disabled.
There's about half of the definitions which are common across almost all modern terminals, and the other half are unique and describe unique implementation details of the emulator.