aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarshit Goel <harshitgoel96@yahoo.com>2021-04-16 19:56:19 +0530
committerGitHub <noreply@github.com>2021-04-16 16:26:19 +0200
commit09a392433a34dfcc3416c58d7f01563504abef2f (patch)
tree408e4cf34097df1e9dff9494aa1552292fed5b20
parent3975c712f0c850156a3e3ec24452077e5f973309 (diff)
downloadqmk_firmware-09a392433a34dfcc3416c58d7f01563504abef2f.tar.gz
qmk_firmware-09a392433a34dfcc3416c58d7f01563504abef2f.zip
Ergodone via support (#11618)
Co-authored-by: Erovia <Erovia@users.noreply.github.com>
-rw-r--r--keyboards/ergodone/config.h4
-rw-r--r--keyboards/ergodone/keymaps/via/config.h18
-rw-r--r--keyboards/ergodone/keymaps/via/keymap.c196
-rw-r--r--keyboards/ergodone/keymaps/via/readme.md5
-rw-r--r--keyboards/ergodone/keymaps/via/rules.mk2
5 files changed, 223 insertions, 2 deletions
diff --git a/keyboards/ergodone/config.h b/keyboards/ergodone/config.h
index 5256d03a6..39e0ae8c7 100644
--- a/keyboards/ergodone/config.h
+++ b/keyboards/ergodone/config.h
@@ -4,8 +4,8 @@
4#include "config_common.h" 4#include "config_common.h"
5 5
6/* USB Device descriptor parameter */ 6/* USB Device descriptor parameter */
7#define VENDOR_ID 0xFEED // You may want to use 0x47EC for "KTEC", which doesn't seem to be in official use as of October 2017. 7#define VENDOR_ID 0x1209
8#define PRODUCT_ID 0xE60D // For "EGOD"/"ErgoDone". 8#define PRODUCT_ID 0x2328
9// The official ErgoDone VID and PID are documented at http://pid.codes/1209/2328/. 9// The official ErgoDone VID and PID are documented at http://pid.codes/1209/2328/.
10#define DEVICE_VER 0x0001 10#define DEVICE_VER 0x0001
11#define MANUFACTURER K.T.E.C. 11#define MANUFACTURER K.T.E.C.
diff --git a/keyboards/ergodone/keymaps/via/config.h b/keyboards/ergodone/keymaps/via/config.h
new file mode 100644
index 000000000..fc7744c76
--- /dev/null
+++ b/keyboards/ergodone/keymaps/via/config.h
@@ -0,0 +1,18 @@
1 /* Copyright HarshitGoel96 2021
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 //Keymap specific config.h
17#pragma once
18#define DYNAMIC_KEYMAP_LAYER_COUNT 4 \ No newline at end of file
diff --git a/keyboards/ergodone/keymaps/via/keymap.c b/keyboards/ergodone/keymaps/via/keymap.c
new file mode 100644
index 000000000..f155a4b51
--- /dev/null
+++ b/keyboards/ergodone/keymaps/via/keymap.c
@@ -0,0 +1,196 @@
1 /* Copyright HarshitGoel96 2021
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#include QMK_KEYBOARD_H
17
18enum layer_names {
19 QRTY, // qwerty above workman to make sure transparent does not catch unwanted keycode
20 SYMB, // symbols
21 MDIA, // media keys
22 EXTRA, // added extra layer for via
23};
24
25const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
26/* Keymap 0: Basic layer
27 *
28 * ,--------------------------------------------------. ,--------------------------------------------------.
29 * | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - |
30 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
31 * | Del | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ |
32 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
33 * | BkSp | A | S | D | F | G |------| |------| H | J | K | L |; / L2|' / Cmd |
34 * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------|
35 * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift |
36 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
37 * |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 |
38 * `----------------------------------' `----------------------------------'
39 * ,-------------. ,-------------.
40 * | App | LGui | | Alt |Ctrl/Esc|
41 * ,------|------|------| |------+--------+------.
42 * | | | Home | | PgUp | | |
43 * | Space|Backsp|------| |------| Tab |Enter |
44 * | |ace | End | | PgDn | | |
45 * `--------------------' `----------------------'
46 */
47// If it accepts an argument (i.e, is a function), it doesn't need KC_.
48// Otherwise, it needs KC_*
49
50[QRTY] = LAYOUT_ergodox( // layer 0 : default
51 // left hand
52 KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT,
53 KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB),
54 KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G,
55 KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO),
56 LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT,
57 ALT_T(KC_APP), KC_LGUI,
58 KC_HOME,
59 KC_SPC,KC_BSPC,KC_END,
60 // right hand
61 KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
62 TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
63 KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT),
64 MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT,
65 KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, TT(SYMB),
66 KC_LALT, CTL_T(KC_ESC),
67 KC_PGUP,
68 KC_PGDN,KC_TAB, KC_ENT
69 ),
70/* Keymap 1: Symbol Layer
71 *
72 * ,---------------------------------------------------. ,--------------------------------------------------.
73 * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
74 * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
75 * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 |
76 * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
77 * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | |
78 * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
79 * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | |
80 * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
81 * | EEP_RST | | | | | | | . | 0 | = | |
82 * `-----------------------------------' `----------------------------------'
83 * ,-------------. ,-------------.
84 * |Animat| | |Toggle|Solid |
85 * ,------|------|------| |------+------+------.
86 * |Bright|Bright| | | |Hue- |Hue+ |
87 * |ness- |ness+ |------| |------| | |
88 * | | | | | | | |
89 * `--------------------' `--------------------'
90 */
91// SYMBOLS
92[SYMB] = LAYOUT_ergodox(
93 // left hand
94 KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
95 KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS,
96 KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV,
97 KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS,
98 EEP_RST ,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
99 RGB_MOD,KC_TRNS,
100 KC_TRNS,
101 RGB_VAD,RGB_VAI,KC_TRNS,
102 // right hand
103 KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
104 KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12,
105 KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS,
106 KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS,
107 KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS,
108 RGB_TOG, RGB_M_P ,
109 KC_TRNS,
110 KC_TRNS, RGB_HUD, RGB_HUI
111),
112/* Keymap 2: Media and mouse keys
113 *
114 * ,--------------------------------------------------. ,--------------------------------------------------.
115 * | | | | | | | | | | | | | | | |
116 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
117 * | | | | MsUp | | | | | | | | | | | |
118 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
119 * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play |
120 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
121 * | | | | | | | | | | | | Prev | Next | | |
122 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
123 * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | |
124 * `----------------------------------' `----------------------------------'
125 * ,-------------. ,-------------.
126 * | | | | | |
127 * ,------|------|------| |------+------+------.
128 * | | | | | | |Brwser|
129 * | | |------| |------| |Back |
130 * | | | | | | | |
131 * `--------------------' `--------------------'
132 */
133// MEDIA AND MOUSE
134[MDIA] = LAYOUT_ergodox(
135 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
136 KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS,
137 KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
138 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
139 KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2,
140 KC_TRNS, KC_TRNS,
141 KC_TRNS,
142 KC_TRNS, KC_TRNS, KC_TRNS,
143 // right hand
144 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
145 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
146 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY,
147 KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS,
148 KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS,
149 KC_TRNS, KC_TRNS,
150 KC_TRNS,
151 KC_TRNS, KC_TRNS, KC_WBAK
152),
153[EXTRA] = LAYOUT_ergodox(
154 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
155 KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS,
156 KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
157 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
158 KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2,
159 KC_TRNS, KC_TRNS,
160 KC_TRNS,
161 KC_TRNS, KC_TRNS, KC_TRNS,
162 // right hand
163 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
164 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
165 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY,
166 KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS,
167 KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS,
168 KC_TRNS, KC_TRNS,
169 KC_TRNS,
170 KC_TRNS, KC_TRNS, KC_WBAK
171)
172};
173
174// Runs constantly in the background, in a loop.
175
176layer_state_t layer_state_set_user(layer_state_t state) {
177 ergodox_board_led_off();
178 ergodox_right_led_1_off();
179 ergodox_right_led_2_off();
180 ergodox_right_led_3_off();
181 switch (get_highest_layer(state)) {
182 case 1:
183 ergodox_right_led_1_on();
184 break;
185 case 2:
186 ergodox_right_led_2_on();
187 break;
188 case 3:
189 ergodox_right_led_3_on();
190 break;
191 default:
192 // none
193 break;
194 }
195 return state;
196}
diff --git a/keyboards/ergodone/keymaps/via/readme.md b/keyboards/ergodone/keymaps/via/readme.md
new file mode 100644
index 000000000..223cb892b
--- /dev/null
+++ b/keyboards/ergodone/keymaps/via/readme.md
@@ -0,0 +1,5 @@
1
2## Changelog
3HarshitGoel96
4
5I love my ergodone, but it needed via, so here it is. Flash using HIDBOOTLOADER as described in keyboard root read.md and enjoy via on ergodone. \ No newline at end of file
diff --git a/keyboards/ergodone/keymaps/via/rules.mk b/keyboards/ergodone/keymaps/via/rules.mk
new file mode 100644
index 000000000..43061db1d
--- /dev/null
+++ b/keyboards/ergodone/keymaps/via/rules.mk
@@ -0,0 +1,2 @@
1VIA_ENABLE = yes
2LTO_ENABLE = yes \ No newline at end of file