mpv/osdep
wm4 4b5c3ea7a7 terminal-unix: new input handling code
This is independent of terminfo/termcap, and supports more keys.
Originally, the goal was just extending the set of supported key
sequences, but since the terminfo stuff actually makes this much harder,
and since it's a big blob of bloated legacy crap, just drop it. Instead,
use hardcoded tables.

It's pretty easy to get on the same level as the old code (with fewer
LOC), and we avoid additional error situations, such as mallocs which
could fail (the old code just ignores malloc failures). We also try to
support some xterm escape sequences, which are in relatively widespread
use. (I'm not sure about the urxvt ones.)

Trying to deal with xterm shift/ctrl/alt modifiers is probably a bit
overcomplicated, and only deals with prefixes - xterm randomly uses
prefix sequences for some keys, and suffixes for others (what the heck).

Additionally, try to drop unknown escape codes. This basically relies
on a trick: in almost 100% of all situations, a read() call will
actually return complete sequences (possibly because of pipe semantics
and atomic writes from the terminal emulator?), so it's easy to drop
unknown sequences. This prevents that they trigger random key bindings
as the code interprets the part after ESC as normal keys.

This also drops the use of terminfo for sending smkx/rmkx. It seems
even vt100 (to which virtually everything non-legacy is reasonably
compatible with) supports the codes we hardcode, so it should be fine.

This commit actually changes only the code if terminfo/termcap are not
found. The next commit will make this code default.
2014-08-21 22:45:58 +02:00
..
ar
endian.h build: deal with endian mess 2014-07-10 00:58:56 +02:00
glob-win.c
io.c win32: emulate some ANSI terminal escape codes 2014-08-21 22:45:58 +02:00
io.h input: separate wakeup pipe creation into a separate function 2014-05-30 02:16:20 +02:00
macosx_application.h cocoa: move set_input_context to macosx_events 2014-08-06 09:31:58 +02:00
macosx_application.m cocoa: move handleFilesArray: to macosx_events 2014-08-06 09:31:58 +02:00
macosx_application_objc.h cocoa: move handleFilesArray: to macosx_events 2014-08-06 09:31:58 +02:00
macosx_compat.h cocoa: fix compilation on OS X 10.8 2014-07-14 07:21:44 +02:00
macosx_events.h cocoa: move set_input_context to macosx_events 2014-08-06 09:31:58 +02:00
macosx_events.m cocoa: move handleFilesArray: to macosx_events 2014-08-06 09:31:58 +02:00
macosx_events_objc.h cocoa: move handleFilesArray: to macosx_events 2014-08-06 09:31:58 +02:00
macosx_versions.h cocoa: fix compilation on OS X 10.8 2014-07-14 07:21:44 +02:00
mpv.exe.manifest
mpv.rc
numcores.c
numcores.h
path-macosx.m config: use the same signature for win32/OSX specific path functions 2014-06-26 19:56:45 +02:00
path-win.c config: use the same signature for win32/OSX specific path functions 2014-06-26 19:56:45 +02:00
path.h config: use the same signature for win32/OSX specific path functions 2014-06-26 19:56:45 +02:00
terminal-unix.c terminal-unix: new input handling code 2014-08-21 22:45:58 +02:00
terminal-win.c terminal-win: read input from a thread 2014-08-21 22:45:58 +02:00
terminal.h terminal: some cleanups 2014-08-21 22:45:58 +02:00
threads.c threads: use mpv time for mpthread_cond_timedwait wrapper 2014-05-18 19:20:32 +02:00
threads.h threads: use mpv time for mpthread_cond_timedwait wrapper 2014-05-18 19:20:32 +02:00
timer-darwin.c
timer-linux.c
timer-win2.c
timer.c timer: remove unneeded time_t overflow check 2014-05-24 16:17:45 +02:00
timer.h threads: use mpv time for mpthread_cond_timedwait wrapper 2014-05-18 19:20:32 +02:00
w32_keyboard.c
w32_keyboard.h
win32-console-wrapper.c