summaryrefslogtreecommitdiffstats
path: root/osdep
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-01-13 23:12:14 +0100
committerwm4 <wm4@nowhere>2014-01-13 23:12:14 +0100
commit1cd1fb9e5c39aa858b4f456ce92b506e5f50b768 (patch)
tree0babb24bd1f6a5e45a21d2ddc2cc5a39fcc35cdc /osdep
parentd52fc906c33287e7f2f0ea1cab76d4834f31dbae (diff)
downloadmpv-1cd1fb9e5c39aa858b4f456ce92b506e5f50b768.tar.bz2
mpv-1cd1fb9e5c39aa858b4f456ce92b506e5f50b768.tar.xz
terminal-unix: add fallback for enter key
This worked just fine if terminfo or termcap was available.
Diffstat (limited to 'osdep')
-rw-r--r--osdep/terminal-unix.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/osdep/terminal-unix.c b/osdep/terminal-unix.c
index b3fc734f46..2991141cc5 100644
--- a/osdep/terminal-unix.c
+++ b/osdep/terminal-unix.c
@@ -337,6 +337,9 @@ static int load_termcap(char *termtype){
/* mintty uses this instead of the "K2" cap for keypad center */
keys_push_once("\033OE", MP_KEY_KP5);
+ /* fallback if terminfo and termcap are not available */
+ keys_push_once("\012", MP_KEY_ENTER);
+
return getch2_keys.len;
}