diff options
author | Isaac Lee <isaaclee@google.com> | 2021-03-12 23:54:04 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-03-15 09:32:47 +0000 |
commit | fd9ea2bfe6a9b0dbf40ad3aa36409063db15ce06 (patch) | |
tree | 8f0cb7377d5ed966f1b080ac8eb62152caeb4e6e /board | |
parent | 27e7f4c313c8eb39d2f1cb44e84cde83070eec70 (diff) | |
download | chrome-ec-fd9ea2bfe6a9b0dbf40ad3aa36409063db15ce06.tar.gz |
dirinboz: add FW_CONFIG support for different keyboard layout
BUG=b:182232569
BRANCH=firmware-zork-13434.B-main
TEST=build all
Change-Id: I567739a9499249d5bdb067e23ee80a957ba7c2e4
Signed-off-by: Isaac Lee <isaaclee@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2755360
Diffstat (limited to 'board')
-rw-r--r-- | board/dirinboz/board.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/board/dirinboz/board.c b/board/dirinboz/board.c index f9630875b6..0ee6b94d05 100644 --- a/board/dirinboz/board.c +++ b/board/dirinboz/board.c @@ -20,6 +20,7 @@ #include "fan_chip.h" #include "gpio.h" #include "hooks.h" +#include "keyboard_8042_sharedlib.h" #include "ioexpander.h" #include "lid_switch.h" #include "power.h" @@ -489,6 +490,13 @@ static void setup_fw_config(void) /* Gyro is not present, don't allow line to float */ gpio_set_flags(GPIO_6AXIS_INT_L, GPIO_INPUT | GPIO_PULL_DOWN); } + + /* + * If keyboard is US2(KB_LAYOUT_1), we need translate right ctrl + * to backslash(\|) key. + */ + if (ec_config_keyboard_layout() == KB_LAYOUT_1) + set_scancode_set2(4, 0, get_scancode_set2(2, 7)); } DECLARE_HOOK(HOOK_INIT, setup_fw_config, HOOK_PRIO_INIT_I2C + 2); |