diff options
Diffstat (limited to 'ScreenManager.c')
-rw-r--r-- | ScreenManager.c | 28 |
1 files changed, 6 insertions, 22 deletions
diff --git a/ScreenManager.c b/ScreenManager.c index a33d3420..db3fdee4 100644 --- a/ScreenManager.c +++ b/ScreenManager.c @@ -189,6 +189,7 @@ void ScreenManager_run(ScreenManager* this, Panel** lastFocus, int* lastKey) { } int prevCh = ch; + ESCDELAY = 25; ch = getch(); HandlerResult result = IGNORED; @@ -244,28 +245,11 @@ void ScreenManager_run(ScreenManager* this, Panel** lastFocus, int* lastKey) { redraw = false; continue; } - else if (ch == 27) { - int ch2 = getch(); - if (ch2 != ERR) { - switch(ch2) - { - case 'h': - ch = KEY_LEFT; - break; - case 'j': - ch = KEY_DOWN; - break; - case 'k': - ch = KEY_UP; - break; - case 'l': - ch = KEY_RIGHT; - break; - default: - ungetch(ch2); - break; - } - } + switch (ch) { + case KEY_ALT('H'): ch = KEY_LEFT; break; + case KEY_ALT('J'): ch = KEY_DOWN; break; + case KEY_ALT('K'): ch = KEY_UP; break; + case KEY_ALT('L'): ch = KEY_RIGHT; break; } redraw = true; if (Panel_eventHandlerFn(panelFocus)) { |