summaryrefslogtreecommitdiff
path: root/lib/efi_loader/efi_console.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2019-04-08 22:32:45 -0400
committerTom Rini <trini@konsulko.com>2019-04-08 22:32:45 -0400
commit1d63ec3fa40e4899ad1d74d5ed3c926acfda54f2 (patch)
treeceef3a1214f5422b0071454aecd511e1b5f6bf95 /lib/efi_loader/efi_console.c
parentffb269ab30dbce8ab87d09942e2a6951694516f1 (diff)
parentbfc2dd53812f7946b61c18e915118fb7aad12e6d (diff)
Merge tag 'efi-2019-07-rc1' of git://git.denx.de/u-boot-efi
Pull request for UEFI sub-system for v2019.07-rc1 The patch series adds support for the BootNext and BootCurrent variables. The rest is mostly bug fixes. With the bug fixes in place it becomes possible to use the EFI Shell `edit` command. A new unit test is supplied to check the image base and size fields of the loaded image protocol. An inline check when freeing memory from the pool safeguards against double frees.
Diffstat (limited to 'lib/efi_loader/efi_console.c')
-rw-r--r--lib/efi_loader/efi_console.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/efi_loader/efi_console.c b/lib/efi_loader/efi_console.c
index 8e0965bfc89..051fc1d339f 100644
--- a/lib/efi_loader/efi_console.c
+++ b/lib/efi_loader/efi_console.c
@@ -797,9 +797,26 @@ static efi_status_t EFIAPI efi_cin_read_key_stroke_ex(
ret = EFI_NOT_READY;
goto out;
}
+ /*
+ * CTRL+A - CTRL+Z have to be signaled as a - z.
+ * SHIFT+CTRL+A - SHIFT+CTRL+Z have to be signaled as A - Z.
+ */
+ switch (next_key.key.unicode_char) {
+ case 0x01 ... 0x07:
+ case 0x0b ... 0x0c:
+ case 0x0e ... 0x1a:
+ if (!(next_key.key_state.key_toggle_state &
+ EFI_CAPS_LOCK_ACTIVE) ^
+ !(next_key.key_state.key_shift_state &
+ (EFI_LEFT_SHIFT_PRESSED | EFI_RIGHT_SHIFT_PRESSED)))
+ next_key.key.unicode_char += 0x40;
+ else
+ next_key.key.unicode_char += 0x60;
+ }
*key_data = next_key;
key_available = false;
efi_con_in.wait_for_key->is_signaled = false;
+
out:
return EFI_EXIT(ret);
}