diff options
author | Daisuke Nojiri <dnojiri@chromium.org> | 2018-09-05 17:40:25 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-09-07 18:36:56 -0700 |
commit | 3bea5b5333314bd9f9c5e9c40f218e8df3a92e4b (patch) | |
tree | 2ed86b5ba565db0ce921c7051476fceae74bc84c /common/keyboard_scan.c | |
parent | 37809307f7b3422d8488feb0c4806615e6af72af (diff) | |
download | chrome-ec-3bea5b5333314bd9f9c5e9c40f218e8df3a92e4b.tar.gz |
keyboard: Ignore refresh button at boot
Any buttons except esc, left-shift, and down-arrow are considered as
'other key' and can cancel recovery mode entry if it's pressed at boot.
On some chromebooks (e.g. Grunt, Nami), the refresh key is not scanned
early enough (i.e. before the power button is released). Thus, the
refresh key unintentionally cancels recovery mode entry.
This change makes the EC ignore the refresh key at boot. This is
already done for Grunt using CONFIG_KEYBOARD_IGNORE_REFRESH_BOOT_KEY.
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
BUG=b:114134666
BRANCH=none
TEST=Put Akali in recovery mode without holding power button long.
Change-Id: I57d7cb8fb320a4960125cd96d4d3ae84687a74df
Reviewed-on: https://chromium-review.googlesource.com/1208229
Commit-Ready: Daisuke Nojiri <dnojiri@chromium.org>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'common/keyboard_scan.c')
-rw-r--r-- | common/keyboard_scan.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/common/keyboard_scan.c b/common/keyboard_scan.c index 02a1c105a0..034b82519c 100644 --- a/common/keyboard_scan.c +++ b/common/keyboard_scan.c @@ -590,9 +590,7 @@ static uint32_t check_key_list(const uint8_t *state) curr_state[c] &= ~KEYBOARD_MASK_PWRBTN; #endif -#ifdef CONFIG_KEYBOARD_IGNORE_REFRESH_BOOT_KEY curr_state[KEYBOARD_COL_REFRESH] &= ~KEYBOARD_MASK_REFRESH; -#endif /* Update mask with all boot keys that were pressed. */ k = boot_key_list; |