From fd9ea2bfe6a9b0dbf40ad3aa36409063db15ce06 Mon Sep 17 00:00:00 2001 From: Isaac Lee Date: Fri, 12 Mar 2021 23:54:04 +0800 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2755360 --- board/dirinboz/board.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'board/dirinboz') 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); -- cgit v1.2.1