diff options
-rw-r--r-- | tmk_core/common/keyboard.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c index a767d9c87..53d08959e 100644 --- a/tmk_core/common/keyboard.c +++ b/tmk_core/common/keyboard.c | |||
@@ -213,6 +213,13 @@ void keyboard_setup(void) { | |||
213 | */ | 213 | */ |
214 | __attribute__((weak)) bool is_keyboard_master(void) { return true; } | 214 | __attribute__((weak)) bool is_keyboard_master(void) { return true; } |
215 | 215 | ||
216 | /** \brief should_process_keypress | ||
217 | * | ||
218 | * Override this function if you have a condition where keypresses processing should change: | ||
219 | * - splits where the slave side needs to process for rgb/oled functionality | ||
220 | */ | ||
221 | __attribute__((weak)) bool should_process_keypress(void) { return is_keyboard_master(); } | ||
222 | |||
216 | /** \brief keyboard_init | 223 | /** \brief keyboard_init |
217 | * | 224 | * |
218 | * FIXME: needs doc | 225 | * FIXME: needs doc |
@@ -292,7 +299,7 @@ void keyboard_task(void) { | |||
292 | matrix_scan(); | 299 | matrix_scan(); |
293 | #endif | 300 | #endif |
294 | 301 | ||
295 | if (is_keyboard_master()) { | 302 | if (should_process_keypress()) { |
296 | for (uint8_t r = 0; r < MATRIX_ROWS; r++) { | 303 | for (uint8_t r = 0; r < MATRIX_ROWS; r++) { |
297 | matrix_row = matrix_get_row(r); | 304 | matrix_row = matrix_get_row(r); |
298 | matrix_change = matrix_row ^ matrix_prev[r]; | 305 | matrix_change = matrix_row ^ matrix_prev[r]; |