diff options
Diffstat (limited to 'keyboards/ckeys/nakey')
-rw-r--r-- | keyboards/ckeys/nakey/info.json | 6 | ||||
-rw-r--r-- | keyboards/ckeys/nakey/keymaps/default/keymap.c | 35 | ||||
-rw-r--r-- | keyboards/ckeys/nakey/nakey.h | 13 | ||||
-rw-r--r-- | keyboards/ckeys/nakey/rules.mk | 2 |
4 files changed, 28 insertions, 28 deletions
diff --git a/keyboards/ckeys/nakey/info.json b/keyboards/ckeys/nakey/info.json index b44d0daf74..093e61d0e0 100644 --- a/keyboards/ckeys/nakey/info.json +++ b/keyboards/ckeys/nakey/info.json @@ -5,8 +5,8 @@ "width": 4, "height": 5, "layouts": { - "LAYOUT": { - "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, "h":2}, {"label":"4", "x":0, "y":2}, {"label":"5", "x":1, "y":2}, {"label":"6", "x":2, "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, "h":2}, {"label":"0", "x":0, "y":4, "w":2}, {"label":".", "x":2, "y":4}] - } + "LAYOUT_numpad_5x4": { + "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":"4", "x":0, "y":2}, {"label":"5", "x":1, "y":2}, {"label":"6", "x":2, "y":2}, {"label":"+", "x":3, "y":1, "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, "w":2}, {"label":".", "x":2, "y":4}, {"label":"Enter", "x":3, "y":3, "h":2}] + } } } diff --git a/keyboards/ckeys/nakey/keymaps/default/keymap.c b/keyboards/ckeys/nakey/keymaps/default/keymap.c index ebbb128bd2..9c3e45b946 100644 --- a/keyboards/ckeys/nakey/keymaps/default/keymap.c +++ b/keyboards/ckeys/nakey/keymaps/default/keymap.c @@ -16,32 +16,31 @@ #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[0] = LAYOUT( /* Base */ - KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \ - KC_P7, KC_P8, KC_P9, KC_PPLS, \ - KC_P4, KC_P5, KC_P6, \ - KC_P1, KC_P2, KC_P3, KC_PENT, \ - KC_P0, KC_PDOT \ -), + [0] = LAYOUT_numpad_5x4( /* Base */ + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \ + KC_P7, KC_P8, KC_P9, \ + KC_P4, KC_P5, KC_P6, KC_PPLS, \ + KC_P1, KC_P2, KC_P3, \ + KC_P0, KC_PDOT, KC_PENT \ + ), }; const uint16_t PROGMEM fn_actions[] = { }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); } - return MACRO_NONE; + break; + } + return MACRO_NONE; }; diff --git a/keyboards/ckeys/nakey/nakey.h b/keyboards/ckeys/nakey/nakey.h index 3cbfda844d..bbf531fb68 100644 --- a/keyboards/ckeys/nakey/nakey.h +++ b/keyboards/ckeys/nakey/nakey.h @@ -22,14 +22,13 @@ // 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 LAYOUT( \ +#define LAYOUT_numpad_5x4( \ k00, k01, k02, k03, \ - k10, k11, k12, k13, \ - k20, k21, k22, \ - k30, k31, k32, k33, \ - k40, k41 \ -) \ -{ \ + k10, k11, k12, \ + k20, k21, k22, k13, \ + k30, k31, k32, \ + k40, k41, k33 \ +) { \ { k00, k01, k02, k03 }, \ { k10, k11, k12, k13 }, \ { k20, k21, k22, KC_NO }, \ diff --git a/keyboards/ckeys/nakey/rules.mk b/keyboards/ckeys/nakey/rules.mk index a3571e8deb..36b2193aae 100644 --- a/keyboards/ckeys/nakey/rules.mk +++ b/keyboards/ckeys/nakey/rules.mk @@ -66,3 +66,5 @@ UNICODE_ENABLE ?= no # Unicode BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE ?= no # Audio output on port C6 FAUXCLICKY_ENABLE ?= no # Use buzzer to emulate clicky switches + +LAYOUTS = numpad_5x4 |