From 5319667c5504ab28b5bdb6f81ae22ecfec5e4a46 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Thu, 12 Apr 2018 10:03:50 -0700 Subject: Support upcoming caps_unlocked boards in QMK Configurator (#2738) * Change KEYMAP macro to LAYOUT macro * Add CU24 QMK Configurator Support - Change KEYMAP macro to LAYOUT macro - Add new LAYOUTS to support a default numpad * QMK Configurator Support for CU75 Add LAYOUT_all to support all layouts Add corresponding info.json --- keyboards/cu24/cu24.h | 21 ++++++++++++++++++++- keyboards/cu24/info.json | 16 ++++++++++++++++ keyboards/cu24/keymaps/default/keymap.c | 4 ++-- 3 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 keyboards/cu24/info.json (limited to 'keyboards/cu24') diff --git a/keyboards/cu24/cu24.h b/keyboards/cu24/cu24.h index e8e6b46ec8..d329182d23 100644 --- a/keyboards/cu24/cu24.h +++ b/keyboards/cu24/cu24.h @@ -22,7 +22,7 @@ // The following is an example using the Planck MIT layout // The first section contains all of the arguments // The second converts the arguments into a two-dimensional array -#define KEYMAP( \ +#define LAYOUT_grid( \ k00, k01, k02, k03, \ k10, k11, k12, k13, \ k20, k21, k22, k23, \ @@ -39,4 +39,23 @@ { k50, k51, k52, k53 } \ } +#define LAYOUT_numpad( \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, k23, \ + k30, k31, k32, \ + k40, k41, k42, k43, \ + k51, k52 \ +) \ +{ \ + { k00, k01, k02, k03 }, \ + { k10, k11, k12, k13 }, \ + { k20, k21, k22, k23 }, \ + { k30, k31, k32, KC_NO }, \ + { k40, k41, k42, k43 }, \ + { KC_NO, k51, k52, KC_NO } \ +} + + + #endif diff --git a/keyboards/cu24/info.json b/keyboards/cu24/info.json new file mode 100644 index 0000000000..7cd9a3f1f9 --- /dev/null +++ b/keyboards/cu24/info.json @@ -0,0 +1,16 @@ +{ + "keyboard_name": "cu24", + "url": "", + "maintainer": "qmk", + "width": 4, + "height": 6, + "layouts": { + "LAYOUT_grid": { + "layout": [{"label":"Num Lock", "x":0, "y":0}, {"label":"/", "x":1, "y":0}, {"label":"*", "x":2, "y":0}, {"label":"-", "x":3, "y":0}, {"label":"7", "x":0, "y":1}, {"label":"8", "x":1, "y":1}, {"label":"9", "x":2, "y":1}, {"label":"+", "x":3, "y":1}, {"label":"4", "x":0, "y":2}, {"label":"5", "x":1, "y":2}, {"label":"6", "x":2, "y":2}, {"x":3, "y":2}, {"label":"1", "x":0, "y":3}, {"label":"2", "x":1, "y":3}, {"label":"3", "x":2, "y":3}, {"label":"Enter", "x":3, "y":3}, {"label":"0", "x":0, "y":4}, {"x":1, "y":4}, {"label":".", "x":2, "y":4}, {"x":3, "y":4}, {"x":0, "y":5}, {"x":1, "y":5}, {"x":2, "y":5}, {"x":3, "y":5}] + }, + + "LAYOUT_numpad": { + "layout": [{"label":"Num Lock", "x":0, "y":0}, {"label":"/", "x":1, "y":0}, {"label":"*", "x":2, "y":0}, {"label":"-", "x":3, "y":0}, {"label":"7", "x":0, "y":1}, {"label":"8", "x":1, "y":1}, {"label":"9", "x":2, "y":1}, {"label":"+", "x":3, "y":1}, {"label":"4", "x":0, "y":2}, {"label":"5", "x":1, "y":2}, {"label":"6", "x":2, "y":2}, {"x":3, "y":2, "h":2}, {"label":"1", "x":0, "y":3}, {"label":"2", "x":1, "y":3}, {"label":"3", "x":2, "y":3}, {"label":"0", "x":0, "y":4}, {"x":1, "y":4}, {"label":".", "x":2, "y":4}, {"x":3, "y":4, "h":2}, {"x":0, "y":5, "w":2}, {"x":2, "y":5}] + } + } +} \ No newline at end of file diff --git a/keyboards/cu24/keymaps/default/keymap.c b/keyboards/cu24/keymaps/default/keymap.c index 8e2f656328..73427ee8ab 100644 --- a/keyboards/cu24/keymaps/default/keymap.c +++ b/keyboards/cu24/keymaps/default/keymap.c @@ -16,7 +16,7 @@ #include "cu24.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[0] = KEYMAP( /* Base */ +[0] = LAYOUT_grid( /* Base */ KC_MPLY, KC_MUTE, KC_VOLD, KC_VOLU, \ MO(1) , KC_PSLS, KC_PAST, KC_PMNS, \ KC_P7 , KC_P8 , KC_P9 , KC_PPLS, \ @@ -25,7 +25,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_P0 , KC_P0 , KC_PDOT, KC_PENT ), -[1] = KEYMAP( /* FN */ +[1] = LAYOUT_grid( /* FN */ RGB_TOG, RGB_MOD, BL_STEP, BL_BRTG, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS, \ -- cgit v1.2.3