|
@@ -76,9 +76,14 @@ int getkey ( unsigned long timeout ) {
|
76
|
76
|
if ( character != ESC )
|
77
|
77
|
return character;
|
78
|
78
|
|
|
79
|
+ character = getchar_timeout ( GETKEY_TIMEOUT );
|
|
80
|
+ if ( character < 0 )
|
|
81
|
+ return ESC;
|
|
82
|
+
|
|
83
|
+ if ( isalpha ( character ) )
|
|
84
|
+ return ( toupper ( character ) - 'A' + 1 );
|
|
85
|
+
|
79
|
86
|
while ( ( character = getchar_timeout ( GETKEY_TIMEOUT ) ) >= 0 ) {
|
80
|
|
- if ( character == '[' )
|
81
|
|
- continue;
|
82
|
87
|
if ( isdigit ( character ) ) {
|
83
|
88
|
n = ( ( n * 10 ) + ( character - '0' ) );
|
84
|
89
|
continue;
|