aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormechlovin <57231893+mechlovin@users.noreply.github.com>2020-10-23 10:06:50 +0700
committerGitHub <noreply@github.com>2020-10-22 20:06:50 -0700
commitc45d7e526c9c5315c3fe2e831b01778c51b7a953 (patch)
tree4baae2b2bd10b0e8adf180012d9d62a1f5473743
parentf078980fb17ff5b9c11583427c66e13116972fd2 (diff)
downloadqmk_firmware-c45d7e526c9c5315c3fe2e831b01778c51b7a953.tar.gz
qmk_firmware-c45d7e526c9c5315c3fe2e831b01778c51b7a953.zip
Add Cospad VIA support (#10642)
* Add Cospad VIA support * Update keymap.c
-rw-r--r--keyboards/cospad/config.h2
-rw-r--r--keyboards/cospad/keymaps/via/keymap.c85
-rw-r--r--keyboards/cospad/keymaps/via/rules.mk1
3 files changed, 87 insertions, 1 deletions
diff --git a/keyboards/cospad/config.h b/keyboards/cospad/config.h
index 52e41d0d5..8d2994b7b 100644
--- a/keyboards/cospad/config.h
+++ b/keyboards/cospad/config.h
@@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
20#include "config_common.h" 20#include "config_common.h"
21 21
22/* USB Device descriptor parameter */ 22/* USB Device descriptor parameter */
23#define VENDOR_ID 0xFEED 23#define VENDOR_ID 0x4B5C // "KP"
24#define PRODUCT_ID 0xB1E5 24#define PRODUCT_ID 0xB1E5
25#define DEVICE_VER 0x0001 25#define DEVICE_VER 0x0001
26#define MANUFACTURER KPrepublic 26#define MANUFACTURER KPrepublic
diff --git a/keyboards/cospad/keymaps/via/keymap.c b/keyboards/cospad/keymaps/via/keymap.c
new file mode 100644
index 000000000..f8611c02d
--- /dev/null
+++ b/keyboards/cospad/keymaps/via/keymap.c
@@ -0,0 +1,85 @@
1/* Copyright 2020 Team Mechlovin
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17 #include QMK_KEYBOARD_H
18
19const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
20 /* Keymap _BL: (Base Layer) Default Layer
21 * ,-------------------.
22 * |Esc |TAB | FN | BS |
23 * |----|----|----|----|
24 * | NL | / | * | - |
25 * |----|----|----|----|
26 * | 7 | 8 | 9 | |
27 * |----|----|----| + |
28 * | 4 | 5 | 6 | |
29 * |----|----|----|----|
30 * | 1 | 2 | 3 | |
31 * |----|----|----| En |
32 * | 0 | . | |
33 * `-------------------'
34 */
35 [0] = LAYOUT_numpad_6x4(
36 KC_ESC, KC_TAB, MO(1), KC_BSPC,
37 KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
38 KC_P7, KC_P8, KC_P9,
39 KC_P4, KC_P5, KC_P6, KC_PPLS,
40 KC_P1, KC_P2, KC_P3,
41 KC_P0, KC_PDOT, KC_PENT
42 ),
43
44 /* Keymap _FL: Function Layer
45 * ,-------------------.
46 * |RGBT| | | |
47 * |----|----|----|----|
48 * |RGBM|RGBP|BTOG| |
49 * |----|----|----|----|
50 * |HUD |HUI |BON | |
51 * |----|----|----| |
52 * |SAD |SAI |BOFF| |
53 * |----|----|----|----|
54 * |VAD |VAS |BSTP| |
55 * |----|----|----| |
56 * | |RST | |
57 * `-------------------'
58 */
59 [1] = LAYOUT_numpad_6x4(
60 RGB_TOG, _______, _______, _______,
61 RGB_MOD, RGB_M_P, BL_TOGG, _______,
62 RGB_HUD, RGB_HUI, BL_ON,
63 RGB_SAD, RGB_SAI, BL_OFF, _______,
64 RGB_VAD, RGB_VAI, BL_STEP,
65 _______, RESET, _______
66 ),
67
68 [2] = LAYOUT_numpad_6x4(
69 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
70 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
71 KC_TRNS, KC_TRNS, KC_TRNS,
72 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
73 KC_TRNS, KC_TRNS, KC_TRNS,
74 KC_TRNS, KC_TRNS, KC_TRNS
75 ),
76
77 [3] = LAYOUT_numpad_6x4(
78 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
79 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
80 KC_TRNS, KC_TRNS, KC_TRNS,
81 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
82 KC_TRNS, KC_TRNS, KC_TRNS,
83 KC_TRNS, KC_TRNS, KC_TRNS
84 )
85};
diff --git a/keyboards/cospad/keymaps/via/rules.mk b/keyboards/cospad/keymaps/via/rules.mk
new file mode 100644
index 000000000..036bd6d1c
--- /dev/null
+++ b/keyboards/cospad/keymaps/via/rules.mk
@@ -0,0 +1 @@
VIA_ENABLE = yes \ No newline at end of file