summaryrefslogtreecommitdiffstats
path: root/keyboards/kprepublic/cospad/keymaps
diff options
context:
space:
mode:
authorpeepeetee <43021794+peepeetee@users.noreply.github.com>2021-08-21 22:53:49 -0500
committerGitHub <noreply@github.com>2021-08-22 13:53:49 +1000
commit78ccd9c201199444bc06161b05ee8d7ba9c31613 (patch)
tree726d9e55d8cde510fe72bc1fb9bb2a7dabdbecc2 /keyboards/kprepublic/cospad/keymaps
parentc70abc8d047319830e369ae4e14cd43bae3bd3b8 (diff)
Organize KPrepublic, K.T.E.C, xiudi boards into directories (#12159)
* reset; redoing my steps; and recommit * include xd002/.noci
Diffstat (limited to 'keyboards/kprepublic/cospad/keymaps')
-rw-r--r--keyboards/kprepublic/cospad/keymaps/default/keymap.c57
-rw-r--r--keyboards/kprepublic/cospad/keymaps/detrus/keymap.c367
-rw-r--r--keyboards/kprepublic/cospad/keymaps/split_plus_and_zero/keymap.c81
-rw-r--r--keyboards/kprepublic/cospad/keymaps/split_zero/keymap.c81
-rw-r--r--keyboards/kprepublic/cospad/keymaps/via/keymap.c85
-rw-r--r--keyboards/kprepublic/cospad/keymaps/via/rules.mk1
6 files changed, 672 insertions, 0 deletions
diff --git a/keyboards/kprepublic/cospad/keymaps/default/keymap.c b/keyboards/kprepublic/cospad/keymaps/default/keymap.c
new file mode 100644
index 0000000000..06b06d41f9
--- /dev/null
+++ b/keyboards/kprepublic/cospad/keymaps/default/keymap.c
@@ -0,0 +1,57 @@
+#include QMK_KEYBOARD_H
+
+// Defines names for use in layer keycodes and the keymap
+enum layer_names {
+ _BL,
+ _FL
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /* Keymap _BL: (Base Layer) Default Layer
+ * ,-------------------.
+ * |Esc |TAB | FN | BS |
+ * |----|----|----|----|
+ * | NL | / | * | - |
+ * |----|----|----|----|
+ * | 7 | 8 | 9 | |
+ * |----|----|----| + |
+ * | 4 | 5 | 6 | |
+ * |----|----|----|----|
+ * | 1 | 2 | 3 | |
+ * |----|----|----| En |
+ * | 0 | . | |
+ * `-------------------'
+ */
+ [_BL] = LAYOUT_numpad_6x4(
+ KC_ESC, KC_TAB, MO(_FL), KC_BSPC,
+ 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
+ ),
+
+ /* Keymap _FL: Function Layer
+ * ,-------------------.
+ * |RGBT| | | |
+ * |----|----|----|----|
+ * |RGBM|RGBP|BTOG| |
+ * |----|----|----|----|
+ * |HUD |HUI |BON | |
+ * |----|----|----| |
+ * |SAD |SAI |BOFF| |
+ * |----|----|----|----|
+ * |VAD |VAS |BSTP| |
+ * |----|----|----| |
+ * | |RST | |
+ * `-------------------'
+ */
+ [_FL] = LAYOUT_numpad_6x4(
+ RGB_TOG, _______, _______, _______,
+ RGB_MOD, RGB_M_P, BL_TOGG, _______,
+ RGB_HUD, RGB_HUI, BL_ON,
+ RGB_SAD, RGB_SAI, BL_OFF, _______,
+ RGB_VAD, RGB_VAI, BL_STEP,
+ _______, RESET, _______
+ )
+};
diff --git a/keyboards/kprepublic/cospad/keymaps/detrus/keymap.c b/keyboards/kprepublic/cospad/keymaps/detrus/keymap.c
new file mode 100644
index 0000000000..af56305e5c
--- /dev/null
+++ b/keyboards/kprepublic/cospad/keymaps/detrus/keymap.c
@@ -0,0 +1,367 @@
+#include QMK_KEYBOARD_H
+#include "led.h"
+#include <print.h>
+
+#ifdef RGBLIGHT_ENABLE
+#include "rgblight.h"
+#endif
+
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+enum cospad_layers {
+ _QWERTY_LAYER,
+ _QWERTZ_LAYER,
+ _COLEMA_LAYER,
+ _DVORAK_LAYER,
+ _QWERTY_LOWER_LAYER,
+ _QWERTZ_LOWER_LAYER,
+ _COLEMA_LOWER_LAYER,
+ _DVORAK_LOWER_LAYER,
+ _RAISE_LAYER,
+ _ALTER_LAYER,
+};
+
+// To switch the default layer used for the layout, there are special keycodes.
+// Which onces detected below serve to switch it.
+enum cospad_keycodes {
+ QWERTY = SAFE_RANGE,
+ QWERTZ,
+ COLEMAK,
+ DVORAK
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ /* Keymap _QWERTY_LAYER: Default layer
+ * ,-----------------------.
+ * | T | G | B | Alt |
+ * |-----|-----|-----|-----|
+ * | R | F | V | LOW |
+ * |-----|-----|-----|-----|
+ * | E | D | C | |
+ * |-----|-----|-----| Spc |
+ * | W | S | X | |
+ * |-----|-----|-----|-----|
+ * | Q | A | Z | RAI |
+ * |-----|-----|-----|-----|
+ * | Esc | Tab | Sft | Ctl |
+ * `-----------------------'
+ *
+ * And it's LOWER layer
+ * ,-----------------------.
+ * | P | ; | / | Alt |
+ * |-----|-----|-----|-----|
+ * | O | L | . | LOW |
+ * |-----|-----|-----|-----|
+ * | I | K | , | |
+ * |-----|-----|-----| Ent |
+ * | U | J | M | |
+ * |-----|-----|-----|-----|
+ * | Y | H | N | RAI |
+ * |-----|-----|-----|-----|
+ * | Esc | Tab | Sft | Ctl |
+ * `-----------------------'
+ */
+ [_QWERTY_LAYER] = LAYOUT_gamepad_6x4(
+ KC_T, KC_G, KC_B, KC_LALT, \
+ KC_R, KC_F, KC_V, MO(_QWERTY_LOWER_LAYER),\
+ KC_E, KC_D, KC_C, \
+ KC_W, KC_S, KC_X, KC_SPACE, \
+ KC_Q, KC_A, KC_Z, MO(_RAISE_LAYER),\
+ KC_GESC, KC_TAB, KC_LSFT, KC_LCTRL),
+ [_QWERTY_LOWER_LAYER] = LAYOUT_gamepad_6x4(
+ KC_P, KC_SCLN, KC_SLSH, KC_LALT, \
+ KC_O, KC_L, KC_DOT, _______, \
+ KC_I, KC_K, KC_COMM, \
+ KC_U, KC_J, KC_M, KC_ENTER, \
+ KC_Y, KC_H, KC_N, _______, \
+ _______, _______, _______, _______),
+
+
+
+ /* Keymap _QWERTZ_LAYER: Alternate default layer
+ * ,-----------------------.
+ * | T | G | B | Alt |
+ * |-----|-----|-----|-----|
+ * | R | F | V | LOW |
+ * |-----|-----|-----|-----|
+ * | E | D | C | |
+ * |-----|-----|-----| Spc |
+ * | W | S | X | |
+ * |-----|-----|-----|-----|
+ * | Q | A | Y | RAI |
+ * |-----|-----|-----|-----|
+ * | Esc | Tab | Sft | Ctl |
+ * `-----------------------'
+ *
+ * And it's LOWER layer
+ * ,-----------------------.
+ * | P | ; | / | Alt |
+ * |-----|-----|-----|-----|
+ * | O | L | > | LOW |
+ * |-----|-----|-----|-----|
+ * | I | K | < | |
+ * |-----|-----|-----| Ent |
+ * | U | J | M | |
+ * |-----|-----|-----|-----|
+ * | Z | H | N | RAI |
+ * |-----|-----|-----|-----|
+ * | Esc | Tab | Sft | Ctl |
+ * `-----------------------'
+ */
+ [_QWERTZ_LAYER] = LAYOUT_gamepad_6x4(
+ KC_T, KC_G, KC_B, KC_LALT, \
+ KC_R, KC_F, KC_V, MO(_QWERTZ_LOWER_LAYER),\
+ KC_E, KC_D, KC_C, \
+ KC_W, KC_S, KC_X, KC_SPACE, \
+ KC_Q, KC_A, KC_Y, MO(_RAISE_LAYER),\
+ KC_GESC, KC_TAB, KC_LSFT, KC_LCTRL),
+ [_QWERTZ_LOWER_LAYER] = LAYOUT_gamepad_6x4(
+ KC_P, KC_SCLN, KC_SLSH, KC_LALT, \
+ KC_O, KC_L, KC_DOT, _______, \
+ KC_I, KC_K, KC_COMM, \
+ KC_U, KC_J, KC_M, KC_ENTER, \
+ KC_Z, KC_H, KC_N, _______, \
+ _______, _______, _______, _______),
+
+
+
+ /* Keymap _COLEMA_LAYER: Alternate default layer
+ * ,-----------------------.
+ * | G | D | B | Alt |
+ * |-----|-----|-----|-----|
+ * | P | T | V | LOW |
+ * |-----|-----|-----|-----|
+ * | F | S | C | |
+ * |-----|-----|-----| Spc |
+ * | W | R | X | |
+ * |-----|-----|-----|-----|
+ * | Q | A | Z | RAI |
+ * |-----|-----|-----|-----|
+ * | Esc | Tab | Sft | Ctl |
+ * `-----------------------'
+ *
+ * And it's LOWER layer
+ * ,-----------------------.
+ * | ; | O | / | Alt |
+ * |-----|-----|-----|-----|
+ * | Y | I | . | LOW |
+ * |-----|-----|-----|-----|
+ * | U | E | , | |
+ * |-----|-----|-----| Ent |
+ * | L | N | M | |
+ * |-----|-----|-----|-----|
+ * | J | H | K | RAI |
+ * |-----|-----|-----|-----|
+ * | Esc | Tab | Sft | Ctl |
+ * `-----------------------'
+ */
+ [_COLEMA_LAYER] = LAYOUT_gamepad_6x4(
+ KC_T, KC_D, KC_B, KC_LALT, \
+ KC_R, KC_T, KC_V, MO(_COLEMA_LOWER_LAYER),\
+ KC_E, KC_S, KC_C, \
+ KC_W, KC_R, KC_X, KC_SPACE, \
+ KC_Q, KC_A, KC_Z, MO(_RAISE_LAYER),\
+ KC_GESC, KC_TAB, KC_LSFT, KC_LCTRL),
+ [_COLEMA_LOWER_LAYER] = LAYOUT_gamepad_6x4(
+ KC_SCLN, KC_O, KC_SLSH, _______, \
+ KC_Y, KC_I, KC_DOT, _______, \
+ KC_U, KC_E, KC_COMM, \
+ KC_L, KC_N, KC_M, KC_ENTER, \
+ KC_J, KC_H, KC_K, _______, \
+ KC_F, KC_G, _______, _______),
+
+
+
+ /* Keymap _DVORAK_LAYER: Alternate default layer
+ * ,-----------------------.
+ * | Y | I | X | Alt |
+ * |-----|-----|-----|-----|
+ * | P | U | K | LOW |
+ * |-----|-----|-----|-----|
+ * | . | E | J | |
+ * |-----|-----|-----| Spc |
+ * | , | O | Q | |
+ * |-----|-----|-----|-----|
+ * | ' | A | ; | RAI |
+ * |-----|-----|-----|-----|
+ * | Esc | Tab | Sft | Ctl |
+ * `-----------------------'
+ *
+ * And it's LOWER layer
+ * ,-----------------------.
+ * | L | S | Z | Alt |
+ * |-----|-----|-----|-----|
+ * | R | N | V | LOW |
+ * |-----|-----|-----|-----|
+ * | C | T | W | |
+ * |-----|-----|-----| Ent |
+ * | G | H | M | |
+ * |-----|-----|-----|-----|
+ * | F | D | B | RAI |
+ * |-----|-----|-----|-----|
+ * | Esc | Tab | Sft | Ctl |
+ * `-----------------------'
+ */
+ [_DVORAK_LAYER] = LAYOUT_gamepad_6x4(
+ KC_Y, KC_I, KC_X, KC_LALT, \
+ KC_P, KC_U, KC_K, MO(_DVORAK_LOWER_LAYER),\
+ KC_DOT, KC_E, KC_J, \
+ KC_COMM, KC_O, KC_A, KC_SPACE, \
+ KC_QUOT, KC_A, KC_SCLN, MO(_RAISE_LAYER),\
+ KC_GESC, KC_TAB, KC_LSFT, KC_LCTRL),
+ [_DVORAK_LOWER_LAYER] = LAYOUT_gamepad_6x4(
+ KC_L, KC_S, KC_Z, KC_LALT, \
+ KC_R, KC_N, KC_V, _______, \
+ KC_C, KC_T, KC_W, \
+ KC_G, KC_H, KC_M, KC_ENTER,\
+ KC_F, KC_D, KC_B, _______, \
+ _______, _______, _______, _______),
+
+
+
+ /* Keymap _RAISE_LAYER: Additional layer to access more
+ * ,-----------------------.
+ * | 5 | 0 | del | Alt |
+ * |-----|-----|-----|-----|
+ * | 4 | 9 | -> | LOW |
+ * |-----|-----|-----|-----|
+ * | 3 | 8 | <- | |
+ * |-----|-----|-----| Spc |
+ * | 2 | 7 | -> | |
+ * |-----|-----|-----|-----|
+ * | 1 | 6 | <- | RAI |
+ * |-----|-----|-----|-----|
+ * | Esc | Tab | Sft | Ctl |
+ * `-----------------------'
+ */
+ [_RAISE_LAYER] = LAYOUT_gamepad_6x4(
+ KC_5, KC_0, KC_BSPC, _______, \
+ KC_4, KC_9, KC_RIGHT, _______, \
+ KC_3, KC_8, KC_UP, \
+ KC_2, KC_7, KC_DOWN, _______, \
+ KC_1, KC_6, KC_LEFT, _______, \
+ _______, _______, _______, _______),
+
+
+
+ /* Keymap _ALTER_LAYER: Function layer used to control the Leds
+ * and use media buttons
+ * ,----------------------------------------.
+ * | Val Dec | Bl Toggle | Qwertz | Super |
+ * |---------|------------|---------|-------|
+ * | Val Inc | Bl Off | Qwerty | |
+ * |---------|------------|---------|-------|
+ * | Sat Dec | Bl On | Colemak | |
+ * |---------|------------|---------| |
+ * | Sat Inc | RGB Toggle | Dvorak | |
+ * |---------|------------|---------|-------|
+ * | Hue Dec | RGB Next | Vol Dwn | |
+ * |---------|------------|---------|-------|
+ * | Hue Inc | RGB Prev | Vol Up | Reset |
+ * `----------------------------------------'
+ */
+ [_ALTER_LAYER] = LAYOUT_gamepad_6x4(
+ RGB_VAD, BL_TOGG, QWERTZ, KC_LGUI, \
+ RGB_VAI, BL_OFF, QWERTY, _______, \
+ RGB_SAD, BL_ON, COLEMAK, \
+ RGB_SAI, RGB_TOG, DVORAK, _______, \
+ RGB_HUD, RGB_MOD, KC_VOLD, _______, \
+ RGB_HUI, RGB_RMOD, KC_VOLU, RESET),
+};
+
+// Makes sure to update the good tri-layer if a layer changes
+layer_state_t layer_state_set_user(layer_state_t state) {
+ switch (biton32(default_layer_state)) {
+ case _QWERTY_LAYER:
+ state = update_tri_layer_state(state, _RAISE_LAYER, _QWERTY_LOWER_LAYER, _ALTER_LAYER);
+ break;
+ case _QWERTZ_LAYER:
+ state = update_tri_layer_state(state, _RAISE_LAYER, _QWERTZ_LOWER_LAYER, _ALTER_LAYER);
+ break;
+ case _COLEMA_LAYER:
+ state = update_tri_layer_state(state, _RAISE_LAYER, _COLEMA_LOWER_LAYER, _ALTER_LAYER);
+ break;
+ case _DVORAK_LAYER:
+ state = update_tri_layer_state(state, _RAISE_LAYER, _DVORAK_LOWER_LAYER, _ALTER_LAYER);
+ break;
+ }
+ return state;
+}
+
+// Makes the tri-layer
+uint32_t default_layer_state_set_kb(uint32_t state) {
+ switch (biton32(state)) {
+ case _QWERTY_LAYER:
+ state = update_tri_layer_state(state, _RAISE_LAYER, _QWERTZ_LOWER_LAYER, _ALTER_LAYER);
+ state = update_tri_layer_state(state, _RAISE_LAYER, _COLEMA_LOWER_LAYER, _ALTER_LAYER);
+ state = update_tri_layer_state(state, _RAISE_LAYER, _DVORAK_LOWER_LAYER, _ALTER_LAYER);
+ layer_move(_QWERTY_LAYER);
+ break;
+ case _QWERTZ_LAYER:
+ state = update_tri_layer_state(state, _RAISE_LAYER, _QWERTY_LOWER_LAYER, _ALTER_LAYER);
+ state = update_tri_layer_state(state, _RAISE_LAYER, _COLEMA_LOWER_LAYER, _ALTER_LAYER);
+ state = update_tri_layer_state(state, _RAISE_LAYER, _DVORAK_LOWER_LAYER, _ALTER_LAYER);
+ layer_move(_QWERTZ_LAYER);
+ break;
+ case _COLEMA_LAYER:
+ state = update_tri_layer_state(state, _RAISE_LAYER, _QWERTY_LOWER_LAYER, _ALTER_LAYER);
+ state = update_tri_layer_state(state, _RAISE_LAYER, _QWERTZ_LOWER_LAYER, _ALTER_LAYER);
+ state = update_tri_layer_state(state, _RAISE_LAYER, _DVORAK_LOWER_LAYER, _ALTER_LAYER);
+ layer_move(_COLEMA_LAYER);
+ break;
+ case _DVORAK_LAYER:
+ state = update_tri_layer_state(state, _RAISE_LAYER, _QWERTY_LOWER_LAYER, _ALTER_LAYER);
+ state = update_tri_layer_state(state, _RAISE_LAYER, _QWERTZ_LOWER_LAYER, _ALTER_LAYER);
+ state = update_tri_layer_state(state, _RAISE_LAYER, _COLEMA_LOWER_LAYER, _ALTER_LAYER);
+ layer_move(_DVORAK_LAYER);
+ break;
+ }
+ return state;
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case BL_TOGG:
+ if (record->event.pressed) {
+ cospad_bl_led_togg();
+ }
+ return false;
+ case BL_ON:
+ if (record->event.pressed) {
+ cospad_bl_led_on();
+ }
+ return false;
+ case BL_OFF:
+ if (record->event.pressed) {
+ cospad_bl_led_off();
+ }
+ return false;
+ case QWERTY:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_QWERTY_LAYER);
+ print("switched to QWERTY layout\n");
+ }
+ return false;
+ break;
+ case QWERTZ:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_QWERTZ_LAYER);
+ }
+ return false;
+ break;
+ case COLEMAK:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_COLEMA_LAYER);
+ }
+ return false;
+ break;
+ case DVORAK:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_DVORAK_LAYER);
+ }
+ return false;
+ break;
+ default:
+ return true;
+ }
+}
diff --git a/keyboards/kprepublic/cospad/keymaps/split_plus_and_zero/keymap.c b/keyboards/kprepublic/cospad/keymaps/split_plus_and_zero/keymap.c
new file mode 100644
index 0000000000..dd2ff00cd1
--- /dev/null
+++ b/keyboards/kprepublic/cospad/keymaps/split_plus_and_zero/keymap.c
@@ -0,0 +1,81 @@
+#include QMK_KEYBOARD_H
+
+/*
+ * This keymap is based on the default keymap for the cospad.
+ * It was adapted for the split Plus and split 0 layout focusing on the "00" key.
+ */
+
+enum custom_keycodes {
+ DBL_ZRO = SAFE_RANGE,
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case DBL_ZRO:
+ if (record->event.pressed) {
+ // when keycode DBL_ZRO is pressed
+ SEND_STRING("00");
+ } else {
+ // when keycode DBL_ZRO is released
+ }
+ break;
+
+ }
+ return true;
+};
+
+// Defines names for use in layer keycodes and the keymap
+enum layer_names {
+ _BL,
+ _FL
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /* Keymap _BL: (Base Layer) Default Layer
+ * ,-------------------.
+ * |Esc |TAB | FN | BS |
+ * |----|----|----|----|
+ * | NL | / | * | - |
+ * |----|----|----|----|
+ * | 7 | 8 | 9 | ~ |
+ * |----|----|----|----|
+ * | 4 | 5 | 6 | + |
+ * |----|----|----|----|
+ * | 1 | 2 | 3 | |
+ * |----|----|----| En |
+ * | 0 | 00 | . | |
+ * `-------------------'
+ */
+ [_BL] = LAYOUT_numpad_6x4_split_plus_zero(
+ KC_ESC, KC_TAB, MO(_FL), KC_BSPC,
+ KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
+ KC_P7, KC_P8, KC_P9, KC_TILD,
+ KC_P4, KC_P5, KC_P6, KC_PPLS,
+ KC_P1, KC_P2, KC_P3,
+ KC_P0, DBL_ZRO, KC_PDOT, KC_PENT
+ ),
+
+ /* Keymap _FL: Function Layer
+ * ,-------------------.
+ * |RGBT| | | |
+ * |----|----|----|----|
+ * |RGBM|RGBP|BTOG| |
+ * |----|----|----|----|
+ * |HUD |HUI |BON | |
+ * |----|----|----|----|
+ * |SAD |SAI |BOFF| |
+ * |----|----|----|----|
+ * |VAD |VAS |BSTP| |
+ * |----|----|----| |
+ * | | |RST | |
+ * `-------------------'
+ */
+ [_FL] = LAYOUT_numpad_6x4_split_plus_zero(
+ RGB_TOG, _______, _______, _______,
+ RGB_MOD, RGB_M_P, BL_TOGG, _______,
+ RGB_HUD, RGB_HUI, BL_ON, _______,
+ RGB_SAD, RGB_SAI, BL_OFF, _______,
+ RGB_VAD, RGB_VAI, BL_STEP,
+ _______, _______, RESET, _______
+ )
+};
diff --git a/keyboards/kprepublic/cospad/keymaps/split_zero/keymap.c b/keyboards/kprepublic/cospad/keymaps/split_zero/keymap.c
new file mode 100644
index 0000000000..3a0c7d6e4e
--- /dev/null
+++ b/keyboards/kprepublic/cospad/keymaps/split_zero/keymap.c
@@ -0,0 +1,81 @@
+#include QMK_KEYBOARD_H
+
+/*
+ * This keymap is based on the default keymap for the cospad.
+ * It was adapted for the split 0 layout focusing on the "00" key.
+ */
+
+enum custom_keycodes {
+ DBL_ZRO = SAFE_RANGE,
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case DBL_ZRO:
+ if (record->event.pressed) {
+ // when keycode DBL_ZRO is pressed
+ SEND_STRING("00");
+ } else {
+ // when keycode DBL_ZRO is released
+ }
+ break;
+
+ }
+ return true;
+};
+
+// Defines names for use in layer keycodes and the keymap
+enum layer_names {
+ _BL,
+ _FL
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /* Keymap _BL: (Base Layer) Default Layer
+ * ,-------------------.
+ * |Esc |TAB | FN | BS |
+ * |----|----|----|----|
+ * | NL | / | * | - |
+ * |----|----|----|----|
+ * | 7 | 8 | 9 | |
+ * |----|----|----| + |
+ * | 4 | 5 | 6 | |
+ * |----|----|----|----|
+ * | 1 | 2 | 3 | |
+ * |----|----|----| En |
+ * | 0 | 00 | . | |
+ * `-------------------'
+ */
+ [_BL] = LAYOUT_numpad_6x4_split_zero(
+ KC_ESC, KC_TAB, MO(_FL), KC_BSPC,
+ 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, DBL_ZRO, KC_PDOT, KC_PENT
+ ),
+
+ /* Keymap _FL: Function Layer
+ * ,-------------------.
+ * |RGBT| | | |
+ * |----|----|----|----|
+ * |RGBM|RGBP|BTOG| |
+ * |----|----|----|----|
+ * |HUD |HUI |BON | |
+ * |----|----|----| |
+ * |SAD |SAI |BOFF| |
+ * |----|----|----|----|
+ * |VAD |VAS |BSTP| |
+ * |----|----|----| |
+ * | | |RST | |
+ * `-------------------'
+ */
+ [_FL] = LAYOUT_numpad_6x4_split_zero(
+ RGB_TOG, _______, _______, _______,
+ RGB_MOD, RGB_M_P, BL_TOGG, _______,
+ RGB_HUD, RGB_HUI, BL_ON,
+ RGB_SAD, RGB_SAI, BL_OFF, _______,
+ RGB_VAD, RGB_VAI, BL_STEP,
+ _______, _______, RESET, _______
+ )
+};
diff --git a/keyboards/kprepublic/cospad/keymaps/via/keymap.c b/keyboards/kprepublic/cospad/keymaps/via/keymap.c
new file mode 100644
index 0000000000..f8611c02d7
--- /dev/null
+++ b/keyboards/kprepublic/cospad/keymaps/via/keymap.c
@@ -0,0 +1,85 @@
+/* Copyright 2020 Team Mechlovin
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+ #include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /* Keymap _BL: (Base Layer) Default Layer
+ * ,-------------------.
+ * |Esc |TAB | FN | BS |
+ * |----|----|----|----|
+ * | NL | / | * | - |
+ * |----|----|----|----|
+ * | 7 | 8 | 9 | |
+ * |----|----|----| + |
+ * | 4 | 5 | 6 | |
+ * |----|----|----|----|
+ * | 1 | 2 | 3 | |
+ * |----|----|----| En |
+ * | 0 | . | |
+ * `-------------------'
+ */
+ [0] = LAYOUT_numpad_6x4(
+ KC_ESC, KC_TAB, MO(1), KC_BSPC,
+ 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
+ ),
+
+ /* Keymap _FL: Function Layer
+ * ,-------------------.
+ * |RGBT| | | |
+ * |----|----|----|----|
+ * |RGBM|RGBP|BTOG| |
+ * |----|----|----|----|
+ * |HUD |HUI |BON | |
+ * |----|----|----| |
+ * |SAD |SAI |BOFF| |
+ * |----|----|----|----|
+ * |VAD |VAS |BSTP| |
+ * |----|----|----| |
+ * | |RST | |
+ * `-------------------'
+ */
+ [1] = LAYOUT_numpad_6x4(
+ RGB_TOG, _______, _______, _______,
+ RGB_MOD, RGB_M_P, BL_TOGG, _______,
+ RGB_HUD, RGB_HUI, BL_ON,
+ RGB_SAD, RGB_SAI, BL_OFF, _______,
+ RGB_VAD, RGB_VAI, BL_STEP,
+ _______, RESET, _______
+ ),
+
+ [2] = LAYOUT_numpad_6x4(
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS
+ ),
+
+ [3] = LAYOUT_numpad_6x4(
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS
+ )
+};
diff --git a/keyboards/kprepublic/cospad/keymaps/via/rules.mk b/keyboards/kprepublic/cospad/keymaps/via/rules.mk
new file mode 100644
index 0000000000..036bd6d1c3
--- /dev/null
+++ b/keyboards/kprepublic/cospad/keymaps/via/rules.mk
@@ -0,0 +1 @@
+VIA_ENABLE = yes \ No newline at end of file