aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCasey Webster <casey.webster@gmail.com>2020-10-18 15:55:38 -0500
committerGitHub <noreply@github.com>2020-10-18 13:55:38 -0700
commit8bb2eeaabb6d79e774c6aae6c651857ce2e380dc (patch)
tree2bed24bc62765fa3aceb3bd771d12ac65652da10
parentc492dd791243b98a119fbf29c9b041d14238b102 (diff)
downloadqmk_firmware-8bb2eeaabb6d79e774c6aae6c651857ce2e380dc.tar.gz
qmk_firmware-8bb2eeaabb6d79e774c6aae6c651857ce2e380dc.zip
[Keymap] add cwebster2 userspace and keymaps (#10541)
* Adding my keymap * Add a starter keymap for kyria * Updated keymap * Add auto shift, tapping modifications and gravatar oled bitmap * Add flashing helper scripts * Updates to my keymap * Enable raw hid and rgblight sleep * Cleanup * Updated keymap and board features * Remove some RGB modes for space * Start working on a miryoku-like keymap. This adds homerow mods to my keymap on the base layer and adds a game layer that doesnt have them * more work on keymaps * Fine tuning home row mods * update keymap * Keymap update * add split transport * keymap * cherry pick from develop * merge develop * fix * keymap iterations * Refactoring * continued refactoring * messing with rgb * update layer coloring * continued refactoring * more features * modifier color * Move stuff to userspace * Moving stuff out to userspace * refactoring into userspace * More refactoring * Fixing some errors in the keymap and changing the oled output * Sync zen1 keymap to my userspace config * Update copyright notices and revert transport.c to master * Swap tab and esc * Remove a file accidentally created * Use LTO_ENABLE to turn on Link_Time_Optimization * Drop modtap thumbs on game layout * Update game keymap * More iteration on the game keymap * Add oled indications of kitty and i3 mod * Promote colemak to default * Update tapping term for modtap keys * Add per key tapping term * Use left modifiers on right side
-rw-r--r--keyboards/kyria/keymaps/cwebster2/config.h55
-rw-r--r--keyboards/kyria/keymaps/cwebster2/keymap.c397
-rw-r--r--keyboards/kyria/keymaps/cwebster2/rules.mk5
-rw-r--r--keyboards/rgbkb/zen/rev1/keymaps/cwebster2/config.h34
-rw-r--r--keyboards/rgbkb/zen/rev1/keymaps/cwebster2/keymap.c116
-rw-r--r--keyboards/rgbkb/zen/rev1/keymaps/cwebster2/rules.mk2
-rw-r--r--users/cwebster2/config.h57
-rw-r--r--users/cwebster2/cwebster2.c65
-rw-r--r--users/cwebster2/cwebster2.h51
-rw-r--r--users/cwebster2/keycodes.c53
-rw-r--r--users/cwebster2/keycodes.h27
-rw-r--r--users/cwebster2/my_miryoku.h77
-rw-r--r--users/cwebster2/rules.mk13
13 files changed, 952 insertions, 0 deletions
diff --git a/keyboards/kyria/keymaps/cwebster2/config.h b/keyboards/kyria/keymaps/cwebster2/config.h
new file mode 100644
index 000000000..6a56d7ee9
--- /dev/null
+++ b/keyboards/kyria/keymaps/cwebster2/config.h
@@ -0,0 +1,55 @@
1/* Copyright 2020 Casey Webster <casey@e1337.dev>
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#pragma once
18
19#ifdef OLED_DRIVER_ENABLE
20 #define OLED_DISPLAY_128X64
21#endif
22
23#ifdef RGBLIGHT_ENABLE
24 //#define RGBLIGHT_ANIMATIONS
25 //#define RGBLIGHT_EFFECT_ALTERNATING
26 #define RGBLIGHT_EFFECT_BREATHING
27 //#define RGBLIGHT_EFFECT_CHRISTMAS
28 //#define RGBLIGHT_EFFECT_KNIGHT
29 //#define RGBLIGHT_EFFECT_RAINBOW_MOOD
30 //#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
31 //#define RGBLIGHT_EFFECT_RGB_TEST
32 //#define RGBLIGHT_EFFECT_SNAKE
33 //#define RGBLIGHT_EFFECT_STATIC_GRADIENT
34 //#define RGBLIGHT_EFFECT_TWINKLE
35 #define RGBLIGHT_HUE_STEP 8
36 #define RGBLIGHT_SAT_STEP 8
37 #define RGBLIGHT_VAL_STEP 8
38 #define RGBLIGHT_SLEEP
39 #define RGBLIGHT_LIMIT_VAL 128
40 #define RGBLIGHT_EFFECT_BREATHE_MAX 128
41 #define RGBLIGHT_LAYERS
42 #define RGBLIGHT_MAX_LAYERS 16
43 //#define RGBLIGHT_STARTUP_ANIMATION
44#endif
45
46#ifdef COMBO_ENABLE
47 #define COMBO_COUNT 2
48#endif
49
50#define QMK_KEYS_PER_SCAN 4
51
52#define EE_HANDS
53
54//#define DEBUG_MATRIX_SCAN_RATE
55//#define SPLIT_MODS_ENABLE
diff --git a/keyboards/kyria/keymaps/cwebster2/keymap.c b/keyboards/kyria/keymaps/cwebster2/keymap.c
new file mode 100644
index 000000000..311ad167a
--- /dev/null
+++ b/keyboards/kyria/keymaps/cwebster2/keymap.c
@@ -0,0 +1,397 @@
1/* Copyright 2020 Casey Webster <casey@e1337.dev>
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#include "raw_hid.h"
18#define RAW_EPSIZE 8
19#include <stdio.h>
20
21#include "cwebster2.h"
22
23#ifdef WPM_ENABLE
24char wpm_str[10];
25uint16_t wpm_graph_timer = 0;
26#endif
27
28#ifdef COMBO_ENABLE
29enum combos {
30 ZX_COPY,
31 CV_PASTE
32};
33
34const uint16_t PROGMEM copy_combo[] = { KC_Z, KC_X, COMBO_END };
35const uint16_t PROGMEM paste_combo[] = { KC_C, KC_V, COMBO_END };
36
37combo_t key_combos[COMBO_COUNT] = {
38 [ZX_COPY] = COMBO(copy_combo, LCTL_T(KC_C)),
39 [CV_PASTE] = COMBO(paste_combo, LCTL_T(KC_V))
40};
41#endif
42
43#define LAYOUT_kyria_base( \
44 L01, L02, L03, L04, L05, R05, R04, R03, R02, R01, \
45 L11, L12, L13, L14, L15, R15, R14, R13, R12, R11, \
46 L21, L22, L23, L24, L25, R25, R24, R23, R22, R21, \
47 L33, L34, L35, R35, R34, R33 \
48 ) \
49 LAYOUT_kyria_wrapper ( \
50 KC_GRV, L01, L02, L03, L04, L05, R05, R04, R03, R02, R01, KC_BSLS, \
51 KC_CTLBS, L11, L12, L13, L14, L15, R15, R14, R13, R12, R11, KC_QUOT, \
52 KC_EQL, L21, L22, L23, L24, L25, KC_LCCL, KC_LGUI, KC_ALTCL, KC_LSFT, R25, R24, R23, R22, R21, KC_MINS, \
53 SCMD_T(KC_LBRC), C_S_T(KC_MINS), L33, L34, L35, R35, R34, R33, TO(_GAME), KC_PSCR \
54 )
55#define LAYOUT_kyria_base_wrapper(...) LAYOUT_kyria_base(__VA_ARGS__)
56
57
58const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
59/*
60 * Base Layer: QWERTY
61 */
62 [_QWERTY] = LAYOUT_kyria_base_wrapper(
63 /* ,-----------------------. ,-----------------------. */
64 _______QWERTY_L1______, _______QWERTY_R1______,
65 _______QWERTY_L2______, _______QWERTY_R2______,
66 _______QWERTY_L3______, _______QWERTY_R3______,
67 _______THUMBS_L_______, _______THUMBS_R_______
68 /* `---------------------' `---------------------' */
69 ),
70 [_COLEMAK] = LAYOUT_kyria_wrapper(
71 /* ,-----------------------. ,-----------------------. */
72 KC_GRV, _______COLEMAK_L1_____, _______COLEMAK_R1_____, KC_BSLS,
73 KC_CTLBS, _______COLEMAK_L2_____, _______COLEMAK_R2_____, KC_SCLN,
74 KC_EQL, _______COLEMAK_L3_____, KC_LCCL, KC_LGUI, KC_ALTCL, KC_LSFT, _______COLEMAK_R3_____, KC_MINS,
75 SCMD_T(KC_LBRC), C_S_T(KC_MINS), _______THUMBS_L_______, _______THUMBS_R_______, TO(_QWERTY), KC_PSCR
76 /* `---------------------' `---------------------' */
77 ),
78 // GAME layout -- qwerty without homerow mods
79 [_GAME] = LAYOUT_kyria_wrapper(
80 /* ,-------------------------------------------. ,-------------------------------------------. */
81 KC_GRV, _______QWERTY_L1______, _______QWERTY_R1______, KC_BSLS,
82 KC_CTLBS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
83 KC_LSFT, _______QWERTY_L3______, KC_LCCL, KC_LALT, KC_ALTCL, KC_LSFT, _______QWERTY_R3______, KC_MINS,
84 KC_EQL, KC_0, _______NAKED_L___T____, _______THUMBS_R_______, TO(_COLEMAK), KC_F12
85 /* `----------------------------------' `----------------------------------' */
86 ),
87 [_FN] = LAYOUT_kyria_base_wrapper(
88 /* ,-----------------------. ,-----------------------. */
89 _______FN_______L1____, _______INACTIVE_R1____,
90 _______FN_______L2____, _______INACTIVE_R2____,
91 _______FN_______L3____, _______NAV______R2____,
92 _______FN________T____, _______INACTIVE__T____
93 /* `---------------------' `---------------------' */
94 ),
95 [_SYMBOLS] = LAYOUT_kyria_base_wrapper(
96 /* ,-----------------------. ,-----------------------. */
97 _______SYM______L1____, _______INACTIVE_R1____,
98 _______SYM______L2____, _______INACTIVE_R2____,
99 _______SYM______L3____, _______INACTIVE_R3____,
100 _______SYM_______T____, _______INACTIVE__T____
101 /* `---------------------' `---------------------' */
102 ),
103 [_NUM] = LAYOUT_kyria_base_wrapper(
104 /* ,-----------------------. ,-----------------------. */
105 _______NUM______L1____, _______INACTIVE_R1____,
106 _______NUM______L2____, _______INACTIVE_R2____,
107 _______NUM______L3____, _______INACTIVE_R3____,
108 _______NUM_______T____, _______INACTIVE__T____
109 /* `---------------------' `---------------------' */
110 ),
111 [_NAV] = LAYOUT_kyria_base_wrapper(
112 /* ,-----------------------. ,-----------------------. */
113 _______INACTIVE_L1____, _______NAV______R1____,
114 _______INACTIVE_L2____, _______NAV______R2____,
115 _______INACTIVE_L3____, _______NAV______R3____,
116 _______INACTIVE__T____, _______NAV_______T____
117 /* `---------------------' `---------------------' */
118 ),
119 [_MOUSE] = LAYOUT_kyria_base_wrapper(
120 /* ,-----------------------. ,-----------------------. */
121 _______INACTIVE_L1____, _______MOUSE____R1____,
122 _______INACTIVE_L2____, _______MOUSE____R2____,
123 _______INACTIVE_L3____, _______MOUSE____R3____,
124 _______INACTIVE__T____, _______MOUSE_____T____
125 /* `---------------------' `---------------------' */
126 ),
127 [_MEDIA] = LAYOUT_kyria_base_wrapper(
128 /* ,-----------------------. ,-----------------------. */
129 _______INACTIVE_L1____, _______MEDIA____R1____,
130 _______INACTIVE_L2____, _______MEDIA____R2____,
131 _______INACTIVE_L3____, _______MEDIA____R3____,
132 _______INACTIVE__T____, _______MEDIA_____T____
133 /* `---------------------' `---------------------' */
134 ),
135};
136
137#ifdef RAW_ENABLE
138static void send_layer_via_hid(int layer) {
139 uint8_t data[RAW_EPSIZE];
140 data[0] = 1;
141 data[1] = layer;
142 raw_hid_send(data, sizeof(data));
143 return;
144}
145#endif
146
147
148#ifdef RGBLIGHT_LAYERS
149const rgblight_segment_t PROGMEM my_qwerty_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, 20, HSV_AZURE} );
150const rgblight_segment_t PROGMEM my_colemak_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, 20, HSV_BLUE} );
151const rgblight_segment_t PROGMEM my_game_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, 20, HSV_RED} );
152const rgblight_segment_t PROGMEM my_fn_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, 20, HSV_PINK} );
153const rgblight_segment_t PROGMEM my_symbols_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, 20, HSV_GREEN} );
154const rgblight_segment_t PROGMEM my_num_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, 20, HSV_CORAL} );
155const rgblight_segment_t PROGMEM my_nav_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, 20, HSV_GOLDENROD} );
156const rgblight_segment_t PROGMEM my_mouse_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, 20, HSV_TURQUOISE} );
157const rgblight_segment_t PROGMEM my_media_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, 20, HSV_MAGENTA} );
158
159const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS(
160 {0, 3, HSV_RED},
161 {7, 1, HSV_RED},
162 {10, 3, HSV_RED},
163 {17, 1, HSV_RED}
164);
165
166const rgblight_segment_t PROGMEM my_shift_layer[] = RGBLIGHT_LAYER_SEGMENTS(
167 {3, 1, HSV_RED},
168 {13, 1, HSV_RED}
169);
170
171const rgblight_segment_t PROGMEM my_ctrl_layer[] = RGBLIGHT_LAYER_SEGMENTS(
172 {4, 1, HSV_ORANGE},
173 {14, 1, HSV_ORANGE}
174);
175
176const rgblight_segment_t PROGMEM my_alt_layer[] = RGBLIGHT_LAYER_SEGMENTS(
177 {5, 1, HSV_GOLD},
178 {15, 1, HSV_GOLD}
179);
180
181const rgblight_segment_t PROGMEM my_gui_layer[] = RGBLIGHT_LAYER_SEGMENTS(
182 {9, 1, HSV_SPRINGGREEN},
183 {19, 1, HSV_SPRINGGREEN}
184);
185
186const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST(
187 my_colemak_layer,
188 my_qwerty_layer,
189 my_game_layer,
190 my_fn_layer,
191 my_symbols_layer,
192 my_num_layer,
193 my_nav_layer,
194 my_mouse_layer,
195 my_media_layer,
196 my_capslock_layer,
197 my_shift_layer,
198 my_ctrl_layer,
199 my_alt_layer,
200 my_gui_layer
201);
202
203void matrix_scan_keymap(void) {
204 uint8_t mods = mod_config(get_mods());
205 rgblight_set_layer_state(10, mods & MOD_MASK_SHIFT);
206 rgblight_set_layer_state(11, mods & MOD_MASK_CTRL);
207 rgblight_set_layer_state(12, mods & MOD_MASK_ALT);
208 rgblight_set_layer_state(13, mods & MOD_MASK_GUI);
209}
210#endif
211
212void keyboard_post_init_user(void) {
213 rgblight_sethsv_noeeprom(HSV_BLUE);
214 keyboard_post_init_rgb();
215#ifdef RGBLIGHT_LAYERS
216 rgblight_layers = my_rgb_layers;
217#else
218 rgblight_sethsv_noeeprom(HSV_BLUE);
219#endif
220 /*debug_enable=true;*/
221 /*debug_matrix=true;*/
222}
223
224//todo https://github.com/qmk/qmk_firmware/blob/debdc6379c7a72815df1f53e3406479381d243af/keyboards/crkbd/keymaps/soundmonster/keymap.c RGBRST
225
226layer_state_t layer_state_set_user(layer_state_t state) {
227#ifdef RGBLIGHT_LAYERS
228 for (int i = _QWERTY; i < __LAST; i++) {
229 rgblight_set_layer_state(i, layer_state_cmp(state, i));
230 }
231# ifdef RAW_ENABLE
232 send_layer_via_hid(state);
233# endif
234#endif
235 return state;
236}
237
238#ifdef RGBLIGHT_LAYERS
239bool led_update_user(led_t led_state) {
240 rgblight_set_layer_state(9, led_state.caps_lock);
241 return true;
242}
243#endif
244
245#ifdef OLED_DRIVER_ENABLE
246void suspend_power_down_user() {
247 oled_clear();
248 oled_off();
249}
250
251oled_rotation_t oled_init_user(oled_rotation_t rotation) {
252 return OLED_ROTATION_180;
253}
254
255static void render_logo(void) {
256 static const char PROGMEM qmk_logo[] = {
257 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,
258 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,
259 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0};
260
261 static const char PROGMEM logo[] = {
262 // canvas is 128x64. need 16 padding
263 // 80x32
264 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
265 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0x60, 0xe0, 0xf0, 0xfe, 0xfe, 0xf0, 0x60, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
266 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
267 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
268 0x00, 0x00, 0x0c, 0x1c, 0x3c, 0x7c, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x7c, 0xf8, 0xe0, 0x60, 0x20, 0x10, 0x10, 0x0c, 0x0f, 0x09, 0x08, 0x00, 0x09, 0x9b, 0x5c, 0x50, 0x10, 0x20, 0x40, 0xe0, 0xf8, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0x78, 0x38, 0x38, 0x10, 0x00, 0x00,
269 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
270 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
271 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x03, 0x03, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x1f, 0x1f, 0x1f, 0x1f, 0x17, 0x15, 0x3d, 0xef, 0xaf, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x10, 0x00, 0x02, 0x02, 0x01, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x40, 0xa0, 0xbf, 0xff, 0x3f, 0x3f, 0x3f, 0x1f, 0x1f, 0x1f, 0x1f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
272 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
273 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
274 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
275 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
276 };
277 oled_write_raw_P(logo, sizeof(logo));
278
279 oled_advance_page(false);
280 oled_advance_page(false);
281 oled_advance_page(false);
282 oled_advance_page(false);
283 oled_write_P(qmk_logo, false);
284
285#ifdef COMBO_ENABLE
286 oled_write_P(PSTR("Combos enabled: "), false);
287 if (is_combo_enabled()) {
288 oled_write_P(PSTR("Yes\n"), false);
289 } else {
290 oled_write_P(PSTR("No\n"), false);
291 }
292#endif
293
294#ifdef SPLIT_MODS_ENABLE
295 uint8_t mods = get_mods() | get_weak_mods();
296 oled_write_P((mods & MOD_MASK_GUI) ? PSTR("GUI ") : PSTR(" "), false);
297 oled_write_P((mods & MOD_MASK_ALT) ? PSTR("ALT ") : PSTR(" "), false);
298 oled_write_P((mods & MOD_MASK_CTRL) ? PSTR("CTRL ") : PSTR(" "), false);
299 oled_write_P((mods & MOD_MASK_SHIFT) ? PSTR("SHFT ") : PSTR(" "), false);
300 oled_write_P(PSTR("\n"), false);
301
302#endif
303
304#ifdef WPM_ENABLE
305 // Write WPM
306 sprintf(wpm_str, "WPM: %03d", get_current_wpm());
307 //oled_write_P(PSTR("\n"), false);
308 oled_write_P(PSTR(" "), false);
309 oled_write(wpm_str, false);
310#endif
311}
312
313
314static void render_status(void) {
315 static bool isColemak = false;
316 // QMK Logo and version information
317 oled_write_P(PSTR("Kyria rev1.3\n\n"), false);
318
319 oled_write_P(isColemak ? PSTR("COLEMAK ") : PSTR("QWERTY "), false);
320
321 // Host Keyboard Layer Status
322 switch (get_highest_layer(layer_state)) {
323 case _QWERTY:
324 oled_write_P(PSTR("Default\n"), false);
325 isColemak = false;
326 break;
327 case _SYMBOLS:
328 oled_write_P(PSTR("Shifted Sym\n"), false);
329 break;
330 case _NUM:
331 oled_write_P(PSTR("Numbers\n"), false);
332 break;
333 case _NAV:
334 oled_write_P(PSTR("Navigation\n"), false);
335 break;
336 case _FN:
337 oled_write_P(PSTR("Fn\n"), false);
338 break;
339 case _GAME:
340 oled_write_P(PSTR("Game\n"), false);
341 isColemak = false;
342 break;
343 case _COLEMAK:
344 oled_write_P(PSTR("Colemak-DHm\n"), false);
345 isColemak = true;
346 break;
347 case _MEDIA:
348 oled_write_P(PSTR("Media keys\n"), false);
349 break;
350 case _MOUSE:
351 oled_write_P(PSTR("Mouse keys\n"), false);
352 break;
353 default:
354 oled_write_P(PSTR("Undefined\n"), false);
355 }
356
357 uint8_t mods = get_mods() | get_weak_mods();
358 oled_write_P(PSTR("\n"), false);
359 oled_write_P((mods & MOD_MASK_GUI) ? PSTR("GUI ") : PSTR(" "), false);
360 oled_write_P((mods & MOD_MASK_ALT) ? PSTR("ALT ") : PSTR(" "), false);
361 oled_write_P((mods & MOD_MASK_CTRL) ? PSTR("CTRL ") : PSTR(" "), false);
362 oled_write_P((mods & MOD_MASK_SHIFT) ? PSTR("SHFT ") : PSTR(" "), false);
363 oled_write_P(PSTR("\n"), false);
364
365#define I3MASK MOD_BIT(KC_LGUI)
366#define I3SMASK (MOD_BIT(KC_LGUI) | MOD_BIT(KC_LSFT))
367#define KMASK (MOD_BIT(KC_LCTL) | MOD_BIT(KC_LSFT))
368
369 oled_write_P((mods == I3MASK) ? PSTR("I3 ") : (mods == I3SMASK) ? PSTR("I3-SFT ") : PSTR(" "), false);
370 oled_write_P((mods == KMASK) ? PSTR("KITTY ") : PSTR(" "), false);
371 oled_write_P(PSTR("\n"), false);
372
373 // Host Keyboard LED Status
374 uint8_t led_usb_state = host_keyboard_leds();
375 oled_write_P(IS_LED_ON(led_usb_state, USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false);
376 oled_write_P(IS_LED_ON(led_usb_state, USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false);
377 oled_write_P(IS_LED_ON(led_usb_state, USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false);
378
379}
380
381void oled_task_user(void) {
382 if (is_keyboard_master()) {
383 render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc)
384 } else {
385 render_logo();
386 }
387}
388#endif
389
390
391#ifdef RAW_ENABLE
392void raw_hid_receive(uint8_t *data, uint8_t length) {
393 // messages from host
394 // add ability to set color
395 raw_hid_send(data, length);
396}
397#endif
diff --git a/keyboards/kyria/keymaps/cwebster2/rules.mk b/keyboards/kyria/keymaps/cwebster2/rules.mk
new file mode 100644
index 000000000..fe9ca3c2c
--- /dev/null
+++ b/keyboards/kyria/keymaps/cwebster2/rules.mk
@@ -0,0 +1,5 @@
1OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays
2RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
3RAW_ENABLE = yes
4WPM_ENABLE = yes
5COMBO_ENABLE = no
diff --git a/keyboards/rgbkb/zen/rev1/keymaps/cwebster2/config.h b/keyboards/rgbkb/zen/rev1/keymaps/cwebster2/config.h
new file mode 100644
index 000000000..211e3517e
--- /dev/null
+++ b/keyboards/rgbkb/zen/rev1/keymaps/cwebster2/config.h
@@ -0,0 +1,34 @@
1/*
2Copyright 2020 Casey Webster <casey@e1337.dev>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#pragma once
19
20#include "config_common.h"
21
22/* Use I2C or Serial, not both */
23
24#define USE_SERIAL
25
26#define EE_HANDS
27
28#ifdef COMBO_ENABLE
29 #define COMBO_COUNT 2
30#endif
31
32#define QMK_KEYS_PER_SCAN 4
33
34#define EE_HANDS
diff --git a/keyboards/rgbkb/zen/rev1/keymaps/cwebster2/keymap.c b/keyboards/rgbkb/zen/rev1/keymaps/cwebster2/keymap.c
new file mode 100644
index 000000000..700139566
--- /dev/null
+++ b/keyboards/rgbkb/zen/rev1/keymaps/cwebster2/keymap.c
@@ -0,0 +1,116 @@
1/* Copyright 2020 Casey Webster <casey@e1337.dev>
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#include "rev1.h"
18#include "cwebster2.h"
19
20#define LAYOUT_zen_base( \
21 L01, L02, L03, L04, L05, R05, R04, R03, R02, R01, \
22 L11, L12, L13, L14, L15, R15, R14, R13, R12, R11, \
23 L21, L22, L23, L24, L25, R25, R24, R23, R22, R21, \
24 L33, L34, L35, R35, R34, R33 \
25 ) \
26 LAYOUT_zen_wrapper ( \
27 KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, \
28 KC_GRV, L01, L02, L03, L04, L05, R05, R04, R03, R02, R01, KC_BSLS, \
29 KC_CTLBS, L11, L12, L13, L14, L15, R15, R14, R13, R12, R11, KC_QUOT, \
30 KC_EQL, L21, L22, L23, L24, L25, R25, R24, R23, R22, R21, KC_MINS, \
31 KC_LCCL, KC_LGUI, SCMD_T(KC_LBRC), C_S_T(KC_MINS), L33, L34, L35, R35, R34, R33, TO(_GAME), KC_PSCR, KC_ALTCL, KC_LSFT \
32 )
33#define LAYOUT_zen_base_wrapper(...) LAYOUT_zen_base(__VA_ARGS__)
34
35
36const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
37/*
38 * Base Layer: QWERTY
39 */
40 [_QWERTY] = LAYOUT_zen_base_wrapper(
41 /* ,-----------------------. ,-----------------------. */
42 _______QWERTY_L1______, _______QWERTY_R1______,
43 _______QWERTY_L2______, _______QWERTY_R2______,
44 _______QWERTY_L3______, _______QWERTY_R3______,
45 _______THUMBS_L_______, _______THUMBS_R_______
46 /* `---------------------' `---------------------' */
47 ),
48 [_COLEMAK] = LAYOUT_zen_wrapper(
49 /* ,-----------------------. ,-----------------------. */
50 KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL,
51 KC_GRV, _______COLEMAK_L1_____, _______COLEMAK_R1_____, KC_BSLS,
52 KC_CTLBS, _______COLEMAK_L2_____, _______COLEMAK_R2_____, KC_SCLN,
53 KC_EQL, _______COLEMAK_L3_____, _______COLEMAK_R3_____, KC_MINS,
54 KC_LCCL, KC_LGUI, SCMD_T(KC_LBRC), C_S_T(KC_MINS), _______THUMBS_L_______, _______THUMBS_R_______, TO(_QWERTY), KC_PSCR, KC_ALTCL, KC_LSFT
55 /* `---------------------' `---------------------' */
56 ),
57 // GAME layout -- qwerty without homerow mods
58 [_GAME] = LAYOUT_zen_wrapper(
59 /* ,-------------------------------------------. ,-------------------------------------------. */
60 KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL,
61 KC_GRV, _______QWERTY_L1______, _______QWERTY_R1______, KC_BSLS,
62 KC_CTLBS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
63 KC_EQL, _______QWERTY_L3______, _______QWERTY_R3______, KC_MINS,
64 KC_LCCL, KC_LGUI, SCMD_T(KC_LBRC), C_S_T(KC_MINS), _______THUMBS_L_______, _______THUMBS_R_______, TO(_COLEMAK), KC_PSCR, KC_ALTCL, KC_LSFT
65 /* `----------------------------------' `----------------------------------' */
66 ),
67 [_FN] = LAYOUT_zen_base_wrapper(
68 /* ,-----------------------. ,-----------------------. */
69 _______FN_______L1____, _______INACTIVE_R1____,
70 _______FN_______L2____, _______INACTIVE_R2____,
71 _______FN_______L3____, _______NAV______R2____,
72 _______FN________T____, _______INACTIVE__T____
73 /* `---------------------' `---------------------' */
74 ),
75 [_SYMBOLS] = LAYOUT_zen_base_wrapper(
76 /* ,-----------------------. ,-----------------------. */
77 _______SYM______L1____, _______INACTIVE_R1____,
78 _______SYM______L2____, _______INACTIVE_R2____,
79 _______SYM______L3____, _______INACTIVE_R3____,
80 _______SYM_______T____, _______INACTIVE__T____
81 /* `---------------------' `---------------------' */
82 ),
83 [_NUM] = LAYOUT_zen_base_wrapper(
84 /* ,-----------------------. ,-----------------------. */
85 _______NUM______L1____, _______INACTIVE_R1____,
86 _______NUM______L2____, _______INACTIVE_R2____,
87 _______NUM______L3____, _______INACTIVE_R3____,
88 _______NUM_______T____, _______INACTIVE__T____
89 /* `---------------------' `---------------------' */
90 ),
91 [_NAV] = LAYOUT_zen_base_wrapper(
92 /* ,-----------------------. ,-----------------------. */
93 _______INACTIVE_L1____, _______NAV______R1____,
94 _______INACTIVE_L2____, _______NAV______R2____,
95 _______INACTIVE_L3____, _______NAV______R3____,
96 _______INACTIVE__T____, _______NAV_______T____
97 /* `---------------------' `---------------------' */
98 ),
99 [_MOUSE] = LAYOUT_zen_base_wrapper(
100 /* ,-----------------------. ,-----------------------. */
101 _______INACTIVE_L1____, _______MOUSE____R1____,
102 _______INACTIVE_L2____, _______MOUSE____R2____,
103 _______INACTIVE_L3____, _______MOUSE____R3____,
104 _______INACTIVE__T____, _______MOUSE_____T____
105 /* `---------------------' `---------------------' */
106 ),
107 [_MEDIA] = LAYOUT_zen_base_wrapper(
108 /* ,-----------------------. ,-----------------------. */
109 _______INACTIVE_L1____, _______MEDIA____R1____,
110 _______INACTIVE_L2____, _______MEDIA____R2____,
111 _______INACTIVE_L3____, _______MEDIA____R3____,
112 _______INACTIVE__T____, _______MEDIA_____T____
113 /* `---------------------' `---------------------' */
114 ),
115};
116
diff --git a/keyboards/rgbkb/zen/rev1/keymaps/cwebster2/rules.mk b/keyboards/rgbkb/zen/rev1/keymaps/cwebster2/rules.mk
new file mode 100644
index 000000000..632a5f610
--- /dev/null
+++ b/keyboards/rgbkb/zen/rev1/keymaps/cwebster2/rules.mk
@@ -0,0 +1,2 @@
1RGBLIGHT_ENABLE = no
2RAW_ENABLE = yes
diff --git a/users/cwebster2/config.h b/users/cwebster2/config.h
new file mode 100644
index 000000000..78733687c
--- /dev/null
+++ b/users/cwebster2/config.h
@@ -0,0 +1,57 @@
1/* Copyright 2020 Casey Webster <casey@e1337.dev>
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#pragma once
17
18#define TAPPING_TOGGLE 1
19#define TAPPING_TERM 200
20#define TAPPING_TERM_PER_KEY
21//#define TAPPING_FORCE_HOLD
22#undef PERMISSIVE_HOLD
23#define IGNORE_MOD_TAP_INTERRUPT
24#define NO_ACTION_ONESHOT
25
26#ifdef AUTO_SHIFT_ENABLE
27 #define AUTO_SHIFT_TIMEOUT 200
28 #define NO_AUTO_SHIFT_SPECIAL
29 #define NO_AUTO_SHIFT_ALPHA
30#endif
31
32#undef MOUSEKEY_DELAY
33#define MOUSEKEY_DELAY 0
34#undef MOUSEKEY_INTERVAL
35#define MOUSEKEY_INTERVAL 16
36#undef MOUSEKEY_WHEEL_DELAY
37#define MOUSEKEY_WHEEL_DELAY 0
38#undef MOUSEKEY_MAX_SPEED
39#define MOUSEKEY_MAX_SPEED 6
40#undef MOUSEKEY_TIME_TO_MAX
41#define MOUSEKEY_TIME_TO_MAX 64
42
43#ifdef LOCKING_SUPPORT_ENABLE
44# undef LOCKING_SUPPORT_ENABLE
45#endif
46#ifdef LOCKING_RESYNC_ENABLE
47# undef LOCKING_RESYNC_ENABLE
48#endif
49
50#define NO_ACTION_MACRO
51#define NO_ACTION_FUNCTION
52#ifndef NO_DEBUG
53 #define NO_DEBUG
54#endif // !NO_DEBUG
55#if !defined(NO_PRINT) && !defined(CONSOLE_ENABLE)
56 #define NO_PRINT
57#endif // !NO_PRINT
diff --git a/users/cwebster2/cwebster2.c b/users/cwebster2/cwebster2.c
new file mode 100644
index 000000000..cfebc12c6
--- /dev/null
+++ b/users/cwebster2/cwebster2.c
@@ -0,0 +1,65 @@
1/* Copyright 2020 Casey Webster <casey@e1337.dev>
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 "cwebster2.h"
17
18userspace_config_t userspace_config;
19
20__attribute__((weak)) void matrix_scan_keymap(void) {}
21
22void matrix_scan_user(void) {
23 static bool has_ran_yet;
24 if (!has_ran_yet) {
25 has_ran_yet = true;
26 startup_user();
27 }
28
29 matrix_scan_keymap();
30}
31
32void keyboard_post_init_rgb(void) {
33#if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_STARTUP_ANIMATION)
34 /*if (userspace_config.rgb_layer_change) { rgblight_enable_noeeprom(); }*/
35 /*if (rgblight_config.enable) {*/
36 /*layer_state_set_user(layer_state);*/
37 /*uint16_t old_hue = rgblight_config.hue;*/
38 uint16_t old_hue = 170;
39 rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
40 for (uint16_t i = 255; i > 0; i--) {
41 rgblight_sethsv_noeeprom( ( i + old_hue) % 255, 255, 255);
42 matrix_scan();
43 wait_ms(10);
44 }
45 /*}*/
46#endif
47 /*layer_state_set_user(layer_state);*/
48}
49
50__attribute__((weak)) void eeconfig_init_keymap(void) {}
51
52void eeconfig_init_user(void) {
53 userspace_config.raw = 0;
54 userspace_config.rgb_layer_change = true;
55 eeconfig_update_user(userspace_config.raw);
56 eeconfig_init_keymap();
57 keyboard_init();
58}
59
60bool hasAllBitsInMask(uint8_t value, uint8_t mask) {
61 value &= 0xF;
62 mask &= 0xF;
63
64 return (value & mask) == mask;
65}
diff --git a/users/cwebster2/cwebster2.h b/users/cwebster2/cwebster2.h
new file mode 100644
index 000000000..3d315d674
--- /dev/null
+++ b/users/cwebster2/cwebster2.h
@@ -0,0 +1,51 @@
1/* Copyright 2020 Casey Webster <casey@e1337.dev>
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#pragma once
17
18#include "my_miryoku.h"
19#include "keycodes.h"
20#include "eeprom.h"
21
22#define LAYOUT_kyria_wrapper(...) LAYOUT(__VA_ARGS__)
23#define LAYOUT_zen_wrapper(...) LAYOUT(__VA_ARGS__)
24
25enum userspace_layers {
26 _COLEMAK = 0,
27 _QWERTY,
28 _GAME,
29 _FN,
30 _SYMBOLS,
31 _NUM,
32 _NAV,
33 _MOUSE,
34 _MEDIA,
35 __LAST
36};
37
38void keyboard_post_init_rgb(void);
39void matrix_scan_keymap(void);
40void eeconfig_init_keymap(void);
41bool hasAllBitsInMask(uint8_t value, uint8_t mask);
42
43
44typedef union {
45 uint32_t raw;
46 struct {
47 bool rgb_layer_change :1;
48 };
49} userspace_config_t;
50
51extern userspace_config_t userspace_config;
diff --git a/users/cwebster2/keycodes.c b/users/cwebster2/keycodes.c
new file mode 100644
index 000000000..39b4341bd
--- /dev/null
+++ b/users/cwebster2/keycodes.c
@@ -0,0 +1,53 @@
1/* Copyright 2020 Casey Webster <casey@e1337.dev>
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 "keycodes.h"
17
18__attribute__((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { return true; }
19
20bool process_record_user(uint16_t keycode, keyrecord_t *record) {
21 static uint16_t my_colon_timer;
22
23 switch (keycode) {
24 case KC_LCCL:
25 if (record->event.pressed) {
26 my_colon_timer = timer_read();
27 register_code(KC_LCTL);
28 } else {
29 unregister_code(KC_LCTL);
30 if (timer_elapsed(my_colon_timer) < TAPPING_TERM) {
31 SEND_STRING(":");
32 }
33 }
34 return false;
35 }
36 return process_record_keymap(keycode, record);
37}
38
39uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) {
40 switch (keycode) {
41 case LGUI_T(KC_A):
42 case LALT_T(KC_S):
43 case LCTL_T(KC_D):
44 case LSFT_T(KC_F):
45 case RSFT_T(KC_J):
46 case RCTL_T(KC_K):
47 case RALT_T(KC_L):
48 case RGUI_T(KC_SCLN):
49 return TAPPING_TERM + 150;
50 default:
51 return TAPPING_TERM;
52 }
53}
diff --git a/users/cwebster2/keycodes.h b/users/cwebster2/keycodes.h
new file mode 100644
index 000000000..b6363d646
--- /dev/null
+++ b/users/cwebster2/keycodes.h
@@ -0,0 +1,27 @@
1/* Copyright 2020 Casey Webster <casey@e1337.dev>
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#pragma once
17
18#include QMK_KEYBOARD_H
19
20enum userspace_custom_keycodes {
21 KC_LCCL = SAFE_RANGE,
22 NEW_SAFE_RANGE
23};
24
25#define KC_CTLBS CTL_T(KC_BSPC)
26#define KC_ALTCL LALT_T(KC_CAPS)
27#define KC_LOCK LGUI(LCTL(KC_L))
diff --git a/users/cwebster2/my_miryoku.h b/users/cwebster2/my_miryoku.h
new file mode 100644
index 000000000..943855ad4
--- /dev/null
+++ b/users/cwebster2/my_miryoku.h
@@ -0,0 +1,77 @@
1/* Copyright 2020 Casey Webster <casey@e1337.dev>
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#pragma once
17
18#define _______QWERTY_L1______ KC_Q, KC_W, KC_E, KC_R, KC_T
19#define _______QWERTY_L2______ LGUI_T(KC_A), LALT_T(KC_S), LCTL_T(KC_D), LSFT_T(KC_F), KC_G
20#define _______QWERTY_L3______ KC_Z, KC_X, KC_C, KC_V, KC_B
21#define _______QWERTY_R1______ KC_Y, KC_U, KC_I, KC_O, KC_P
22#define _______QWERTY_R2______ KC_H, RSFT_T(KC_J), RCTL_T(KC_K), RALT_T(KC_L), RGUI_T(KC_SCLN)
23#define _______QWERTY_R3______ KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH
24
25#define _______COLEMAK_L1_____ KC_Q, KC_W, KC_F, KC_P, KC_B
26#define _______COLEMAK_L2_____ LGUI_T(KC_A), LALT_T(KC_R), LCTL_T(KC_S), LSFT_T(KC_T), KC_G
27#define _______COLEMAK_L3_____ KC_Z, KC_X, KC_C, KC_D, KC_V
28#define _______COLEMAK_R1_____ KC_J, KC_L, KC_U, KC_Y, KC_QUOT
29#define _______COLEMAK_R2_____ KC_M, RSFT_T(KC_N), RCTL_T(KC_E), RALT_T(KC_I), RGUI_T(KC_O)
30#define _______COLEMAK_R3_____ KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH
31
32#define _______THUMBS_L_______ LT(_MOUSE,KC_ESC), LT(_NAV,KC_SPC), LT(_MEDIA, KC_TAB)
33#define _______THUMBS_R_______ LT(_FN, KC_ENT), LT(_NUM,KC_BSPC), LT(_SYMBOLS,KC_DEL)
34
35#define _______NAKED_R___T____ KC_ENT, KC_BSPC, KC_DEL
36#define _______NAKED_L___T____ KC_ESC, KC_SPC, KC_TAB
37
38#define _______INACTIVE_R1____ KC_LOCK, KC_TRNS, KC_TRNS, KC_TRNS, RESET
39#define _______INACTIVE_R2____ KC_TRNS, KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI
40#define _______INACTIVE_R3____ KC_TRNS, KC_TRNS, KC_TRNS, KC_RALT, KC_TRNS
41
42#define _______INACTIVE_L1____ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LOCK
43#define _______INACTIVE_L2____ KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, KC_TRNS
44#define _______INACTIVE_L3____ KC_TRNS, KC_RALT, KC_LEFT, KC_RGHT, KC_TRNS
45
46#define _______INACTIVE__T____ KC_TRNS, KC_TRNS, KC_TRNS
47
48
49#define _______SYM______L1____ KC_RCBR, KC_AMPR, KC_ASTR, KC_LPRN, KC_LCBR
50#define _______SYM______L2____ KC_COLN, KC_DLR, KC_PERC, KC_CIRC, KC_PLUS
51#define _______SYM______L3____ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_PIPE
52#define _______SYM_______T____ KC_LPRN, KC_RPRN, KC_UNDS
53
54#define _______NUM______L1____ KC_RBRC, KC_7, KC_8, KC_9, KC_LBRC
55#define _______NUM______L2____ KC_SCLN, KC_4, KC_5, KC_6, KC_EQL
56#define _______NUM______L3____ KC_GRV, KC_1, KC_2, KC_3, KC_SLSH
57#define _______NUM_______T____ KC_DOT, KC_0, KC_MINS
58
59#define _______FN_______L1____ KC_F12, KC_F7, KC_F8, KC_F9, KC_SYSREQ
60#define _______FN_______L2____ KC_F11, KC_F4, KC_F5, KC_F6, KC_TRNS
61#define _______FN_______L3____ KC_F10, KC_F1, KC_F2, KC_F3, KC_BSLS
62#define _______FN________T____ KC_MENU, KC_SLSH, KC_TRNS
63
64#define _______NAV______R1____ KC_UNDO, KC_CUT, KC_COPY, KC_PSTE, KC_AGIN
65#define _______NAV______R2____ KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_CAPS
66#define _______NAV______R3____ KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_INS
67#define _______NAV_______T____ KC_ENT, KC_BSPC, KC_DEL
68
69#define _______MEDIA____R1____ RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI
70#define _______MEDIA____R2____ KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT, KC_TRNS
71#define _______MEDIA____R3____ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
72#define _______MEDIA_____T____ KC_MSTP, KC_MPLY, KC_MUTE
73
74#define _______MOUSE____R1____ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
75#define _______MOUSE____R2____ KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_TRNS
76#define _______MOUSE____R3____ KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, KC_TRNS
77#define _______MOUSE_____T____ KC_BTN1, KC_BTN3, KC_BTN2
diff --git a/users/cwebster2/rules.mk b/users/cwebster2/rules.mk
new file mode 100644
index 000000000..f39d4ebc9
--- /dev/null
+++ b/users/cwebster2/rules.mk
@@ -0,0 +1,13 @@
1AUTO_SHIFT_ENABLE = no # Enable autoshift
2MOUSEKEY_ENABLE = yes
3EXTRAKEY_ENABLE = yes
4CONSOLE_ENABLE = no
5BOOTMAGIC_ENABLE = no
6GRAVE_ESC_ENABLE = no
7CONSOLE_ENABLE = no
8SPACE_CADET_ENABLE = no
9GRAVE_ESC_ENABLE = no
10LTO_ENABLE = yes
11
12SRC += cwebster2.c
13SRC += keycodes.c