Browse Source

[bios] Add F8 function key as a recognised BIOS keycode

tags/v0.9.7
Michael Brown 16 years ago
parent
commit
f1d17ae2be
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      src/arch/i386/firmware/pcbios/bios_console.c

+ 3
- 1
src/arch/i386/firmware/pcbios/bios_console.c View File

193
  * dense range, so subtracting a constant and treating them as offsets
193
  * dense range, so subtracting a constant and treating them as offsets
194
  * into an array works efficiently.
194
  * into an array works efficiently.
195
  */
195
  */
196
-#define BIOS_KEY_MIN 0x47
196
+#define BIOS_KEY_MIN 0x42
197
 
197
 
198
 /** Offset into list of interesting BIOS scancodes */
198
 /** Offset into list of interesting BIOS scancodes */
199
 #define BIOS_KEY(scancode) ( (scancode) - BIOS_KEY_MIN )
199
 #define BIOS_KEY(scancode) ( (scancode) - BIOS_KEY_MIN )
200
 
200
 
201
 /** Mapping from BIOS scan codes to ANSI escape sequences */
201
 /** Mapping from BIOS scan codes to ANSI escape sequences */
202
 static const char *ansi_sequences[] = {
202
 static const char *ansi_sequences[] = {
203
+	[ BIOS_KEY ( 0x42 ) ] = "[19~",	/* F8 (required for PXE) */
203
 	[ BIOS_KEY ( 0x47 ) ] = "[H",	/* Home */
204
 	[ BIOS_KEY ( 0x47 ) ] = "[H",	/* Home */
204
 	[ BIOS_KEY ( 0x48 ) ] = "[A",	/* Up arrow */
205
 	[ BIOS_KEY ( 0x48 ) ] = "[A",	/* Up arrow */
205
 	[ BIOS_KEY ( 0x4b ) ] = "[D",	/* Left arrow */
206
 	[ BIOS_KEY ( 0x4b ) ] = "[D",	/* Left arrow */
222
 			  sizeof ( ansi_sequences[0] ) ) ) {
223
 			  sizeof ( ansi_sequences[0] ) ) ) {
223
 		return ansi_sequences[bios_key];
224
 		return ansi_sequences[bios_key];
224
 	}
225
 	}
226
+	DBG ( "Unrecognised BIOS scancode %02x\n", scancode );
225
 	return NULL;
227
 	return NULL;
226
 }
228
 }
227
 
229
 

Loading…
Cancel
Save