summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornoroadsleft <18669334+noroadsleft@users.noreply.github.com>2018-05-22 15:58:56 -0700
committerDrashna Jaelre <drashna@live.com>2018-05-22 15:58:56 -0700
commitc465cf2fd3bc57259ad72441e462f07b694b962e (patch)
tree78da5c0fad8b1b7f456d9b198b780378ef5009f0
parentc29d8ffd5af86eddc7e09d1963d8e26f544c5de6 (diff)
downloadqmk_firmware-c465cf2fd3bc57259ad72441e462f07b694b962e.tar.gz
qmk_firmware-c465cf2fd3bc57259ad72441e462f07b694b962e.zip
Refactor and Configurator updates for 9key (#3024)
-rw-r--r--keyboards/9key/9key.h2
-rw-r--r--keyboards/9key/info.json12
-rw-r--r--keyboards/9key/keymaps/default/keymap.c6
3 files changed, 16 insertions, 4 deletions
diff --git a/keyboards/9key/9key.h b/keyboards/9key/9key.h
index f1cb30628f..b60dc53c00 100644
--- a/keyboards/9key/9key.h
+++ b/keyboards/9key/9key.h
@@ -3,7 +3,7 @@
#include "quantum.h"
-#define KEYMAP( \
+#define LAYOUT( \
k00, k01, k02, \
k10, k11, k12, \
k20, k21, k22 \
diff --git a/keyboards/9key/info.json b/keyboards/9key/info.json
new file mode 100644
index 0000000000..cadfdbc4c2
--- /dev/null
+++ b/keyboards/9key/info.json
@@ -0,0 +1,12 @@
+{
+ "keyboard_name": "9key",
+ "url": "",
+ "maintainer": "qmk",
+ "width": 3,
+ "height": 3,
+ "layouts": {
+ "LAYOUT": {
+ "layout": [{"label":"k00", "x":0, "y":0}, {"label":"k01", "x":1, "y":0}, {"label":"k02", "x":2, "y":0}, {"label":"k10", "x":0, "y":1}, {"label":"k11", "x":1, "y":1}, {"label":"k12", "x":2, "y":1}, {"label":"k20", "x":0, "y":2}, {"label":"k21", "x":1, "y":2}, {"label":"k22", "x":2, "y":2}]
+ }
+ }
+}
diff --git a/keyboards/9key/keymaps/default/keymap.c b/keyboards/9key/keymaps/default/keymap.c
index 65f0cdd208..9f63971695 100644
--- a/keyboards/9key/keymaps/default/keymap.c
+++ b/keyboards/9key/keymaps/default/keymap.c
@@ -1,4 +1,4 @@
-#include "9key.h"
+#include QMK_KEYBOARD_H
// Tap Dance Declarations
enum {
@@ -22,7 +22,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | 7/0 | 8 | 9/FN | 7/0 = Dbl Tap 7 for 0 - 9/FN = Hold 9 for FN
* `-----------------------'
*/
-[0] = KEYMAP( \
+[0] = LAYOUT( \
KC_1, KC_2, KC_3, \
KC_4, TD(ENT_5), KC_6, \
TD(ZERO_7), KC_8, LT(1, KC_9) \
@@ -37,7 +37,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | 00 | . | |
* `-----------------------'
*/
-[1] = KEYMAP( \
+[1] = LAYOUT( \
KC_ESC, KC_PLUS, KC_MINS, \
KC_BSPC, KC_ASTR, KC_SLSH, \
M(DBL_0), KC_DOT, KC_TRNS \