summaryrefslogtreecommitdiffstats
path: root/keyboards/chocopad
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2018-06-12 16:59:35 +0200
committerJack Humbert <jack.humb@gmail.com>2018-06-12 16:59:35 +0200
commit998ddbb122c9d3e2a77bd4e88c881b225ca0d569 (patch)
treeca91ff7ad3c4866555d1e623fe9ea05276397e1c /keyboards/chocopad
parentc0095710a7c7e9bd94aa9f4dd814dc28d718c731 (diff)
parent06487daaddf923d635e8a528d1eb644b875a73f6 (diff)
downloadqmk_firmware-998ddbb122c9d3e2a77bd4e88c881b225ca0d569.tar.gz
qmk_firmware-998ddbb122c9d3e2a77bd4e88c881b225ca0d569.tar.xz
Merge branch 'master' of github.com:qmk/qmk_firmware into hf/shinydox
Diffstat (limited to 'keyboards/chocopad')
-rw-r--r--keyboards/chocopad/chocopad.h6
-rw-r--r--keyboards/chocopad/info.json12
-rw-r--r--keyboards/chocopad/keymaps/default/keymap.c63
-rw-r--r--keyboards/chocopad/rules.mk2
4 files changed, 33 insertions, 50 deletions
diff --git a/keyboards/chocopad/chocopad.h b/keyboards/chocopad/chocopad.h
index 329e2d56f..ec73b1465 100644
--- a/keyboards/chocopad/chocopad.h
+++ b/keyboards/chocopad/chocopad.h
@@ -3,7 +3,7 @@
#include "quantum.h"
-#define KEYMAP( \
+#define LAYOUT_ortho_4x4( \
A1, A2, A3, A4, \
B1, B2, B3, B4, \
C1, C2, C3, C4, \
@@ -16,13 +16,13 @@
}
// Used to create a keymap using only KC_ prefixed keys
-#define KC_KEYMAP( \
+#define LAYOUT_kc( \
A1, A2, A3, A4, \
B1, B2, B3, B4, \
C1, C2, C3, C4, \
D1, D2, D3, D4 \
) \
- KEYMAP( \
+ LAYOUT_ortho_4x4( \
KC_##A1, KC_##A2, KC_##A3, KC_##A4, \
KC_##B1, KC_##B2, KC_##B3, KC_##B4, \
KC_##C1, KC_##C2, KC_##C3, KC_##C4, \
diff --git a/keyboards/chocopad/info.json b/keyboards/chocopad/info.json
new file mode 100644
index 000000000..c5a7d42bb
--- /dev/null
+++ b/keyboards/chocopad/info.json
@@ -0,0 +1,12 @@
+{
+ "keyboard_name": "Chocopad",
+ "url": "",
+ "maintainer": "qmk",
+ "width": 4,
+ "height": 4,
+ "layouts": {
+ "LAYOUT_ortho_4x4": {
+ "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}]
+ }
+ }
+}
diff --git a/keyboards/chocopad/keymaps/default/keymap.c b/keyboards/chocopad/keymaps/default/keymap.c
index c4536a1b4..df22e8b1f 100644
--- a/keyboards/chocopad/keymaps/default/keymap.c
+++ b/keyboards/chocopad/keymaps/default/keymap.c
@@ -1,61 +1,30 @@
-#include "chocopad.h"
+#include QMK_KEYBOARD_H
#define _BASE 0
#define _FN1 1
#define _FN2 2
-#define KC_ KC_TRNS
#define _______ KC_TRNS
-#define KC_X1 MO(_FN1)
-#define KC_X2 MO(_FN2)
-#define KC_RST RESET
-#define KC_BSTP BL_STEP
-#define KC_RTOG RGB_TOG
-#define KC_RMOD RGB_MOD
-#define KC_RHUI RGB_HUI
-#define KC_RHUD RGB_HUD
-#define KC_RSAI RGB_SAI
-#define KC_RSAD RGB_SAD
-#define KC_RVAI RGB_VAI
-#define KC_RVAD RGB_VAD
-
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [_BASE] = KC_KEYMAP(
- //,----+----+----+----.
- PGUP,HOME, UP ,END ,
- //|----+----+----+----|
- PGDN,LEFT,DOWN,RGHT,
- //|----+----+----+----|
- X2 ,VOLU,MPLY,MPRV,
- //|----+----+----+----|
- X1 ,VOLD,MUTE,MNXT
- //`----+----+----+----'
+ [_BASE] = LAYOUT_ortho_4x4(
+ KC_PGUP, KC_HOME, KC_UP, KC_END , \
+ KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, \
+ MO(_FN2), KC_VOLU, KC_MPLY, KC_MPRV, \
+ MO(_FN1), KC_VOLD, KC_MUTE, KC_MNXT \
),
-
- [_FN1] = KC_KEYMAP(
- //,----+----+----+----.
- ESC , P7 , P8 , P9 ,
- //|----+----+----+----|
- TAB , P4 , P5 , P6 ,
- //|----+----+----+----|
- ENT , P1 , P2 , P3 ,
- //|----+----+----+----|
- , P0 , P0 ,DOT
- //`----+----+----+----'
+ [_FN1] = LAYOUT_ortho_4x4(
+ KC_ESC, KC_P7, KC_P8, KC_P9, \
+ KC_TAB, KC_P4, KC_P5, KC_P6, \
+ KC_ENT, KC_P1, KC_P2, KC_P3, \
+ _______, KC_P0, KC_P0, KC_DOT \
),
-
- [_FN2] = KC_KEYMAP(
- //,----+----+----+----.
- RTOG,RHUI,RSAI,RVAI,
- //|----+----+----+----|
- RMOD,RHUD,RSAD,RVAD,
- //|----+----+----+----|
- , , ,RST ,
- //|----+----+----+----|
- BSTP, , ,
- //`----+----+----+----'
+ [_FN2] = LAYOUT_ortho_4x4(
+ RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \
+ RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, \
+ _______, _______, _______, RESET, \
+ BL_STEP, _______, _______, _______ \
)
};
diff --git a/keyboards/chocopad/rules.mk b/keyboards/chocopad/rules.mk
index cd9222a15..39ce38e10 100644
--- a/keyboards/chocopad/rules.mk
+++ b/keyboards/chocopad/rules.mk
@@ -54,3 +54,5 @@ NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https:/
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
AUDIO_ENABLE = no
RGBLIGHT_ENABLE = yes
+
+LAYOUTS = ortho_4x4