summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDaisuke Nojiri <dnojiri@chromium.org>2018-10-16 12:37:28 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-10-19 12:19:32 -0700
commit9fda2eea0861911537922ce3e45b118297f5030d (patch)
treec3d6822f5088ee561a2b0414300e3efb755e33d6 /include
parent59dc8df73fa71f3064fd225cf89fed65bf1b25a9 (diff)
downloadchrome-ec-9fda2eea0861911537922ce3e45b118297f5030d.tar.gz
Keyboard: switch column and row of scancode table
This patch switches column and row of scancode_set2. That is, scancode_set2[ROWS][COLS] = {0x00, 0x01, 0x02, ..., 0x10, 0x11, ..., 0x20, ..., becomes scancode_set2[COLS][ROWS] = {0x00, 0x10, 0x20, ..., 0x01, 0x11, ..., 0x02, ..., This will allow us to extend the table for a keypad without losing too much readability. Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> BUG=b:117126568 BRANCH=none TEST=Verify keyboard functionality on Sona. Change-Id: I49a7c0796d5c91989f1d3686c80743fb4bcd5ba7 Reviewed-on: https://chromium-review.googlesource.com/1285291 Commit-Ready: Daisuke Nojiri <dnojiri@chromium.org> Tested-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/keyboard_8042_sharedlib.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/keyboard_8042_sharedlib.h b/include/keyboard_8042_sharedlib.h
index e944e74af2..1cff2544dc 100644
--- a/include/keyboard_8042_sharedlib.h
+++ b/include/keyboard_8042_sharedlib.h
@@ -19,9 +19,9 @@ struct button_8042_t {
/* The standard Chrome OS keyboard matrix table. */
#ifdef CONFIG_KEYBOARD_SCANCODE_MUTABLE
-extern uint16_t scancode_set2[KEYBOARD_ROWS][KEYBOARD_COLS];
+extern uint16_t scancode_set2[KEYBOARD_COLS][KEYBOARD_ROWS];
#else
-extern const uint16_t scancode_set2[KEYBOARD_ROWS][KEYBOARD_COLS];
+extern const uint16_t scancode_set2[KEYBOARD_COLS][KEYBOARD_ROWS];
#endif
/* Translation from scan code set 2 to set 1. */
@@ -70,9 +70,9 @@ enum keycap_long_label_idx {
extern const char * const keycap_long_label[];
#ifdef CONFIG_KEYBOARD_SCANCODE_MUTABLE
-extern char keycap_label[KEYBOARD_ROWS][KEYBOARD_COLS];
+extern char keycap_label[KEYBOARD_COLS][KEYBOARD_ROWS];
#else
-extern const char keycap_label[KEYBOARD_ROWS][KEYBOARD_COLS];
+extern const char keycap_label[KEYBOARD_COLS][KEYBOARD_ROWS];
#endif
#endif