From f0b30e0027cb890c7510fa22e5824a43c0d9e86f Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Sun, 9 May 2021 23:21:09 -0700 Subject: [PATCH] Make Swap Hands use PROGMEM (#12284) This converts the array that the Swap Hands feature uses to use PROGMEM, and to read from that array, as such. Since this array never changes at runtime, there is no reason to keep it in memory. Especially for AVR boards, as memory is a precious resource. --- docs/feature_swap_hands.md | 2 +- docs/ja/feature_swap_hands.md | 2 +- keyboards/40percentclub/25/25.c | 2 +- keyboards/40percentclub/6lit/6lit.c | 2 +- keyboards/40percentclub/foobar/foobar.c | 2 +- keyboards/adkb96/adkb96.c | 2 +- keyboards/centromere/centromere.c | 10 +++++----- keyboards/crkbd/crkbd.c | 3 +-- keyboards/ergo42/ergo42.c | 2 +- keyboards/ergodox_ez/ergodox_ez.c | 2 +- keyboards/ergodox_infinity/ergodox_infinity.c | 2 +- keyboards/ergoslab/rev1/rev1.c | 2 +- keyboards/gergo/gergo.c | 2 +- keyboards/handwired/dactyl/dactyl.c | 2 +- .../5x6_right_trackball/5x6_right_trackball.c | 2 +- keyboards/handwired/pterodactyl/pterodactyl.c | 2 +- keyboards/jian/handwired/handwired.c | 2 +- keyboards/jian/nsrev2/nsrev2.c | 2 +- keyboards/jian/rev1/rev1.c | 2 +- keyboards/jian/rev2/rev2.c | 2 +- keyboards/keebio/iris/rev1/rev1.c | 2 +- keyboards/keebio/iris/rev1_led/rev1_led.c | 2 +- keyboards/keebio/iris/rev2/rev2.c | 2 +- keyboards/keebio/iris/rev3/rev3.c | 2 +- keyboards/keebio/levinson/levinson.c | 2 +- keyboards/keebio/wavelet/wavelet.c | 2 +- keyboards/kyria/rev1/rev1.c | 4 ++-- keyboards/lets_split/lets_split.c | 2 +- keyboards/lets_split_eh/lets_split_eh.c | 2 +- keyboards/mitosis/mitosis.c | 2 +- keyboards/moonlander/moonlander.c | 2 +- keyboards/niu_mini/niu_mini.c | 2 +- keyboards/orthodox/rev1/rev1.c | 2 +- keyboards/orthodox/rev3/rev3.c | 2 +- keyboards/orthodox/rev3_teensy/rev3_teensy.c | 2 +- keyboards/planck/planck.c | 2 +- keyboards/preonic/rev1/rev1.c | 2 +- keyboards/preonic/rev2/rev2.c | 2 +- keyboards/preonic/rev3/rev3.c | 2 +- keyboards/redox_w/redox_w.c | 2 +- keyboards/sirius/uni660/rev1/rev1.c | 2 +- keyboards/sirius/uni660/rev2/rev2.c | 2 +- keyboards/splitty/splitty.c | 2 +- keyboards/telophase/telophase.c | 2 +- keyboards/vitamins_included/vitamins_included.c | 2 +- tmk_core/common/action.c | 3 ++- tmk_core/common/action.h | 2 +- 47 files changed, 53 insertions(+), 53 deletions(-) diff --git a/docs/feature_swap_hands.md b/docs/feature_swap_hands.md index 009477d203..cbc574b6b8 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 3150801c55..5164584e8a 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 54a42d263c..de1b038aa8 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 fd3ae7d009..59d7e33bd6 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 c032056a15..b0a1518df1 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 9a1c85a2ce..93230ee00c 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 269c60fd75..8d46520e38 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 ab1381a39b..6220c9822a 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 e42dcb2261..bd7a7ffe19 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 e6f48c49fb..4d35675211 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 a9962f96a0..97b628470b 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 0e3e0fe996..115dab51e4 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 fab8d0f44c..ba359f8145 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 81b9dce0f9..ff9b4e08af 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 69f7500957..4f1b3f0bbf 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 736b0a62c4..f379569f5a 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 bcb7ec7102..2c14518299 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 c3acff55ee..48827416f1 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 1c7e936270..40d9f3beda 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 09824c6652..b18676af38 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 9694d122df..6249d2f0ac 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 af5fc9440b..c330189c7c 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 70c30695ad..e8c2a66c98 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 f58c2093c4..b97b097b78 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 95f3fe9ef8..b361640bcf 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 2bc9c65a52..68011e266c 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 970a359e71..622ac279bd 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 c400ab7bb8..ee0c931be2 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 7249f54cf2..37075aa67d 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 50b6d8452f..ea3d1c99d7 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 39f61b5c40..bc4047b847 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 835625ee4f..cd9c0cdfed 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 ecb908b3ae..db8d435c33 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 ecb908b3ae..db8d435c33 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 ecb908b3ae..db8d435c33 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 5a65d5e5f3..1f824efaae 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 c9fd8330ef..bf83743605 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 c0e72620ed..a3929249d0 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 161c1c9636..ec8a56108e 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 05fa339571..a94e731b39 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 d4adac24b5..7cc75ee22a 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 048495b992..2c2515c0ed 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 652d1f781b..707f289832 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 0e04debeb8..7484551c91 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 650f26001e..078f93e0e6 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 aae5cbfa5f..f41665b06c 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 9a991de1c2..6c84561785 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)