diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/config.h | 5 | ||||
-rw-r--r-- | include/keyboard_8042_sharedlib.h | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/include/config.h b/include/config.h index 7d8d3900d1..c48ffbc5d1 100644 --- a/include/config.h +++ b/include/config.h @@ -1552,6 +1552,11 @@ #define CONFIG_KEYBOARD_RUNTIME_KEYS /* + * Allow the keyboard scan code set tables to be modified at runtime. + */ +#undef CONFIG_KEYBOARD_SCANCODE_MUTABLE + +/* * Call board-supplied keyboard_suppress_noise() function when the debounced * keyboard state changes. Some boards use this to send a signal to the audio * codec to suppress typing noise picked up by the microphone. diff --git a/include/keyboard_8042_sharedlib.h b/include/keyboard_8042_sharedlib.h index 054795e86d..5c9b559279 100644 --- a/include/keyboard_8042_sharedlib.h +++ b/include/keyboard_8042_sharedlib.h @@ -19,8 +19,13 @@ struct button_8042_t { }; /* The standard Chrome OS keyboard matrix table. */ +#ifdef CONFIG_KEYBOARD_SCANCODE_MUTABLE +extern uint16_t scancode_set1[KEYBOARD_ROWS][KEYBOARD_COLS]; +extern uint16_t scancode_set2[KEYBOARD_ROWS][KEYBOARD_COLS]; +#else extern const uint16_t scancode_set1[KEYBOARD_ROWS][KEYBOARD_COLS]; extern const uint16_t scancode_set2[KEYBOARD_ROWS][KEYBOARD_COLS]; +#endif /* Button scancodes (Power, Volume Down, Volume Up, etc.) */ extern const struct button_8042_t buttons_8042[KEYBOARD_BUTTON_COUNT]; |