terminal-unix: add fallback for enter key

This worked just fine if terminfo or termcap was available.
This commit is contained in:
wm4 2014-01-13 23:12:14 +01:00
parent d52fc906c3
commit 1cd1fb9e5c
1 changed files with 3 additions and 0 deletions

View File

@ -337,6 +337,9 @@ static int load_termcap(char *termtype){
/* mintty uses this instead of the "K2" cap for keypad center */ /* mintty uses this instead of the "K2" cap for keypad center */
keys_push_once("\033OE", MP_KEY_KP5); 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; return getch2_keys.len;
} }