aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesús David <jesdga95@gmail.com>2020-08-04 02:10:06 -0500
committerGitHub <noreply@github.com>2020-08-04 00:10:06 -0700
commit7b85962673e40633d9c36e4a36bedd80a601a0ac (patch)
treeb66f1dfe188c4be8faf645baee2fe81df563fa95
parent19795a4dcc4153b647078297a1e11dad1a2d66be (diff)
downloadqmk_firmware-7b85962673e40633d9c36e4a36bedd80a601a0ac.tar.gz
qmk_firmware-7b85962673e40633d9c36e4a36bedd80a601a0ac.zip
Add via compatibility to Daisy 40 (#9805)
* Add via compatibility to Daisy 40 * Move via config to its own keymap * Use lite bootmagic * Add fourth layer to keymap
-rw-r--r--keyboards/daisy/config.h4
-rw-r--r--keyboards/daisy/keymaps/via/keymap.c102
-rw-r--r--keyboards/daisy/keymaps/via/readme.md1
-rw-r--r--keyboards/daisy/keymaps/via/rules.mk1
-rw-r--r--keyboards/daisy/rules.mk2
5 files changed, 107 insertions, 3 deletions
diff --git a/keyboards/daisy/config.h b/keyboards/daisy/config.h
index ea03d116b..1b6656eb7 100644
--- a/keyboards/daisy/config.h
+++ b/keyboards/daisy/config.h
@@ -20,8 +20,8 @@ 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 0x4B50
24#define PRODUCT_ID 0x7169 24#define PRODUCT_ID 0xD7DC
25#define DEVICE_VER 0x0501 25#define DEVICE_VER 0x0501
26#define MANUFACTURER KTEC 26#define MANUFACTURER KTEC
27#define PRODUCT Daisy 27#define PRODUCT Daisy
diff --git a/keyboards/daisy/keymaps/via/keymap.c b/keyboards/daisy/keymaps/via/keymap.c
new file mode 100644
index 000000000..b3156ce3b
--- /dev/null
+++ b/keyboards/daisy/keymaps/via/keymap.c
@@ -0,0 +1,102 @@
1/* Copyright 2020
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
19// Defines names for use in layer keycodes and the keymap
20enum layer_names {
21 _BL,
22 _LW,
23 _RS,
24 _EM
25};
26
27#define LOWER MO(_LW)
28#define RAISE MO(_RS)
29
30const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
31 /* Base Layer
32 * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
33 * │Esc│ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ \ │
34 * ├───┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤
35 * │Tab │ A │ S │ D │ F │ G │ H │ J │ K │ L │ Enter│
36 * ├────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬────┤
37 * │Shift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │  / │
38 * ├────┬─┴─┬─┴──┬┴───┴───┼───┴───┴──┬┴───┼───┼────┤
39 * │Ctrl│GUI│Alt │        │ Backspace│Lowr│Rse│ Alt│
40 * └────┴───┴────┴────────┴──────────┴────┴───┴────┘
41 */
42 [_BL] = LAYOUT(
43 KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
44 KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT,
45 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,
46 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_BSPC, LOWER, RAISE, KC_RALT
47 ),
48
49 /* Function Layer 1 (Lower)
50 * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
51 * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │
52 * └───┴┬──┴┬──┴┬──┴───┴───┴┬──┴┬──┴┬──┴┬──┴┬──┴───┘
53 * │    │ = │ ▴ │   │   │   │ [ │ ] │ ; │ ' │      │
54 * ├────└─┬─┴─┬─┴─┬───┐─┴─┬─└───┴───┴───┴───┘─┬────┤
55 * │      │ ◂ │ ▾ │ ▸ │   │   │   │   │   │   │    │
56 * ├────┬─└───┴───┴───┘───┌──────────┐┴───┼───┼────┤
57 * │    │   │    │        │   Delete │    │   │    │
58 * └────┴───┴────┴────────└──────────┘────┴───┴────┘
59 */
60 [_LW] = LAYOUT(
61 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
62 _______, KC_EQL, KC_UP, _______, _______, _______, KC_LBRC, KC_RBRC, KC_SCLN, KC_QUOT, _______,
63 _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______,
64 _______, _______, _______, _______, KC_DEL, _______, _______, _______
65 ),
66
67 /* Function Layer 2 (Raise)
68 * ┌───┬───┬───┬───┬───┬───┬───┐───┌───┬───┐───┬───┐
69 * │Rst│F1 │F2 │F3 │F4 │F5 │F6 │   │Hom│PgU│   │   │
70 * └───┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐──└┬──┴┬──┴┐──┴───┤
71 * │    │F7 │F8 │F9 │F10│F11│F12│   │ ; │ ' │      │
72 * ├────└─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴───┴───┴───┴─┐────┤
73 * │      │RGB│Mod│HuD│HuI│VaD│VaI│SaD│SaI│BLS│    │
74 * ├────┬─└───┴───┴───┴───┴───┴───┴───┴───┴───┘────┤
75 * │    │   │    │        │          │    │   │    │
76 * └────┴───┴────┴────────┴──────────┴────┴───┴────┘
77 */
78 [_RS] = LAYOUT(
79 RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, KC_HOME, KC_PGUP, _______, _______,
80 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_END, KC_PGDN, _______,
81 _______, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_VAD, RGB_VAI, RGB_SAD, RGB_SAI, BL_STEP, _______,
82 _______, _______, _______, _______, _______, _______, _______, _______
83 ),
84
85 /* Empty 4th layer for VIA
86 * ┌───┬───┬───┬───┬───┬───┬───┐───┌───┬───┐───┬───┐
87 * | | | | | | | | | | | | |
88 * └───┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐──└┬──┴┬──┴┐──┴───┤
89 * │    │  │  │  │ │ │ │   │   │   │      │
90 * ├────└─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴───┴───┴───┴─┐────┤
91 * │      │ │ │ │ │ │ │ │ │ │    │
92 * ├────┬─└───┴───┴───┴───┴───┴───┴───┴───┴───┘────┤
93 * │    │   │    │        │          │    │   │    │
94 * └────┴───┴────┴────────┴──────────┴────┴───┴────┘
95 */
96 [_EM] = LAYOUT(
97 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
98 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
99 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
100 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
101 )
102};
diff --git a/keyboards/daisy/keymaps/via/readme.md b/keyboards/daisy/keymaps/via/readme.md
new file mode 100644
index 000000000..9345124a3
--- /dev/null
+++ b/keyboards/daisy/keymaps/via/readme.md
@@ -0,0 +1 @@
# VIA keymap for Daisy
diff --git a/keyboards/daisy/keymaps/via/rules.mk b/keyboards/daisy/keymaps/via/rules.mk
new file mode 100644
index 000000000..036bd6d1c
--- /dev/null
+++ b/keyboards/daisy/keymaps/via/rules.mk
@@ -0,0 +1 @@
VIA_ENABLE = yes \ No newline at end of file
diff --git a/keyboards/daisy/rules.mk b/keyboards/daisy/rules.mk
index c82fa9bc6..48cfa90fc 100644
--- a/keyboards/daisy/rules.mk
+++ b/keyboards/daisy/rules.mk
@@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu
14# Build Options 14# Build Options
15# change yes to no to disable 15# change yes to no to disable
16# 16#
17BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration 17BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
18MOUSEKEY_ENABLE = no # Mouse keys 18MOUSEKEY_ENABLE = no # Mouse keys
19EXTRAKEY_ENABLE = yes # Audio control and System control 19EXTRAKEY_ENABLE = yes # Audio control and System control
20CONSOLE_ENABLE = no # Console for debug 20CONSOLE_ENABLE = no # Console for debug