diff options
author | Scott Chao <scott_chao@wistron.corp-partner.google.com> | 2020-11-03 09:04:43 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-11-12 04:12:47 +0000 |
commit | 7f0c15e6d2accd3aec28c93ff7add11268e3e6c7 (patch) | |
tree | 3a4b8beaee33cfa6e57e0e9caa144c68df7bda49 /board | |
parent | a9691611c515d7ef57aa69d738909d607461b7b1 (diff) | |
download | chrome-ec-7f0c15e6d2accd3aec28c93ff7add11268e3e6c7.tar.gz |
eldrid: add FW_CONFIG support for different keyboard layout
BUG=b:172133632
BRANCH=firmware-volteer-13521.B-master
TEST=make buildall
TEST=
ectool cbi get = 0x14902
ectool cbi set 0x114902 4
Signed-off-by: Scott Chao <scott_chao@wistron.corp-partner.google.com>
Change-Id: I0decd978bf6c21dddd315857bb1a29ac20dbf276
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2528732
Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'board')
-rw-r--r-- | board/eldrid/board.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/board/eldrid/board.c b/board/eldrid/board.c index 12286dc7b9..1ce028d96e 100644 --- a/board/eldrid/board.c +++ b/board/eldrid/board.c @@ -24,6 +24,7 @@ #include "fan_chip.h" #include "gpio.h" #include "hooks.h" +#include "keyboard_8042_sharedlib.h" #include "keyboard_raw.h" #include "lid_switch.h" #include "keyboard_scan.h" @@ -414,6 +415,13 @@ __override void board_cbi_init(void) if ((!IS_ENABLED(TEST_BUILD) && !ec_cfg_has_numeric_pad()) || get_board_id() < 1) keyboard_raw_set_cols(KEYBOARD_COLS_NO_KEYPAD); + + /* + * If keyboard is US2(KB_LAYOUT_1), we need translate right ctrl + * to backslash(\|) key. + */ + if (ec_cfg_keyboard_layout() == KB_LAYOUT_1) + set_scancode_set2(4, 0, get_scancode_set2(2, 7)); } /******************************************************************************/ |