Browse Source

[mucurses] Attempt to fix keypress processing logic

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 7 years ago
parent
commit
583d258b89
1 changed files with 3 additions and 4 deletions
  1. 3
    4
      src/hci/mucurses/kb.c

+ 3
- 4
src/hci/mucurses/kb.c View File

103
 			_wcursback( win );
103
 			_wcursback( win );
104
 			wdelch( win );
104
 			wdelch( win );
105
 		} else {
105
 		} else {
106
-			if ( c >= KEY_MIN ) {
106
+			if ( c >= 32 && c <= 126 ) {
107
+				*(_str++) = c; n--;
108
+			} else {
107
 				switch(c) {
109
 				switch(c) {
108
 				case KEY_LEFT :
110
 				case KEY_LEFT :
109
 				case KEY_BACKSPACE :
111
 				case KEY_BACKSPACE :
118
 					break;
120
 					break;
119
 				}
121
 				}
120
 			}
122
 			}
121
-			if ( c >= 32 && c <= 126 ) {
122
-				*(_str++) = c; n--;
123
-			}
124
 		}
123
 		}
125
 	}
124
 	}
126
 
125
 

Loading…
Cancel
Save