summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Wai-Hong Tam <waihong@chromium.org>2012-02-14 09:39:59 +0800
committerGerrit <chrome-bot@google.com>2012-02-15 01:06:00 -0800
commit2a4efc19a347da208c8e909a66fa9b945827170b (patch)
tree9238b5462dc99bbefa982031c673ced1b430754d
parent7935ef95311275a1b36414f72d52a9ce0da4e45f (diff)
chromium: Report Ctrl-Enter key to verified boot.
Add this special handle of Ctrl-Enter, which is converted into '\n' by i8042 driver. BUG=chrome-os-partner:6759 TEST=compile the firmware and update it to Lumpy; during the dev screen, press Ctrl-Enter to trigger USB boot. Signed-off-by: Tom Wai-Hong Tam <waihong@chromium.org> Change-Id: Ifde312f4ef6de9b328dc22b96ca02a2a9ccf6068 Reviewed-on: https://gerrit.chromium.org/gerrit/15805 Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Tom Wai-Hong Tam <waihong@chromium.org> Commit-Ready: Tom Wai-Hong Tam <waihong@chromium.org>
-rw-r--r--lib/vbexport/keyboard.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/vbexport/keyboard.c b/lib/vbexport/keyboard.c
index b6ccd5adcc9..3e4a85cdf0d 100644
--- a/lib/vbexport/keyboard.c
+++ b/lib/vbexport/keyboard.c
@@ -26,8 +26,16 @@ uint32_t VbExKeyboardRead(void)
goto out;
/* Read a non-Escape character or a standalone Escape character. */
- if ((c = getc()) != CSI_0 || !tstc())
+ c = getc();
+ if (c != CSI_0 || !tstc()) {
+ /*
+ * Special handle of Ctrl-Enter, which is converted into '\n'
+ * by i8042 driver.
+ */
+ if (c == '\n')
+ c = VB_KEY_CTRL_ENTER;
goto out;
+ }
/* Filter out non- Escape-[ sequence. */
if (getc() != CSI_1) {