diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2019-06-16 21:41:13 +0200 |
---|---|---|
committer | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2019-06-20 22:26:18 +0000 |
commit | 3b2b2de8ee7b18b119f3ca96fcaefa7f72ba499c (patch) | |
tree | 448d18a85737296dbdb9e8c97175fee5f3642f6a /lib | |
parent | db311f06751797f73fc9ecce2d5326f9c9edc06c (diff) | |
download | u-boot-3b2b2de8ee7b18b119f3ca96fcaefa7f72ba499c.tar.gz |
efi_loader: alternative scan codes for F5, END, HOME
Depending on the key board alternative scan codes are used for F5, END, and
HOME.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/efi_loader/efi_console.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/lib/efi_loader/efi_console.c b/lib/efi_loader/efi_console.c index 706e6ad31e..a04cbf678a 100644 --- a/lib/efi_loader/efi_console.c +++ b/lib/efi_loader/efi_console.c @@ -563,10 +563,13 @@ static efi_status_t efi_cin_read_key(struct efi_key_data *key) case cESC: /* ESC */ pressed_key.scan_code = 23; break; - case 'O': /* F1 - F4 */ + case 'O': /* F1 - F4, End */ ch = getc(); /* consider modifiers */ - if (ch < 'P') { + if (ch == 'F') { /* End */ + pressed_key.scan_code = 6; + break; + } else if (ch < 'P') { set_shift_mask(ch - '0', &key->key_state); ch = getc(); } @@ -590,17 +593,20 @@ static efi_status_t efi_cin_read_key(struct efi_key_data *key) case '1'...'5': /* F1 - F5 */ pressed_key.scan_code = ch - '1' + 11; break; - case '7'...'9': /* F6 - F8 */ - pressed_key.scan_code = ch - '7' + 16; + case '6'...'9': /* F5 - F8 */ + pressed_key.scan_code = ch - '6' + 15; break; case 'A'...'D': /* up, down right, left */ pressed_key.scan_code = ch - 'A' + 1; break; - case 'F': - pressed_key.scan_code = 6; /* End */ + case 'F': /* End */ + pressed_key.scan_code = 6; + break; + case 'H': /* Home */ + pressed_key.scan_code = 5; break; - case 'H': - pressed_key.scan_code = 5; /* Home */ + case '~': /* Home */ + pressed_key.scan_code = 5; break; } break; |