summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Wasson <jwasson+github@gmail.com>2016-07-28 01:25:29 -0700
committerJoe Wasson <jwasson+github@gmail.com>2016-08-20 17:46:53 -0700
commit66adbfcab5c197f01ead2c07a79b25d2f2b93b1a (patch)
treeaf504cb1081adf04386df2159b48ca309f38c05c
parent8090f6b499fd87ddeb7a191f7bc3dace9d03be23 (diff)
Add default swap configs for a couple of boards.
-rw-r--r--keyboards/ergodox/infinity/infinity.c24
-rw-r--r--keyboards/planck/planck.c10
-rw-r--r--keyboards/preonic/preonic.c11
3 files changed, 45 insertions, 0 deletions
diff --git a/keyboards/ergodox/infinity/infinity.c b/keyboards/ergodox/infinity/infinity.c
index f89e046d0d..c5793385fe 100644
--- a/keyboards/ergodox/infinity/infinity.c
+++ b/keyboards/ergodox/infinity/infinity.c
@@ -130,3 +130,27 @@ void ergodox_right_led_3_off(void){
void ergodox_right_led_off(uint8_t led){
}
+
+#ifdef ONEHAND_ENABLE
+__attribute__ ((weak))
+const keypos_t 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}},
+ {{0, 12}, {1, 12}, {2, 12}, {3, 12}, {4, 12}},
+ {{0, 13}, {1, 13}, {2, 13}, {3, 13}, {4, 13}},
+ {{0, 14}, {1, 14}, {2, 14}, {3, 14}, {4, 14}},
+ {{0, 15}, {1, 15}, {2, 15}, {3, 15}, {4, 15}},
+ {{0, 16}, {1, 16}, {2, 16}, {3, 16}, {4, 16}},
+ {{0, 17}, {1, 17}, {2, 17}, {3, 17}, {4, 17}},
+ {{0, 0}, {1, 0}, {2, 0}, {3, 0}, {4, 0}},
+ {{0, 1}, {1, 1}, {2, 1}, {3, 1}, {4, 1}},
+ {{0, 2}, {1, 2}, {2, 2}, {3, 2}, {4, 2}},
+ {{0, 3}, {1, 3}, {2, 3}, {3, 3}, {4, 3}},
+ {{0, 4}, {1, 4}, {2, 4}, {3, 4}, {4, 4}},
+ {{0, 5}, {1, 5}, {2, 5}, {3, 5}, {4, 5}},
+ {{0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}},
+ {{0, 7}, {1, 7}, {2, 7}, {3, 7}, {4, 7}},
+ {{0, 8}, {1, 8}, {2, 8}, {3, 8}, {4, 8}},
+};
+#endif
diff --git a/keyboards/planck/planck.c b/keyboards/planck/planck.c
index 8d70bb4e5a..645b450d1d 100644
--- a/keyboards/planck/planck.c
+++ b/keyboards/planck/planck.c
@@ -1,5 +1,15 @@
#include "planck.h"
+#ifdef ONEHAND_ENABLE
+__attribute__ ((weak))
+const keypos_t 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}},
+ {{11, 3}, {10, 3}, {9, 3}, {8, 3}, {7, 3}, {6, 3}, {5, 3}, {4, 3}, {3, 3}, {2, 3}, {1, 3}, {0, 3}},
+};
+#endif
+
void matrix_init_kb(void) {
// Turn status LED on
DDRE |= (1<<6);
diff --git a/keyboards/preonic/preonic.c b/keyboards/preonic/preonic.c
index 889c3fc8fd..d9c119b8da 100644
--- a/keyboards/preonic/preonic.c
+++ b/keyboards/preonic/preonic.c
@@ -1,5 +1,16 @@
#include "preonic.h"
+#ifdef ONEHAND_ENABLE
+__attribute__ ((weak))
+const keypos_t 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}},
+ {{11, 3}, {10, 3}, {9, 3}, {8, 3}, {7, 3}, {6, 3}, {5, 3}, {4, 3}, {3, 3}, {2, 3}, {1, 3}, {0, 3}},
+ {{11, 4}, {10, 4}, {9, 4}, {8, 4}, {7, 4}, {6, 4}, {5, 4}, {4, 4}, {3, 4}, {2, 4}, {1, 4}, {0, 4}},
+};
+#endif
+
void matrix_init_kb(void) {
// Turn status LED on