diff options
author | Diogo Franco (Kovensky) <diogomfranco@gmail.com> | 2013-07-21 22:27:58 -0300 |
---|---|---|
committer | Diogo Franco (Kovensky) <diogomfranco@gmail.com> | 2013-07-25 00:01:51 -0300 |
commit | 057467f6b33b9f7c942bd2327561b74e738285b7 (patch) | |
tree | f2afcf8f7684ef4bd31f352437e0c7b5811ad387 /travis-deps | |
parent | 2c07cb00360cb962d0bb543ce59ea028aa9e4e76 (diff) | |
download | mpv-057467f6b33b9f7c942bd2327561b74e738285b7.tar.bz2 mpv-057467f6b33b9f7c942bd2327561b74e738285b7.tar.xz |
getch2: Refactor/rewrite
Still uses termcap, but uses terminfo for loading the termcap database if
possible. Adds configure test to find terminfo; skips the termcap test
if terminfo is found since terminfo provides termcap.
Use termcap completely for special keys; if we can't get it from termcap
and it isn't one of the known fallbacks, we ignore its specialness and
treat as a sequence of UTF-8 codes.
Further hardcoded fallbacks can be added by calling keys_push_once in
load_termcap; there is no limit to the amount of keys pushed.
Uses the "ke" and "ks" capabilities to start / exit application mode, which
is necessary on vt100 emulators (including screen, xterm and all terminals
that emulate either of those) to correctly receive arrow keys.
It's now possible to compile getch2 even without termcap, though it won't
be of much use since it'll be unable to detect special keys.
Converted to 4 spaces per tab, prettified some statements.
Diffstat (limited to 'travis-deps')
0 files changed, 0 insertions, 0 deletions