mpv/osdep
wm4 602384348e terminal: attempt to handle the ESC key
Due to Unix being legacy garbage, it's not possible to safely detect the
ESC key on terminal. The key sequences are ambiguous. The code for the
ESC key also starts the sequences for other special keys.

Until now, you needed to hit ESC twice for it to be recognized.

Attempt to handle this better by using a timeout to detect the key. If
ESC is in the input buffer, but nothing else arrived after a timeout,
assume it's the ESC key. I think this is the method vim uses. Currently,
the timeout is set at 100ms. This is hardcoded and cannot be changed.
It's possible that this causes problems on slow ssh connections or so.

I'm not sure what exactly happens if you manage to get ESC + another
normal key into the input buffer. If it's a known sequence, it will be
matched and interpreted as such. If not, it'll probably be discarded.
2020-09-17 15:31:19 +02:00
..
android
macos mac: use config cache und wakeup for mac option runtime changes 2020-08-22 14:22:49 +02:00
win32
atomic.h
compiler.h
endian.h
getpid.h
glob-win.c
io.c win32: scripting utils.get_env_list(): use UTF-8 2020-08-16 12:24:19 +03:00
io.h win32: scripting utils.get_env_list(): use UTF-8 2020-08-16 12:24:19 +03:00
macOS_swift_bridge.h
macosx_application.h
macosx_application.m
macosx_application_objc.h
macosx_compat.h
macosx_events.h
macosx_events.m
macosx_events_objc.h
macosx_menubar.h
macosx_menubar.m
macosx_menubar_objc.h
macosx_touchbar.h
macosx_touchbar.m
macosx_versions.h
main-fn-cocoa.c
main-fn-unix.c
main-fn-win.c
main-fn.h
mpv.exe.manifest
mpv.rc
path-macosx.m
path-unix.c
path-uwp.c
path-win.c
path.h
polldev.c
polldev.h
semaphore.h
semaphore_osx.c
strnlen.h
subprocess-dummy.c
subprocess-posix.c command: extend subprocess command stdin, change behavior 2020-08-16 02:54:44 +02:00
subprocess-win.c
subprocess.c
subprocess.h command: extend subprocess command stdin, change behavior 2020-08-16 02:54:44 +02:00
terminal-dummy.c
terminal-unix.c terminal: attempt to handle the ESC key 2020-09-17 15:31:19 +02:00
terminal-win.c
terminal.h
threads.c
threads.h
timer-darwin.c
timer-linux.c
timer-win2.c
timer.c
timer.h
w32_keyboard.c
w32_keyboard.h
win32-console-wrapper.c
windows_utils.c
windows_utils.h