X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=ui%2Fncurses%2Fnc-scr.c;h=ff20d637781289572d962430b0a094e7195447ce;hb=ce2275ed4fa099035af123c25a1a7657f1ea6e78;hp=d2455d4408c72ecef8bc41414e95473616b20aae;hpb=f1599796efed1eb67759cf42f47fe4bf6a9bf93c;p=petitboot diff --git a/ui/ncurses/nc-scr.c b/ui/ncurses/nc-scr.c index d2455d4..ff20d63 100644 --- a/ui/ncurses/nc-scr.c +++ b/ui/ncurses/nc-scr.c @@ -38,6 +38,14 @@ void nc_start(void) intrflush(stdscr, FALSE); /* Disable interrupt flush. */ curs_set(0); /* Make cursor invisible */ nodelay(stdscr, TRUE); /* Enable non-blocking getch() */ + + /* We may be operating with an incorrect $TERM type; in this case + * the keymappings will be slightly broken. We want at least + * backspace to work though, so we'll define both DEL and ^H to + * map to backspace */ + define_key("\x7f", KEY_BACKSPACE); + define_key("\x08", KEY_BACKSPACE); + while (getch() != ERR) /* flush stdin */ (void)0; }