Pārlūkot izejas kodu

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

tags/v0.9.7
Michael Brown 16 gadus atpakaļ
vecāks
revīzija
f1d17ae2be
1 mainītis faili ar 3 papildinājumiem un 1 dzēšanām
  1. 3
    1
      src/arch/i386/firmware/pcbios/bios_console.c

+ 3
- 1
src/arch/i386/firmware/pcbios/bios_console.c Parādīt failu

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

Notiek ielāde…
Atcelt
Saglabāt