summaryrefslogtreecommitdiff
path: root/firmware/include
diff options
context:
space:
mode:
authorMathew King <mathewk@chromium.org>2019-02-19 10:43:32 -0700
committerchrome-bot <chrome-bot@chromium.org>2019-02-22 11:01:10 -0800
commitaf26dc17173d82c75821cf5385054a3b3b17165d (patch)
treeb4085a4a5eae2789d4090dfa9e41ec7b934716e1 /firmware/include
parent1e177741c3a9bfb8bd69a92b6d3bf4b25655a71f (diff)
downloadvboot-af26dc17173d82c75821cf5385054a3b3b17165d.tar.gz
vboot: Don't hardcode special keyboard values.
BUG=chromium:933391 TEST=make runtests Test ctrl+d, ctrl+u, and ctrl+l on device BRANCH=none Change-Id: Icf8699e5facac44a074cfd47e796b9957fd6b714 Reviewed-on: https://chromium-review.googlesource.com/1475781 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Mathew King <mathewk@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org> Reviewed-by: Mathew King <mathewk@chromium.org>
Diffstat (limited to 'firmware/include')
-rw-r--r--firmware/include/vboot_api.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/firmware/include/vboot_api.h b/firmware/include/vboot_api.h
index 904e5a20..0d3addff 100644
--- a/firmware/include/vboot_api.h
+++ b/firmware/include/vboot_api.h
@@ -717,8 +717,12 @@ VbError_t VbExDisplayDebugInfo(const char *info_str);
/*****************************************************************************/
/* Keyboard and switches */
+/* Key code for CTRL + letter */
+#define VB_KEY_CTRL(letter) (letter & 0x1f)
+
/* Key codes for required non-printable-ASCII characters. */
enum VbKeyCode_t {
+ VB_KEY_ENTER = '\r',
VB_KEY_ESC = 0x1b,
VB_KEY_UP = 0x100,
VB_KEY_DOWN = 0x101,