diff --git a/docs/feature_swap_hands.md b/docs/feature_swap_hands.md index 009477d20..cbc574b6b 100644 --- a/docs/feature_swap_hands.md +++ b/docs/feature_swap_hands.md @@ -7,7 +7,7 @@ The swap-hands action allows support for one-handed typing without requiring a s The configuration table is a simple 2-dimensional array to map from column/row to new column/row. Example `hand_swap_config` for Planck: ```C -const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { +const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{11, 0}, {10, 0}, {9, 0}, {8, 0}, {7, 0}, {6, 0}, {5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}}, {{11, 1}, {10, 1}, {9, 1}, {8, 1}, {7, 1}, {6, 1}, {5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}}, {{11, 2}, {10, 2}, {9, 2}, {8, 2}, {7, 2}, {6, 2}, {5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}}, diff --git a/docs/ja/feature_swap_hands.md b/docs/ja/feature_swap_hands.md index 3150801c5..5164584e8 100644 --- a/docs/ja/feature_swap_hands.md +++ b/docs/ja/feature_swap_hands.md @@ -12,7 +12,7 @@ 設定テーブルは列/行から新しい列/行にマップするための単純な2次元配列です。Planck の `hand_swap_config` の例: ```C -const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { +const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{11, 0}, {10, 0}, {9, 0}, {8, 0}, {7, 0}, {6, 0}, {5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}}, {{11, 1}, {10, 1}, {9, 1}, {8, 1}, {7, 1}, {6, 1}, {5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}}, {{11, 2}, {10, 2}, {9, 2}, {8, 2}, {7, 2}, {6, 2}, {5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}}, diff --git a/keyboards/40percentclub/25/25.c b/keyboards/40percentclub/25/25.c index 54a42d263..de1b038aa 100644 --- a/keyboards/40percentclub/25/25.c +++ b/keyboards/40percentclub/25/25.c @@ -44,7 +44,7 @@ void led_set_kb(uint8_t usb_led) { #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) -const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { +const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{4, 5}, {3, 5}, {2, 5}, {1, 5}, {0, 5}}, {{4, 6}, {3, 6}, {2, 6}, {1, 6}, {0, 6}}, {{4, 7}, {3, 7}, {2, 7}, {1, 7}, {0, 7}}, diff --git a/keyboards/40percentclub/6lit/6lit.c b/keyboards/40percentclub/6lit/6lit.c index fd3ae7d00..59d7e33bd 100644 --- a/keyboards/40percentclub/6lit/6lit.c +++ b/keyboards/40percentclub/6lit/6lit.c @@ -44,7 +44,7 @@ void led_set_kb(uint8_t usb_led) { #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) -const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { +const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{2, 2}, {1, 2}, {0, 2}}, {{2, 3}, {1, 3}, {0, 3}}, {{0, 0}, {1, 0}, {2, 0}}, diff --git a/keyboards/40percentclub/foobar/foobar.c b/keyboards/40percentclub/foobar/foobar.c index c032056a1..b0a1518df 100644 --- a/keyboards/40percentclub/foobar/foobar.c +++ b/keyboards/40percentclub/foobar/foobar.c @@ -44,7 +44,7 @@ void led_set_kb(uint8_t usb_led) { #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) -const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { +const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{4, 3}, {3, 3}, {2, 3}, {1, 3}, {0, 3}}, {{4, 4}, {3, 4}, {2, 4}, {1, 4}, {0, 4}}, {{4, 5}, {3, 5}, {2, 5}, {1, 5}, {0, 5}}, diff --git a/keyboards/adkb96/adkb96.c b/keyboards/adkb96/adkb96.c index 9a1c85a2c..93230ee00 100644 --- a/keyboards/adkb96/adkb96.c +++ b/keyboards/adkb96/adkb96.c @@ -2,7 +2,7 @@ #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) -const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { +const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}, {5, 6}, {6, 6}, {7, 6}}, {{0, 7}, {1, 7}, {2, 7}, {3, 7}, {4, 7}, {5, 7}, {6, 7}, {7, 7}}, {{0, 8}, {1, 8}, {2, 8}, {3, 8}, {4, 8}, {5, 8}, {6, 8}, {7, 8}}, diff --git a/keyboards/centromere/centromere.c b/keyboards/centromere/centromere.c index 269c60fd7..8d46520e3 100644 --- a/keyboards/centromere/centromere.c +++ b/keyboards/centromere/centromere.c @@ -5,21 +5,21 @@ void led_init(void) { setPinOutput(C4); // Set red LED pin as output setPinOutput(C5); // Set blue LED pin as output setPinOutput(D1); // Set green LED pin as output - + writePinHigh(C4); // Turn off red LED pin writePinHigh(C5); // Turn off blue LED pin writePinHigh(D1); // Turn off green LED pin - + #else setPinOutput(F4); // Set red LED pin as output setPinOutput(F5); // Set blue LED pin as output setPinOutput(D1); // Set green LED pin as output - + writePinHigh(F4); // Turn off red LED pin writePinHigh(F5); // Turn off blue LED pin writePinHigh(D1); // Turn off green LED pin - + #endif } @@ -33,7 +33,7 @@ void matrix_init_kb(void) { #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) -const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { +const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{9, 0}, {8, 0}, {7, 0}, {6, 0}, {5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}}, {{9, 1}, {8, 1}, {7, 1}, {6, 1}, {5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}}, {{9, 2}, {8, 2}, {7, 2}, {6, 2}, {5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}}, diff --git a/keyboards/crkbd/crkbd.c b/keyboards/crkbd/crkbd.c index ab1381a39..6220c9822 100644 --- a/keyboards/crkbd/crkbd.c +++ b/keyboards/crkbd/crkbd.c @@ -20,7 +20,7 @@ along with this program. If not, see . #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) -const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { +const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { // Left {{0, 4}, {1, 4}, {2, 4}, {3, 4}, {4, 4}, {5, 4}}, {{0, 5}, {1, 5}, {2, 5}, {3, 5}, {4, 5}, {5, 5}}, @@ -33,4 +33,3 @@ const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{0, 3}, {1, 3}, {2, 3}, {3, 3}, {4, 3}, {5, 3}} }; #endif - diff --git a/keyboards/ergo42/ergo42.c b/keyboards/ergo42/ergo42.c index e42dcb226..bd7a7ffe1 100644 --- a/keyboards/ergo42/ergo42.c +++ b/keyboards/ergo42/ergo42.c @@ -2,7 +2,7 @@ #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) -const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { +const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{0, 4}, {1, 4}, {2, 4}, {3, 4}, {4, 4}, {5, 4}, {6, 4}}, {{0, 5}, {1, 5}, {2, 5}, {3, 5}, {4, 5}, {5, 5}, {6, 5}}, diff --git a/keyboards/ergodox_ez/ergodox_ez.c b/keyboards/ergodox_ez/ergodox_ez.c index e6f48c49f..4d3567521 100644 --- a/keyboards/ergodox_ez/ergodox_ez.c +++ b/keyboards/ergodox_ez/ergodox_ez.c @@ -220,7 +220,7 @@ uint8_t ergodox_left_leds_update(void) { #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) // swap-hands action needs a matrix to define the swap -const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { +const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { /* Left hand, matrix positions */ {{0,13}, {1,13}, {2,13}, {3,13}, {4,13}, {5,13}}, {{0,12}, {1,12}, {2,12}, {3,12}, {4,12}, {5,12}}, diff --git a/keyboards/ergodox_infinity/ergodox_infinity.c b/keyboards/ergodox_infinity/ergodox_infinity.c index a9962f96a..97b628470 100644 --- a/keyboards/ergodox_infinity/ergodox_infinity.c +++ b/keyboards/ergodox_infinity/ergodox_infinity.c @@ -205,7 +205,7 @@ void ergodox_right_led_3_set(uint8_t n) { #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) -const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { +const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{0, 9}, {1, 9}, {2, 9}, {3, 9}, {4, 9}}, {{0, 10}, {1, 10}, {2, 10}, {3, 10}, {4, 10}}, {{0, 11}, {1, 11}, {2, 11}, {3, 11}, {4, 11}}, diff --git a/keyboards/ergoslab/rev1/rev1.c b/keyboards/ergoslab/rev1/rev1.c index 0e3e0fe99..115dab51e 100644 --- a/keyboards/ergoslab/rev1/rev1.c +++ b/keyboards/ergoslab/rev1/rev1.c @@ -2,7 +2,7 @@ #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) -const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { +const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{0, 5}, {1, 5}, {2, 5}, {3, 5}, {4, 5}, {5, 5}}, {{0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}, {5, 6}}, {{0, 7}, {1, 7}, {2, 7}, {3, 7}, {4, 7}, {5, 7}}, diff --git a/keyboards/gergo/gergo.c b/keyboards/gergo/gergo.c index fab8d0f44..ba359f814 100644 --- a/keyboards/gergo/gergo.c +++ b/keyboards/gergo/gergo.c @@ -65,7 +65,7 @@ out: return mcp23018_status; } -const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { +const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { { {0,0}, {0,7}, {2,7}, {3,7} }, { {0,8}, {1,8}, {2,8}, {3,8} }, { {0,9}, {1,9}, {2,9}, {3,9} }, diff --git a/keyboards/handwired/dactyl/dactyl.c b/keyboards/handwired/dactyl/dactyl.c index 81b9dce0f..ff9b4e08a 100644 --- a/keyboards/handwired/dactyl/dactyl.c +++ b/keyboards/handwired/dactyl/dactyl.c @@ -4,7 +4,7 @@ #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) // swap-hands action needs a matrix to define the swap -const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { +const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{0,11}, {0,10}, {0,9}, {0,8}, {0,7}, {0,6}, {0,5}, {0,4}, {0,3}, {0,2}, {0,1}, {0,0}}, {{1,11}, {1,11}, {1,9}, {1,8}, {1,7}, {1,6}, {1,5}, {1,4}, {1,3}, {1,2}, {1,1}, {1,0}}, {{2,11}, {2,12}, {2,9}, {2,8}, {2,7}, {2,6}, {2,5}, {2,4}, {2,3}, {2,2}, {2,1}, {2,0}}, diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/5x6_right_trackball.c b/keyboards/handwired/dactyl_manuform/5x6_right_trackball/5x6_right_trackball.c index 69f750095..4f1b3f0bb 100644 --- a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/5x6_right_trackball.c +++ b/keyboards/handwired/dactyl_manuform/5x6_right_trackball/5x6_right_trackball.c @@ -206,7 +206,7 @@ void pointing_device_send(void) { #endif #ifdef SWAP_HANDS_ENABLE -const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { +const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { /* Left hand, matrix positions */ {{5, 6}, {4, 6}, {3, 6}, {2, 6}, {1, 6}, {0, 6}}, {{5, 7}, {4, 7}, {3, 7}, {2, 7}, {1, 7}, {0, 7}}, diff --git a/keyboards/handwired/pterodactyl/pterodactyl.c b/keyboards/handwired/pterodactyl/pterodactyl.c index 736b0a62c..f379569f5 100644 --- a/keyboards/handwired/pterodactyl/pterodactyl.c +++ b/keyboards/handwired/pterodactyl/pterodactyl.c @@ -3,7 +3,7 @@ #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) // swap-hands action needs a matrix to define the swap -const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { +const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{0,11}, {0,10}, {0,9}, {0,8}, {0,7}, {0,6}, {0,5}, {0,4}, {0,3}, {0,2}, {0,1}, {0,0}}, {{1,11}, {1,11}, {1,9}, {1,8}, {1,7}, {1,6}, {1,5}, {1,4}, {1,3}, {1,2}, {1,1}, {1,0}}, {{2,11}, {2,12}, {2,9}, {2,8}, {2,7}, {2,6}, {2,5}, {2,4}, {2,3}, {2,2}, {2,1}, {2,0}}, diff --git a/keyboards/jian/handwired/handwired.c b/keyboards/jian/handwired/handwired.c index bcb7ec710..2c1451829 100644 --- a/keyboards/jian/handwired/handwired.c +++ b/keyboards/jian/handwired/handwired.c @@ -1,6 +1,6 @@ #include "handwired.h" -const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { +const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{13, 0}, {12, 0}, {11, 0}, {10, 0}, {9, 0}, {8, 0}, {7, 0}, {6, 0}, {5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}}, {{13, 1}, {12, 1}, {11, 1}, {10, 1}, {9, 1}, {8, 1}, {7, 1}, {6, 1}, {5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}}, {{13, 2}, {12, 2}, {11, 2}, {10, 2}, {9, 2}, {8, 2}, {7, 2}, {6, 2}, {5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}}, diff --git a/keyboards/jian/nsrev2/nsrev2.c b/keyboards/jian/nsrev2/nsrev2.c index c3acff55e..48827416f 100644 --- a/keyboards/jian/nsrev2/nsrev2.c +++ b/keyboards/jian/nsrev2/nsrev2.c @@ -2,7 +2,7 @@ #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) -const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { +const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{0, 4}, {1, 4}, {2, 4}, {3, 4}, {4, 4}, {5, 4}}, {{0, 5}, {1, 5}, {2, 5}, {3, 5}, {4, 5}, {5, 5}}, {{0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}, {5, 6}}, diff --git a/keyboards/jian/rev1/rev1.c b/keyboards/jian/rev1/rev1.c index 1c7e93627..40d9f3bed 100644 --- a/keyboards/jian/rev1/rev1.c +++ b/keyboards/jian/rev1/rev1.c @@ -2,7 +2,7 @@ #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) -const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { +const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{0, 4}, {1, 4}, {2, 4}, {3, 4}, {4, 4}, {5, 4}, {6, 4}}, {{0, 5}, {1, 5}, {2, 5}, {3, 5}, {4, 5}, {5, 5}, {6, 5}}, {{0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}, {5, 6}, {6, 6}}, diff --git a/keyboards/jian/rev2/rev2.c b/keyboards/jian/rev2/rev2.c index 09824c665..b18676af3 100644 --- a/keyboards/jian/rev2/rev2.c +++ b/keyboards/jian/rev2/rev2.c @@ -2,7 +2,7 @@ #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) -const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { +const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{0, 4}, {1, 4}, {2, 4}, {3, 4}, {4, 4}, {5, 4}}, {{0, 5}, {1, 5}, {2, 5}, {3, 5}, {4, 5}, {5, 5}}, {{0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}, {5, 6}}, diff --git a/keyboards/keebio/iris/rev1/rev1.c b/keyboards/keebio/iris/rev1/rev1.c index 9694d122d..6249d2f0a 100644 --- a/keyboards/keebio/iris/rev1/rev1.c +++ b/keyboards/keebio/iris/rev1/rev1.c @@ -10,7 +10,7 @@ void led_set_kb(uint8_t usb_led) { #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) // swap-hands action needs a matrix to define the swap -const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { +const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { /* Left hand, matrix positions */ {{0,5}, {1,5}, {2,5}, {3,5}, {4,5}, {5,5}}, {{0,6}, {1,6}, {2,6}, {3,6}, {4,6}, {5,6}}, diff --git a/keyboards/keebio/iris/rev1_led/rev1_led.c b/keyboards/keebio/iris/rev1_led/rev1_led.c index af5fc9440..c330189c7 100644 --- a/keyboards/keebio/iris/rev1_led/rev1_led.c +++ b/keyboards/keebio/iris/rev1_led/rev1_led.c @@ -10,7 +10,7 @@ void led_set_kb(uint8_t usb_led) { #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) // swap-hands action needs a matrix to define the swap -const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { +const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { /* Left hand, matrix positions */ {{0,5}, {1,5}, {2,5}, {3,5}, {4,5}, {5,5}}, {{0,6}, {1,6}, {2,6}, {3,6}, {4,6}, {5,6}}, diff --git a/keyboards/keebio/iris/rev2/rev2.c b/keyboards/keebio/iris/rev2/rev2.c index 70c30695a..e8c2a66c9 100644 --- a/keyboards/keebio/iris/rev2/rev2.c +++ b/keyboards/keebio/iris/rev2/rev2.c @@ -3,7 +3,7 @@ #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) // swap-hands action needs a matrix to define the swap -const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { +const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { /* Left hand, matrix positions */ {{0,5}, {1,5}, {2,5}, {3,5}, {4,5}, {5,5}}, {{0,6}, {1,6}, {2,6}, {3,6}, {4,6}, {5,6}}, diff --git a/keyboards/keebio/iris/rev3/rev3.c b/keyboards/keebio/iris/rev3/rev3.c index f58c2093c..b97b097b7 100644 --- a/keyboards/keebio/iris/rev3/rev3.c +++ b/keyboards/keebio/iris/rev3/rev3.c @@ -3,7 +3,7 @@ #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) // swap-hands action needs a matrix to define the swap -const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { +const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { /* Left hand, matrix positions */ {{0,5}, {1,5}, {2,5}, {3,5}, {4,5}, {5,5}}, {{0,6}, {1,6}, {2,6}, {3,6}, {4,6}, {5,6}}, diff --git a/keyboards/keebio/levinson/levinson.c b/keyboards/keebio/levinson/levinson.c index 95f3fe9ef..b361640bc 100644 --- a/keyboards/keebio/levinson/levinson.c +++ b/keyboards/keebio/levinson/levinson.c @@ -2,7 +2,7 @@ #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) -const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { +const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{5, 4}, {4, 4}, {3, 4}, {2, 4}, {1, 4}, {0, 4}}, {{5, 5}, {4, 5}, {3, 5}, {2, 5}, {1, 5}, {0, 5}}, diff --git a/keyboards/keebio/wavelet/wavelet.c b/keyboards/keebio/wavelet/wavelet.c index 2bc9c65a5..68011e266 100644 --- a/keyboards/keebio/wavelet/wavelet.c +++ b/keyboards/keebio/wavelet/wavelet.c @@ -15,7 +15,7 @@ void matrix_init_kb(void) { #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) -const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { +const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{5, 4}, {4, 4}, {3, 4}, {2, 4}, {1, 4}, {0, 4}}, {{5, 5}, {4, 5}, {3, 5}, {2, 5}, {1, 5}, {0, 5}}, diff --git a/keyboards/kyria/rev1/rev1.c b/keyboards/kyria/rev1/rev1.c index 970a359e7..622ac279b 100644 --- a/keyboards/kyria/rev1/rev1.c +++ b/keyboards/kyria/rev1/rev1.c @@ -3,7 +3,7 @@ #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) -const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { +const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{0, 4}, {1, 4}, {2, 4}, {3, 4}, {4, 4}, {5, 4}, {6, 4}, {7, 4}}, {{0, 5}, {1, 5}, {2, 5}, {3, 5}, {4, 5}, {5, 5}, {6, 5}, {7, 5}}, {{0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}, {5, 6}, {6, 6}, {7, 6}}, @@ -12,6 +12,6 @@ const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{0, 1}, {1, 1}, {2, 1}, {3, 1}, {4, 1}, {5, 1}, {6, 1}, {7, 1}}, {{0, 2}, {1, 2}, {2, 2}, {3, 2}, {4, 2}, {5, 2}, {6, 2}, {7, 2}}, {{0, 3}, {1, 3}, {2, 3}, {3, 3}, {4, 3}, {5, 3}, {6, 3}, {7, 3}} -}; +}; #endif diff --git a/keyboards/lets_split/lets_split.c b/keyboards/lets_split/lets_split.c index c400ab7bb..ee0c931be 100644 --- a/keyboards/lets_split/lets_split.c +++ b/keyboards/lets_split/lets_split.c @@ -2,7 +2,7 @@ #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) -const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { +const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{0, 4}, {1, 4}, {2, 4}, {3, 4}, {4, 4}, {5, 4}}, {{0, 5}, {1, 5}, {2, 5}, {3, 5}, {4, 5}, {5, 5}}, diff --git a/keyboards/lets_split_eh/lets_split_eh.c b/keyboards/lets_split_eh/lets_split_eh.c index 7249f54cf..37075aa67 100644 --- a/keyboards/lets_split_eh/lets_split_eh.c +++ b/keyboards/lets_split_eh/lets_split_eh.c @@ -2,7 +2,7 @@ #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) -const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { +const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{0, 4}, {1, 4}, {2, 4}, {3, 4}, {4, 4}, {5, 4}}, {{0, 5}, {1, 5}, {2, 5}, {3, 5}, {4, 5}, {5, 5}}, diff --git a/keyboards/mitosis/mitosis.c b/keyboards/mitosis/mitosis.c index 50b6d8452..ea3d1c99d 100644 --- a/keyboards/mitosis/mitosis.c +++ b/keyboards/mitosis/mitosis.c @@ -16,7 +16,7 @@ void matrix_init_kb(void) { #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) -const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { +const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{9, 0}, {8, 0}, {7, 0}, {6, 0}, {5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}}, {{9, 1}, {8, 1}, {7, 1}, {6, 1}, {5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}}, {{9, 2}, {8, 2}, {7, 2}, {6, 2}, {5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}}, diff --git a/keyboards/moonlander/moonlander.c b/keyboards/moonlander/moonlander.c index 39f61b5c4..bc4047b84 100644 --- a/keyboards/moonlander/moonlander.c +++ b/keyboards/moonlander/moonlander.c @@ -370,7 +370,7 @@ bool music_mask_kb(uint16_t keycode) { #ifdef SWAP_HANDS_ENABLE // swap-hands action needs a matrix to define the swap // clang-format off -const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { +const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { /* Left hand, matrix positions */ {{6,6}, {5,6}, {4,6}, {3,6}, {2,6}, {1,6},{0,6}}, {{6,7}, {5,7}, {4,7}, {3,7}, {2,7}, {1,7},{0,7}}, diff --git a/keyboards/niu_mini/niu_mini.c b/keyboards/niu_mini/niu_mini.c index 835625ee4..cd9c0cdfe 100644 --- a/keyboards/niu_mini/niu_mini.c +++ b/keyboards/niu_mini/niu_mini.c @@ -2,7 +2,7 @@ #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) -const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { +const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{11, 0}, {10, 0}, {9, 0}, {8, 0}, {7, 0}, {6, 0}, {5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}}, {{11, 1}, {10, 1}, {9, 1}, {8, 1}, {7, 1}, {6, 1}, {5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}}, {{11, 2}, {10, 2}, {9, 2}, {8, 2}, {7, 2}, {6, 2}, {5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}}, diff --git a/keyboards/orthodox/rev1/rev1.c b/keyboards/orthodox/rev1/rev1.c index ecb908b3a..db8d435c3 100644 --- a/keyboards/orthodox/rev1/rev1.c +++ b/keyboards/orthodox/rev1/rev1.c @@ -37,7 +37,7 @@ void matrix_init_kb(void) { #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) // swap-hands action needs a matrix to define the swap -const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { +const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { /* Left hand, matrix positions */ {{0,3}, {1,3}, {2,3}, {3,3}, {4,3}, {5,3}, {6,3}, {7,3}, {8,3}}, {{0,4}, {1,4}, {2,4}, {3,4}, {4,4}, {5,4}, {6,4}, {7,4}, {8,4}}, diff --git a/keyboards/orthodox/rev3/rev3.c b/keyboards/orthodox/rev3/rev3.c index ecb908b3a..db8d435c3 100644 --- a/keyboards/orthodox/rev3/rev3.c +++ b/keyboards/orthodox/rev3/rev3.c @@ -37,7 +37,7 @@ void matrix_init_kb(void) { #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) // swap-hands action needs a matrix to define the swap -const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { +const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { /* Left hand, matrix positions */ {{0,3}, {1,3}, {2,3}, {3,3}, {4,3}, {5,3}, {6,3}, {7,3}, {8,3}}, {{0,4}, {1,4}, {2,4}, {3,4}, {4,4}, {5,4}, {6,4}, {7,4}, {8,4}}, diff --git a/keyboards/orthodox/rev3_teensy/rev3_teensy.c b/keyboards/orthodox/rev3_teensy/rev3_teensy.c index ecb908b3a..db8d435c3 100644 --- a/keyboards/orthodox/rev3_teensy/rev3_teensy.c +++ b/keyboards/orthodox/rev3_teensy/rev3_teensy.c @@ -37,7 +37,7 @@ void matrix_init_kb(void) { #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) // swap-hands action needs a matrix to define the swap -const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { +const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { /* Left hand, matrix positions */ {{0,3}, {1,3}, {2,3}, {3,3}, {4,3}, {5,3}, {6,3}, {7,3}, {8,3}}, {{0,4}, {1,4}, {2,4}, {3,4}, {4,4}, {5,4}, {6,4}, {7,4}, {8,4}}, diff --git a/keyboards/planck/planck.c b/keyboards/planck/planck.c index 5a65d5e5f..1f824efaa 100644 --- a/keyboards/planck/planck.c +++ b/keyboards/planck/planck.c @@ -2,7 +2,7 @@ #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) -const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { +const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{11, 0}, {10, 0}, {9, 0}, {8, 0}, {7, 0}, {6, 0}, {5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}}, {{11, 1}, {10, 1}, {9, 1}, {8, 1}, {7, 1}, {6, 1}, {5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}}, {{11, 2}, {10, 2}, {9, 2}, {8, 2}, {7, 2}, {6, 2}, {5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}}, diff --git a/keyboards/preonic/rev1/rev1.c b/keyboards/preonic/rev1/rev1.c index c9fd8330e..bf8374360 100644 --- a/keyboards/preonic/rev1/rev1.c +++ b/keyboards/preonic/rev1/rev1.c @@ -26,7 +26,7 @@ void matrix_init_kb(void) { #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) - const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { + const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{11, 0}, {10, 0}, {9, 0}, {8, 0}, {7, 0}, {6, 0}, {5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}}, {{11, 1}, {10, 1}, {9, 1}, {8, 1}, {7, 1}, {6, 1}, {5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}}, {{11, 2}, {10, 2}, {9, 2}, {8, 2}, {7, 2}, {6, 2}, {5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}}, diff --git a/keyboards/preonic/rev2/rev2.c b/keyboards/preonic/rev2/rev2.c index c0e72620e..a3929249d 100644 --- a/keyboards/preonic/rev2/rev2.c +++ b/keyboards/preonic/rev2/rev2.c @@ -26,7 +26,7 @@ void matrix_init_kb(void) { #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) - const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { + const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{11, 0}, {10, 0}, {9, 0}, {8, 0}, {7, 0}, {6, 0}, {5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}}, {{11, 1}, {10, 1}, {9, 1}, {8, 1}, {7, 1}, {6, 1}, {5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}}, {{11, 2}, {10, 2}, {9, 2}, {8, 2}, {7, 2}, {6, 2}, {5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}}, diff --git a/keyboards/preonic/rev3/rev3.c b/keyboards/preonic/rev3/rev3.c index 161c1c963..ec8a56108 100644 --- a/keyboards/preonic/rev3/rev3.c +++ b/keyboards/preonic/rev3/rev3.c @@ -63,7 +63,7 @@ void dip_switch_update_user(uint8_t index, bool active) { #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) -const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { +const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{5, 4}, {4, 4}, {3, 4}, {2, 4}, {1, 4}, {0, 4}}, {{5, 5}, {4, 5}, {3, 5}, {2, 5}, {1, 5}, {0, 5}}, {{5, 6}, {4, 6}, {3, 6}, {2, 6}, {1, 6}, {0, 6}}, diff --git a/keyboards/redox_w/redox_w.c b/keyboards/redox_w/redox_w.c index 05fa33957..a94e731b3 100644 --- a/keyboards/redox_w/redox_w.c +++ b/keyboards/redox_w/redox_w.c @@ -17,7 +17,7 @@ void matrix_init_kb(void) { #ifdef ONEHAND_ENABLE __attribute__ ((weak)) -const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { +const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{13, 0}, {12, 0}, {11, 0}, {10, 0}, {9, 0}, {8, 0}, {7, 0}, {6, 0}, {5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}}, {{13, 1}, {12, 1}, {11, 1}, {10, 1}, {9, 1}, {8, 1}, {7, 1}, {6, 1}, {5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}}, {{13, 2}, {12, 2}, {11, 2}, {10, 2}, {9, 2}, {8, 2}, {7, 2}, {6, 2}, {5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}}, diff --git a/keyboards/sirius/uni660/rev1/rev1.c b/keyboards/sirius/uni660/rev1/rev1.c index d4adac24b..7cc75ee22 100644 --- a/keyboards/sirius/uni660/rev1/rev1.c +++ b/keyboards/sirius/uni660/rev1/rev1.c @@ -19,7 +19,7 @@ void matrix_init_kb(void) { /* #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) -const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { +const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{9, 0}, {8, 0}, {7, 0}, {6, 0}, {5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}}, {{9, 1}, {8, 1}, {7, 1}, {6, 1}, {5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}}, {{9, 2}, {8, 2}, {7, 2}, {6, 2}, {5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}}, diff --git a/keyboards/sirius/uni660/rev2/rev2.c b/keyboards/sirius/uni660/rev2/rev2.c index 048495b99..2c2515c0e 100644 --- a/keyboards/sirius/uni660/rev2/rev2.c +++ b/keyboards/sirius/uni660/rev2/rev2.c @@ -19,7 +19,7 @@ void matrix_init_kb(void) { /* #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) -const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { +const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{9, 0}, {8, 0}, {7, 0}, {6, 0}, {5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}}, {{9, 1}, {8, 1}, {7, 1}, {6, 1}, {5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}}, {{9, 2}, {8, 2}, {7, 2}, {6, 2}, {5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}}, diff --git a/keyboards/splitty/splitty.c b/keyboards/splitty/splitty.c index 652d1f781..707f28983 100644 --- a/keyboards/splitty/splitty.c +++ b/keyboards/splitty/splitty.c @@ -19,7 +19,7 @@ #ifdef SWAP_HANDS_ENABLE // clang-format off __attribute__ ((weak)) -const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { +const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{0, 5}, {1, 5}, {2, 5}, {3, 5}, {4, 5}, {5, 5}, {6, 5}}, {{0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}, {5, 6}, {6, 6}}, diff --git a/keyboards/telophase/telophase.c b/keyboards/telophase/telophase.c index 0e04debeb..7484551c9 100644 --- a/keyboards/telophase/telophase.c +++ b/keyboards/telophase/telophase.c @@ -17,7 +17,7 @@ void matrix_init_kb(void) { #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) -const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { +const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{12, 0}, {11, 0}, {10, 0}, {9, 0}, {8, 0}, {7, 0}, {6, 0}, {5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}}, {{12, 1}, {11, 1}, {10, 1}, {9, 1}, {8, 1}, {7, 1}, {6, 1}, {5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}}, {{12, 2}, {11, 2}, {10, 2}, {9, 2}, {8, 2}, {7, 2}, {6, 2}, {5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}}, diff --git a/keyboards/vitamins_included/vitamins_included.c b/keyboards/vitamins_included/vitamins_included.c index 650f26001..078f93e0e 100644 --- a/keyboards/vitamins_included/vitamins_included.c +++ b/keyboards/vitamins_included/vitamins_included.c @@ -2,7 +2,7 @@ #ifdef ONEHAND_ENABLE __attribute__ ((weak)) -const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { +const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{0, 4}, {1, 4}, {2, 4}, {3, 4}, {4, 4}, {5, 4}}, {{0, 5}, {1, 5}, {2, 5}, {3, 5}, {4, 5}, {5, 5}}, diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c index aae5cbfa5..f41665b06 100644 --- a/tmk_core/common/action.c +++ b/tmk_core/common/action.c @@ -133,7 +133,8 @@ void process_hand_swap(keyevent_t *event) { bool do_swap = event->pressed ? swap_hands : swap_state[pos.row] & (col_bit); if (do_swap) { - event->key = hand_swap_config[pos.row][pos.col]; + event->key.row = pgm_read_byte(&hand_swap_config[pos.row][pos.col].row); + event->key.col = pgm_read_byte(&hand_swap_config[pos.row][pos.col].col); swap_state[pos.row] |= col_bit; } else { swap_state[pos.row] &= ~(col_bit); diff --git a/tmk_core/common/action.h b/tmk_core/common/action.h index 9a991de1c..6c8456178 100644 --- a/tmk_core/common/action.h +++ b/tmk_core/common/action.h @@ -78,7 +78,7 @@ extern bool disable_action_cache; /* Code for handling one-handed key modifiers. */ #ifdef SWAP_HANDS_ENABLE extern bool swap_hands; -extern const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS]; +extern const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS]; # if (MATRIX_COLS <= 8) typedef uint8_t swap_state_row_t; # elif (MATRIX_COLS <= 16)