From c465cf2fd3bc57259ad72441e462f07b694b962e Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Tue, 22 May 2018 15:58:56 -0700 Subject: Refactor and Configurator updates for 9key (#3024) --- keyboards/9key/9key.h | 2 +- keyboards/9key/info.json | 12 ++++++++++++ keyboards/9key/keymaps/default/keymap.c | 6 +++--- 3 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 keyboards/9key/info.json (limited to 'keyboards') 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 \ -- cgit v1.2.3