Browse Source

Define KEY_MIN and use it in kb.c.

tags/v0.9.3
Michael Brown 18 years ago
parent
commit
b9f8599537
2 changed files with 3 additions and 2 deletions
  1. 2
    2
      src/hci/mucurses/kb.c
  2. 1
    0
      src/include/curses.h

+ 2
- 2
src/hci/mucurses/kb.c View File

67
 	c = _wgetc( win );
67
 	c = _wgetc( win );
68
 
68
 
69
 	if ( m_echo ) {
69
 	if ( m_echo ) {
70
-		if ( c >= 0401 && c <= 0633 ) {
70
+		if ( c >= KEY_MIN ) {
71
 			switch(c) {
71
 			switch(c) {
72
 			case KEY_LEFT :
72
 			case KEY_LEFT :
73
 			case KEY_BACKSPACE :
73
 			case KEY_BACKSPACE :
112
 			_wcursback( win );
112
 			_wcursback( win );
113
 			wdelch( win );
113
 			wdelch( win );
114
 		} else {
114
 		} else {
115
-			if ( c >= 0401 && c <= 0633 ) {
115
+			if ( c >= KEY_MIN ) {
116
 				switch(c) {
116
 				switch(c) {
117
 				case KEY_LEFT :
117
 				case KEY_LEFT :
118
 				case KEY_BACKSPACE :
118
 				case KEY_BACKSPACE :

+ 1
- 0
src/include/curses.h View File

194
 /*
194
 /*
195
  * KEY code constants
195
  * KEY code constants
196
  */
196
  */
197
+#define KEY_MIN		0401		/**< Minimum special key */
197
 #define KEY_BREAK	0401		/**< Break key */
198
 #define KEY_BREAK	0401		/**< Break key */
198
 #define KEY_DOWN	0402		/**< down-arrow key */
199
 #define KEY_DOWN	0402		/**< down-arrow key */
199
 #define KEY_UP		0403		/**< up-arrow key */
200
 #define KEY_UP		0403		/**< up-arrow key */

Loading…
Cancel
Save