eve: Enable mutable scancode for EVT boards

Enable the mutable scancode sets for EVT boards and reassign the
existing F13 scancode to instead send the new 0[e0 58] 1[e0 07]
scancode instead.

BUG=b:36735408
BRANCH=none
TEST=manual testing on Eve EVT to ensure that the key that used
to send F13 now sends the new scancode.  Also test on P1 to ensure
that the key still sends F13.

Change-Id: Ia134db7b069d5bf10c931ee7ce66dd1ea85d3544
Signed-off-by: Duncan Laurie <dlaurie@google.com>
Reviewed-on: https://chromium-review.googlesource.com/506718
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
This commit is contained in:
Duncan Laurie
2017-05-16 07:39:10 -07:00
committed by chrome-bot
parent 76e064815f
commit a082274af6
2 changed files with 11 additions and 0 deletions

View File

@@ -30,6 +30,7 @@
#include "host_command.h"
#include "i2c.h"
#include "keyboard_scan.h"
#include "keyboard_8042_sharedlib.h"
#include "lid_angle.h"
#include "lid_switch.h"
#include "math_util.h"
@@ -385,6 +386,15 @@ static void board_init(void)
/* Provide AC status to the PCH */
gpio_set_level(GPIO_PCH_ACOK, extpower_is_present());
#if defined(CONFIG_KEYBOARD_SCANCODE_MUTABLE) && !defined(TEST_BUILD)
if (board_get_version() == 4) {
/* Set F13 to new defined key on EVT */
CPRINTS("Overriding F13 scan code");
scancode_set1[3][9] = 0xe058;
scancode_set2[3][9] = 0xe007;
}
#endif
}
DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT);

View File

@@ -72,6 +72,7 @@
#define CONFIG_KEYBOARD_BOARD_CONFIG
#define CONFIG_KEYBOARD_COL2_INVERTED
#define CONFIG_KEYBOARD_PROTOCOL_8042
#define CONFIG_KEYBOARD_SCANCODE_MUTABLE
#define CONFIG_TABLET_MODE
/* Battery */