From 1cd1fb9e5c39aa858b4f456ce92b506e5f50b768 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 13 Jan 2014 23:12:14 +0100 Subject: [PATCH] terminal-unix: add fallback for enter key This worked just fine if terminfo or termcap was available. --- osdep/terminal-unix.c | 3 +++ 1 file changed, 3 insertions(+) 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; }