Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[mucurses] Attempt to fix keypress processing logic
Signed-off-by: Michael Brown <mcb30@ipxe.org>
  • Loading branch information
mcb30 committed Mar 21, 2017
1 parent d29e2d5 commit 583d258
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/hci/mucurses/kb.c
Expand Up @@ -103,7 +103,9 @@ int wgetnstr ( WINDOW *win, char *str, int n ) {
_wcursback( win );
wdelch( win );
} else {
if ( c >= KEY_MIN ) {
if ( c >= 32 && c <= 126 ) {
*(_str++) = c; n--;
} else {
switch(c) {
case KEY_LEFT :
case KEY_BACKSPACE :
Expand All @@ -118,9 +120,6 @@ int wgetnstr ( WINDOW *win, char *str, int n ) {
break;
}
}
if ( c >= 32 && c <= 126 ) {
*(_str++) = c; n--;
}
}
}

Expand Down

0 comments on commit 583d258

Please sign in to comment.