From 706194b33650b3c6cbb6780d8e76cf2530aefe4b Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Fri, 3 Jun 2022 04:12:15 -0700 Subject: [PATCH] Add Encoder Map Swap Hands config for boards that support both features (#17294) --- keyboards/keebio/iris/rev3/rev3.c | 3 +++ keyboards/lime/lime.c | 3 +++ keyboards/planck/planck.c | 3 +++ keyboards/preonic/rev3/rev3.c | 3 +++ keyboards/preonic/rev3_drop/rev3_drop.c | 3 +++ keyboards/sofle/sofle.c | 4 ++++ keyboards/splitkb/kyria/rev1/rev1.c | 3 +++ keyboards/splitkb/kyria/rev2/rev2.c | 3 +++ 8 files changed, 25 insertions(+) diff --git a/keyboards/keebio/iris/rev3/rev3.c b/keyboards/keebio/iris/rev3/rev3.c index 2b3d6b1d962..f644777b56f 100644 --- a/keyboards/keebio/iris/rev3/rev3.c +++ b/keyboards/keebio/iris/rev3/rev3.c @@ -17,6 +17,9 @@ const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{0,3}, {1,3}, {2,3}, {3,3}, {4,3}, {5,3}}, {{0,4}, {1,4}, {2,4}, {3,4}, {4,4}, {5,4}}, }; +# ifdef ENCODER_MAP_ENABLE +const uint8_t PROGMEM encoder_hand_swap_config[NUM_ENCODERS] = {1, 0}; +# endif #endif void eeconfig_init_kb(void) { diff --git a/keyboards/lime/lime.c b/keyboards/lime/lime.c index bfc9ea0faaa..95a05823471 100644 --- a/keyboards/lime/lime.c +++ b/keyboards/lime/lime.c @@ -43,4 +43,7 @@ const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {0, 5}, {1, 5}, {2, 5}, {3, 5}, {4, 5}, {5, 5} }, \ }; +# ifdef ENCODER_MAP_ENABLE +const uint8_t PROGMEM encoder_hand_swap_config[NUM_ENCODERS] = {0}; +# endif #endif diff --git a/keyboards/planck/planck.c b/keyboards/planck/planck.c index e9bd90bdfe6..6202da52509 100644 --- a/keyboards/planck/planck.c +++ b/keyboards/planck/planck.c @@ -8,6 +8,9 @@ const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{11, 2}, {10, 2}, {9, 2}, {8, 2}, {7, 2}, {6, 2}, {5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}}, {{11, 3}, {10, 3}, {9, 3}, {8, 3}, {7, 3}, {6, 3}, {5, 3}, {4, 3}, {3, 3}, {2, 3}, {1, 3}, {0, 3}}, }; +# ifdef ENCODER_MAP_ENABLE +const uint8_t PROGMEM encoder_hand_swap_config[NUM_ENCODERS] = {0}; +# endif #endif __attribute__ ((weak)) diff --git a/keyboards/preonic/rev3/rev3.c b/keyboards/preonic/rev3/rev3.c index 7ccff70611b..4739a1d2d84 100644 --- a/keyboards/preonic/rev3/rev3.c +++ b/keyboards/preonic/rev3/rev3.c @@ -58,4 +58,7 @@ const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{5, 8}, {4, 8}, {3, 8}, {2, 8}, {1, 8}, {0, 8}}, {{5, 9}, {4, 9}, {3, 9}, {2, 9}, {1, 9}, {0, 9}}, }; +# ifdef ENCODER_MAP_ENABLE +const uint8_t PROGMEM encoder_hand_swap_config[NUM_ENCODERS] = {0}; +# endif #endif diff --git a/keyboards/preonic/rev3_drop/rev3_drop.c b/keyboards/preonic/rev3_drop/rev3_drop.c index 0b3f452c442..279f367876f 100644 --- a/keyboards/preonic/rev3_drop/rev3_drop.c +++ b/keyboards/preonic/rev3_drop/rev3_drop.c @@ -58,4 +58,7 @@ const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{5, 8}, {4, 8}, {3, 8}, {2, 8}, {1, 8}, {0, 8}}, {{5, 9}, {4, 9}, {3, 9}, {2, 9}, {1, 9}, {0, 9}}, }; +# ifdef ENCODER_MAP_ENABLE +const uint8_t PROGMEM encoder_hand_swap_config[NUM_ENCODERS] = {0}; +# endif #endif diff --git a/keyboards/sofle/sofle.c b/keyboards/sofle/sofle.c index 3e9f45656a6..6c3bce43b62 100644 --- a/keyboards/sofle/sofle.c +++ b/keyboards/sofle/sofle.c @@ -39,4 +39,8 @@ const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {0, 4}, {1, 4}, {2, 4}, {3, 4}, {4, 4}, {5, 4} }, \ }; +# ifdef ENCODER_MAP_ENABLE +const uint8_t PROGMEM encoder_hand_swap_config[NUM_ENCODERS] = {1, 0}; +# endif + #endif diff --git a/keyboards/splitkb/kyria/rev1/rev1.c b/keyboards/splitkb/kyria/rev1/rev1.c index 8398366e71b..52a62ccef8a 100644 --- a/keyboards/splitkb/kyria/rev1/rev1.c +++ b/keyboards/splitkb/kyria/rev1/rev1.c @@ -28,6 +28,9 @@ __attribute__ ((weak)) const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATR {{0, 3}, {1, 3}, {2, 3}, {3, 3}, {4, 3}, {5, 3}, {6, 3}, {7, 3}} }; // clang-format on +# ifdef ENCODER_MAP_ENABLE +const uint8_t PROGMEM encoder_hand_swap_config[NUM_ENCODERS] = {1, 0}; +# endif #endif #ifdef RGB_MATRIX_ENABLE diff --git a/keyboards/splitkb/kyria/rev2/rev2.c b/keyboards/splitkb/kyria/rev2/rev2.c index 0a181cdf12e..3ec4aa37f0c 100644 --- a/keyboards/splitkb/kyria/rev2/rev2.c +++ b/keyboards/splitkb/kyria/rev2/rev2.c @@ -43,6 +43,9 @@ __attribute__ ((weak)) const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATR {{0, 3}, {1, 3}, {2, 3}, {3, 3}, {4, 3}, {5, 3}, {6, 3}, {7, 3}} }; // clang-format on +# ifdef ENCODER_MAP_ENABLE +const uint8_t PROGMEM encoder_hand_swap_config[NUM_ENCODERS] = {1, 0}; +# endif #endif #ifdef RGB_MATRIX_ENABLE