tcell/terminfo
Graham Clark de4e5c4494 Fix control-character encoding for non-alphabet characters
@klamonte opened this issue against gowid, a package that relies on tcell for
all its terminal handling: https://github.com/gcla/gowid/issues/24. It
describes how a shell inside a terminal widget that the TUI launches freezes
when the user hits backspace. The TUI loads a tcell TermInfo struct for the
screen-256color terminal and that struct codes KeyBackspace as the single byte
0xff - and so the byte 0xff was sent to the tty. On my Ubuntu 19.04 machine,
`infocmp screen-256color` shows `kbs` is `^?` According to
https://en.wikipedia.org/wiki/Caret_notation, `^?` should map to 0x7f (127) -
"The digraph stands for the control character whose ASCII code is the same as
the character's ASCII code with the uppermost bit, in a 7-bit encoding,
reversed". This affects both mkinfo.go, the generator of the JSON terminfo
database files, and the dynamic terminfo generator.
2020-01-13 20:44:03 -08:00
..
a Add terminfo for Alacritty 2019-08-05 09:28:43 -07:00
b fixes #252 database cannot be distributed in static binary 2019-07-23 19:39:55 -07:00
base fixes #252 database cannot be distributed in static binary 2019-07-23 19:39:55 -07:00
c/cygwin fixes #252 database cannot be distributed in static binary 2019-07-23 19:39:55 -07:00
d fixes #252 database cannot be distributed in static binary 2019-07-23 19:39:55 -07:00
dynamic Fix control-character encoding for non-alphabet characters 2020-01-13 20:44:03 -08:00
e fixes #252 database cannot be distributed in static binary 2019-07-23 19:39:55 -07:00
extended Add terminfo for Alacritty 2019-08-05 09:28:43 -07:00
g/gnome fixes #252 database cannot be distributed in static binary 2019-07-23 19:39:55 -07:00
h fixes #252 database cannot be distributed in static binary 2019-07-23 19:39:55 -07:00
k fixes #252 database cannot be distributed in static binary 2019-07-23 19:39:55 -07:00
l/linux fixes #252 database cannot be distributed in static binary 2019-07-23 19:39:55 -07:00
p/pcansi fixes #252 database cannot be distributed in static binary 2019-07-23 19:39:55 -07:00
r/rxvt fixes #252 database cannot be distributed in static binary 2019-07-23 19:39:55 -07:00
s fixes #252 database cannot be distributed in static binary 2019-07-23 19:39:55 -07:00
t fixes #252 database cannot be distributed in static binary 2019-07-23 19:39:55 -07:00
v fixes #252 database cannot be distributed in static binary 2019-07-23 19:39:55 -07:00
w fixes #252 database cannot be distributed in static binary 2019-07-23 19:39:55 -07:00
x Add terminfo for kitty (#283) 2019-08-01 11:20:19 -07:00
.gitignore fixes #167 Break up the database 2017-11-24 13:13:06 -08:00
README.md Update README for new mkinfo 2019-07-29 22:47:04 -07:00
TERMINALS.md fixes #167 Break up the database 2017-11-24 13:13:06 -08:00
gen.sh fixes #252 database cannot be distributed in static binary 2019-07-23 19:39:55 -07:00
mkinfo.go Fix control-character encoding for non-alphabet characters 2020-01-13 20:44:03 -08:00
models.txt fixes #252 database cannot be distributed in static binary 2019-07-23 19:39:55 -07:00
terminfo.go fixes #252 database cannot be distributed in static binary 2019-07-23 19:39:55 -07:00
terminfo_test.go fixes #252 database cannot be distributed in static binary 2019-07-23 19:39:55 -07:00

README.md

This package represents the parent for all terminals.

In older versions of tcell we had (a couple of) different external file formats for the terminal database. Those are now removed. All terminal definitions are supplied by one of two methods:

  1. Compiled Go code

  2. For systems with terminfo and infocmp, dynamically generated at runtime.

The Go code can be generated using the mkinfo utility in this directory. The database entry should be generated into a package in a directory named as the first character of the package name. (This permits us to group them all without having a huge directory of little packages.)

It may be desirable to add new packages to the extended package, or -- rarely -- the base package.

Applications which want to have the large set of terminal descriptions built into the binary can simply import the extended package. Otherwise a smaller reasonable default set (the base package) will be included instead.