summaryrefslogtreecommitdiffstats
path: root/keyboards
diff options
context:
space:
mode:
authorzvecr <git@zvecr.com>2019-04-20 08:34:13 +0200
committerDrashna Jaelre <drashna@live.com>2019-04-20 08:34:13 +0200
commitedcedd53d1bfb761cca37553729ad881f2a738e6 (patch)
treeefa87ae851346099b405f2dfa0406db33a83d330 /keyboards
parent8170be5b10e92a4f4a8c23ad0c9dd558c4fc90c7 (diff)
downloadqmk_firmware-edcedd53d1bfb761cca37553729ad881f2a738e6.tar.gz
qmk_firmware-edcedd53d1bfb761cca37553729ad881f2a738e6.tar.xz
[Keyboard] Add LAYOUT macro and Configurator config (#5656)
Diffstat (limited to 'keyboards')
-rw-r--r--keyboards/touchpad/info.json19
-rw-r--r--keyboards/touchpad/keymaps/default/keymap.c16
-rw-r--r--keyboards/touchpad/touchpad.h17
3 files changed, 44 insertions, 8 deletions
diff --git a/keyboards/touchpad/info.json b/keyboards/touchpad/info.json
new file mode 100644
index 000000000..625bbffd8
--- /dev/null
+++ b/keyboards/touchpad/info.json
@@ -0,0 +1,19 @@
+{
+ "keyboard_name": "touchpad",
+ "url": "",
+ "maintainer": "qmk",
+ "width": 6,
+ "height": 6,
+ "layouts": {
+ "LAYOUT_ortho_6x6": {
+ "layout": [
+ {"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0},
+ {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1},
+ {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2},
+ {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3},
+ {"x":0, "y":4}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4}, {"x":4, "y":4}, {"x":5, "y":4},
+ {"x":0, "y":5}, {"x":1, "y":5}, {"x":2, "y":5}, {"x":3, "y":5}, {"x":4, "y":5}, {"x":5, "y":5}
+ ]
+ }
+ }
+} \ No newline at end of file
diff --git a/keyboards/touchpad/keymaps/default/keymap.c b/keyboards/touchpad/keymaps/default/keymap.c
index 92f772aaa..7fcaa70c5 100644
--- a/keyboards/touchpad/keymaps/default/keymap.c
+++ b/keyboards/touchpad/keymaps/default/keymap.c
@@ -18,13 +18,13 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-[0] = {
- { KC_A, KC_B, KC_C, KC_D, KC_E, KC_F },
- { KC_A, KC_B, KC_C, KC_D, KC_E, KC_F },
- { KC_A, KC_B, KC_C, KC_D, KC_E, KC_F },
- { KC_A, KC_B, KC_C, KC_D, KC_E, KC_F },
- { KC_A, KC_B, KC_C, KC_D, KC_E, KC_F },
- { KC_A, KC_B, KC_C, KC_D, KC_E, KC_F }
-}
+ [0] = LAYOUT_ortho_6x6(
+ KC_A, KC_B, KC_C, KC_D, KC_E, KC_F,
+ KC_A, KC_B, KC_C, KC_D, KC_E, KC_F,
+ KC_A, KC_B, KC_C, KC_D, KC_E, KC_F,
+ KC_A, KC_B, KC_C, KC_D, KC_E, KC_F,
+ KC_A, KC_B, KC_C, KC_D, KC_E, KC_F,
+ KC_A, KC_B, KC_C, KC_D, KC_E, KC_F
+ )
};
diff --git a/keyboards/touchpad/touchpad.h b/keyboards/touchpad/touchpad.h
index 010d4b138..97b59a033 100644
--- a/keyboards/touchpad/touchpad.h
+++ b/keyboards/touchpad/touchpad.h
@@ -1,2 +1,19 @@
#pragma once
#include "quantum.h"
+
+#define LAYOUT_ortho_6x6( \
+ K00, K01, K02, K03, K04, K05, \
+ K10, K11, K12, K13, K14, K15, \
+ K20, K21, K22, K23, K24, K25, \
+ K30, K31, K32, K33, K34, K35, \
+ K40, K41, K42, K43, K44, K45, \
+ K50, K51, K52, K53, K54, K55 \
+) \
+{ \
+ { K00, K01, K02, K03, K04, K05 }, \
+ { K10, K11, K12, K13, K14, K15 }, \
+ { K20, K21, K22, K23, K24, K25 }, \
+ { K30, K31, K32, K33, K34, K35 }, \
+ { K40, K41, K42, K43, K44, K45 }, \
+ { K50, K51, K52, K53, K54, K55 } \
+}