summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2020-11-18 16:50:32 -0800
committerDrashna Jael're <drashna@live.com>2021-01-12 22:43:35 -0800
commit0df0f00f6ae38e910abd3478fc9540f6078d1529 (patch)
tree8c5159d06632c1d6245e28929fb699042d99ec05
parentb4f8309e9b0eeaad56094d27767f6d358b7c0276 (diff)
Add references for is_keyboard_left() (#10850)
* Add references for is_keyboard_left() * Remove proto from bootmagic_lite.c
-rw-r--r--tmk_core/common/bootmagic_lite.c4
-rw-r--r--tmk_core/common/keyboard.c6
-rw-r--r--tmk_core/common/keyboard.h2
3 files changed, 9 insertions, 3 deletions
diff --git a/tmk_core/common/bootmagic_lite.c b/tmk_core/common/bootmagic_lite.c
index 38275cdd30..cbf756a175 100644
--- a/tmk_core/common/bootmagic_lite.c
+++ b/tmk_core/common/bootmagic_lite.c
@@ -1,7 +1,5 @@
#include "quantum.h"
-bool is_keyboard_left(void);
-
/** \brief Reset eeprom
*
* ...just incase someone wants to only change the eeprom behaviour
@@ -48,4 +46,4 @@ __attribute__((weak)) void bootmagic_lite(void) {
// Jump to bootloader.
bootloader_jump();
}
-} \ No newline at end of file
+}
diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c
index d973e18e97..4b241b7b3d 100644
--- a/tmk_core/common/keyboard.c
+++ b/tmk_core/common/keyboard.c
@@ -217,6 +217,12 @@ void keyboard_setup(void) {
*/
__attribute__((weak)) bool is_keyboard_master(void) { return true; }
+/** \brief is_keyboard_left
+ *
+ * FIXME: needs doc
+ */
+__attribute__((weak)) bool is_keyboard_left(void) { return true; }
+
/** \brief should_process_keypress
*
* Override this function if you have a condition where keypresses processing should change:
diff --git a/tmk_core/common/keyboard.h b/tmk_core/common/keyboard.h
index ff77367183..d5836c40f9 100644
--- a/tmk_core/common/keyboard.h
+++ b/tmk_core/common/keyboard.h
@@ -65,6 +65,8 @@ void keyboard_task(void);
void keyboard_set_leds(uint8_t leds);
/* it runs whenever code has to behave differently on a slave */
bool is_keyboard_master(void);
+/* it runs whenever code has to behave differently on left vs right split */
+bool is_keyboard_left(void);
void keyboard_pre_init_kb(void);
void keyboard_pre_init_user(void);