diff options
-rw-r--r-- | docs/feature_split_keyboard.md | 8 | ||||
-rw-r--r-- | quantum/split_common/split_util.c | 4 |
2 files changed, 11 insertions, 1 deletions
diff --git a/docs/feature_split_keyboard.md b/docs/feature_split_keyboard.md index 603c387c2..428d581ca 100644 --- a/docs/feature_split_keyboard.md +++ b/docs/feature_split_keyboard.md | |||
@@ -89,7 +89,13 @@ You can configure the firmware to read a pin on the controller to determine hand | |||
89 | #define SPLIT_HAND_PIN B7 | 89 | #define SPLIT_HAND_PIN B7 |
90 | ``` | 90 | ``` |
91 | 91 | ||
92 | This will read the specified pin. If it's high, then the controller assumes it is the left hand, and if it's low, it's assumed to be the right side. | 92 | This will read the specified pin. By default, if it's high, then the controller assumes it is the left hand, and if it's low, it's assumed to be the right side. |
93 | |||
94 | This behaviour can be flipped by adding this to you `config.h` file: | ||
95 | |||
96 | ```c | ||
97 | #define SPLIT_HAND_PIN_LOW_IS_LEFT | ||
98 | ``` | ||
93 | 99 | ||
94 | #### Handedness by Matrix Pin | 100 | #### Handedness by Matrix Pin |
95 | 101 | ||
diff --git a/quantum/split_common/split_util.c b/quantum/split_common/split_util.c index 9e75e19ce..989829d2d 100644 --- a/quantum/split_common/split_util.c +++ b/quantum/split_common/split_util.c | |||
@@ -77,7 +77,11 @@ __attribute__((weak)) bool is_keyboard_left(void) { | |||
77 | #if defined(SPLIT_HAND_PIN) | 77 | #if defined(SPLIT_HAND_PIN) |
78 | // Test pin SPLIT_HAND_PIN for High/Low, if low it's right hand | 78 | // Test pin SPLIT_HAND_PIN for High/Low, if low it's right hand |
79 | setPinInput(SPLIT_HAND_PIN); | 79 | setPinInput(SPLIT_HAND_PIN); |
80 | # ifdef SPLIT_HAND_PIN_LOW_IS_LEFT | ||
81 | return !readPin(SPLIT_HAND_PIN); | ||
82 | # else | ||
80 | return readPin(SPLIT_HAND_PIN); | 83 | return readPin(SPLIT_HAND_PIN); |
84 | # endif | ||
81 | #elif defined(SPLIT_HAND_MATRIX_GRID) | 85 | #elif defined(SPLIT_HAND_MATRIX_GRID) |
82 | # ifdef SPLIT_HAND_MATRIX_GRID_LOW_IS_RIGHT | 86 | # ifdef SPLIT_HAND_MATRIX_GRID_LOW_IS_RIGHT |
83 | return peek_matrix_intersection(SPLIT_HAND_MATRIX_GRID); | 87 | return peek_matrix_intersection(SPLIT_HAND_MATRIX_GRID); |