aboutsummaryrefslogtreecommitdiff
path: root/users/drashna
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2019-05-06 22:34:09 -0700
committerMechMerlin <30334081+mechmerlin@users.noreply.github.com>2019-05-06 22:34:09 -0700
commitf3d5b1091d364468cd9f5510aef9e723d8542279 (patch)
tree762b8f562b1e96e42657f872fd4b04c8efaaa829 /users/drashna
parent7a751f114114bf3b78d5d8fc8bedf2b42b665dba (diff)
downloadqmk_firmware-f3d5b1091d364468cd9f5510aef9e723d8542279.tar.gz
qmk_firmware-f3d5b1091d364468cd9f5510aef9e723d8542279.zip
[Keymap] RGB Changes for Drashna Keyboards (#5803)
* Disable a bunch of reactive modes * Enable rgb matrix for Corne Keyboard * Convert CRKBD to rgb matrix * Add Gergo keyboard layout * Make Diablo 3 tap dance better * Add basic support for Planck EZ * Fix RGB Matrix stuff * Fix keycodes for Planck EZ * Update CRKBD OLED stuff * Fix typo for sleep on ergodox glow * Improve my gergo layout * Scrolling OLED key logger! * Change gergo layout * Hnadle unicode keycodes if unicode is disabled * Disable COMMAND/CONSOLE for gergo * Fix right side control * Re-enable LTO for all platforms Since I got updated arm gcc binaries that no longer error out on lto * Update formatting to match newer community standards Poor 2 space * Re-alight startup animation to use new HUE range * Streamline gitlab ci scripts * Disabled Space Cadet * Add support for breathing table * Enable new LTO Option And clean up defines that will now be repeatitive * Remove vscode settings * Additional formatting cleanup of config.h files
Diffstat (limited to 'users/drashna')
-rw-r--r--users/drashna/.gitlab-ci.yml35
-rw-r--r--users/drashna/config.h72
-rw-r--r--users/drashna/drashna.c198
-rw-r--r--users/drashna/drashna.h76
-rw-r--r--users/drashna/process_records.c232
-rw-r--r--users/drashna/process_records.h76
-rw-r--r--users/drashna/rgb_stuff.c441
-rw-r--r--users/drashna/rgblight_breathe_table.h116
-rw-r--r--users/drashna/rules.mk46
-rw-r--r--users/drashna/send_unicode.h104
-rw-r--r--users/drashna/tap_dances.c77
-rw-r--r--users/drashna/tap_dances.h15
-rw-r--r--users/drashna/wrappers.h3
13 files changed, 770 insertions, 721 deletions
diff --git a/users/drashna/.gitlab-ci.yml b/users/drashna/.gitlab-ci.yml
index 92813a27d..679bdf435 100644
--- a/users/drashna/.gitlab-ci.yml
+++ b/users/drashna/.gitlab-ci.yml
@@ -1,9 +1,7 @@
1stages: 1stages:
2 - test 2 - test
3 - build
4 - deploy
5 3
6Preliminary Test: 4QMK Firmware:
7 stage: test 5 stage: test
8 variables: 6 variables:
9 GIT_SUBMODULE_STRATEGY: recursive 7 GIT_SUBMODULE_STRATEGY: recursive
@@ -18,36 +16,7 @@ Preliminary Test:
18 script: 16 script:
19 - make test:all 17 - make test:all
20 - make planck/rev6:default planck/rev5:default 18 - make planck/rev6:default planck/rev5:default
21 19 - make keebio/iris/rev2:drashna keebio/iris/rev2:drashna_old ergodox_ez:drashna ergodox_ez:drashna_glow keebio/viterbi/rev1:drashna orthodox/rev1:drashna orthodox/rev3:drashna crkbd:drashna planck/light:drashna planck/rev6:drashna fractal:drashna primekb/prime_m:drashna -j2 --output-sync
22QMK Firmware Defaults:
23 stage: deploy
24 variables:
25 GIT_SUBMODULE_STRATEGY: recursive
26 tags:
27 - linux
28 image: ubuntu:18.10
29 before_script:
30 - apt-get update -qy
31 - apt-get install -y build-essential avr-libc binutils-arm-none-eabi binutils-avr dfu-programmer dfu-util gcc gcc-arm-none-eabi gcc-avr git libnewlib-arm-none-eabi unzip wget zip
32 - avr-gcc --version
33 - uname -a
34 script:
35 - make test:all
36 - make all:default -j16
37
38Drashna Firmware:
39 stage: build
40 variables:
41 GIT_SUBMODULE_STRATEGY: recursive
42 tags:
43 - linux
44 image: ubuntu:18.10
45 before_script:
46 - apt-get update -qy
47 - apt-get install -y build-essential avr-libc binutils-arm-none-eabi binutils-avr dfu-programmer dfu-util gcc gcc-arm-none-eabi gcc-avr git libnewlib-arm-none-eabi unzip wget zip
48 - avr-gcc --version
49 script:
50 - make keebio/iris/rev2:drashna keebio/iris/rev2:drashna_old ergodox_ez:drashna ergodox_ez:drashna_glow keebio/viterbi/rev1:drashna orthodox/rev1:drashna orthodox/rev3:drashna crkbd:drashna planck/light:drashna planck/rev6:drashna fractal:drashna primekb/prime_m:drashna -j16 --output-sync
51 artifacts: 20 artifacts:
52 name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG" 21 name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
53 paths: 22 paths:
diff --git a/users/drashna/config.h b/users/drashna/config.h
index 1680eb4cb..a6d8e7526 100644
--- a/users/drashna/config.h
+++ b/users/drashna/config.h
@@ -2,50 +2,43 @@
2 2
3 3
4#ifdef AUDIO_ENABLE 4#ifdef AUDIO_ENABLE
5 #define AUDIO_CLICKY 5# define AUDIO_CLICKY
6 #define STARTUP_SONG SONG(RICK_ROLL) 6# define STARTUP_SONG SONG(RICK_ROLL)
7 #define GOODBYE_SONG SONG(SONIC_RING) 7# define GOODBYE_SONG SONG(SONIC_RING)
8 #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ 8# define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
9 SONG(COLEMAK_SOUND), \ 9 SONG(COLEMAK_SOUND), \
10 SONG(DVORAK_SOUND), \ 10 SONG(DVORAK_SOUND), \
11 SONG(OVERWATCH_THEME) \ 11 SONG(OVERWATCH_THEME) \
12 } 12 }
13 13
14 #define AUDIO_CLICKY_FREQ_RANDOMNESS 1.5f 14# define AUDIO_CLICKY_FREQ_RANDOMNESS 1.5f
15 // #ifdef RGBLIGHT_ENABLE 15
16 // #define NO_MUSIC_MODE 16# define UNICODE_SONG_OSX SONG(RICK_ROLL)
17 // #endif //RGBLIGHT_ENABLE/ 17# define UNICODE_SONG_LNX SONG(RICK_ROLL)
18 // #ifndef __arm__ 18# define UNICODE_SONG_WIN SONG(RICK_ROLL)
19 // #undef NOTE_REST 19# define UNICODE_SONG_BSD SONG(RICK_ROLL)
20 // #define NOTE_REST 1.00f 20# define UNICODE_SONG_WINC SONG(RICK_ROLL)
21 // #endif // !__arm__
22
23#define UNICODE_SONG_OSX SONG(RICK_ROLL)
24#define UNICODE_SONG_LNX SONG(RICK_ROLL)
25#define UNICODE_SONG_WIN SONG(RICK_ROLL)
26#define UNICODE_SONG_BSD SONG(RICK_ROLL)
27#define UNICODE_SONG_WINC SONG(RICK_ROLL)
28 21
29#endif // !AUDIO_ENABLE 22#endif // !AUDIO_ENABLE
30 23
31#ifdef RGBLIGHT_ENABLE 24#ifdef RGBLIGHT_ENABLE
32 #define RGBLIGHT_SLEEP 25# define RGBLIGHT_SLEEP
33 #undef RGBLIGHT_ANIMATIONS 26# undef RGBLIGHT_ANIMATIONS
34 #define RGBLIGHT_EFFECT_BREATHING 27# define RGBLIGHT_EFFECT_BREATHING
35 #define RGBLIGHT_EFFECT_SNAKE 28# define RGBLIGHT_EFFECT_SNAKE
36 #define RGBLIGHT_EFFECT_KNIGHT 29# define RGBLIGHT_EFFECT_KNIGHT
37#endif // RGBLIGHT_ENABLE 30#endif // RGBLIGHT_ENABLE
38 31
39#ifndef ONESHOT_TAP_TOGGLE 32#ifndef ONESHOT_TAP_TOGGLE
40 #define ONESHOT_TAP_TOGGLE 2 33# define ONESHOT_TAP_TOGGLE 2
41#endif // !ONESHOT_TAP_TOGGLE 34#endif // !ONESHOT_TAP_TOGGLE
42 35
43#ifndef ONESHOT_TIMEOUT 36#ifndef ONESHOT_TIMEOUT
44 #define ONESHOT_TIMEOUT 3000 37# define ONESHOT_TIMEOUT 3000
45#endif// !ONESHOT_TIMEOUT 38#endif// !ONESHOT_TIMEOUT
46 39
47#ifndef QMK_KEYS_PER_SCAN 40#ifndef QMK_KEYS_PER_SCAN
48 #define QMK_KEYS_PER_SCAN 4 41# define QMK_KEYS_PER_SCAN 4
49#endif // !QMK_KEYS_PER_SCAN 42#endif // !QMK_KEYS_PER_SCAN
50 43
51 44
@@ -62,24 +55,27 @@
62#define FORCE_NKRO 55#define FORCE_NKRO
63 56
64#ifndef TAPPING_TOGGLE 57#ifndef TAPPING_TOGGLE
65 #define TAPPING_TOGGLE 1 58# define TAPPING_TOGGLE 1
66#endif 59#endif
67 60
68#ifdef TAPPING_TERM 61#ifdef TAPPING_TERM
69 #undef TAPPING_TERM 62# undef TAPPING_TERM
70#endif // TAPPING_TERM 63#endif // TAPPING_TERM
71#if defined(KEYBOARD_ergodox_ez) 64#if defined(KEYBOARD_ergodox_ez)
72 #define TAPPING_TERM 185 65# define TAPPING_TERM 185
73#elif defined(KEYBOARD_crkbd) 66#elif defined(KEYBOARD_crkbd)
74 #define TAPPING_TERM 200 67# define TAPPING_TERM 200
75#else 68#else
76 #define TAPPING_TERM 175 69# define TAPPING_TERM 175
77#endif 70#endif
78 71
79 72
80// Disable action_get_macro and fn_actions, since we don't use these
81// and it saves on space in the firmware.
82#define NO_ACTION_MACRO
83#define NO_ACTION_FUNCTION
84
85#define TAP_CODE_DELAY 5 73#define TAP_CODE_DELAY 5
74
75/* Disable unused and unneeded features to reduce on firmware size */
76#ifdef LOCKING_SUPPORT_ENABLE
77# undef LOCKING_SUPPORT_ENABLE
78#endif
79#ifdef LOCKING_RESYNC_ENABLE
80# undef LOCKING_RESYNC_ENABLE
81#endif
diff --git a/users/drashna/drashna.c b/users/drashna/drashna.c
index ec249dd22..7c60a2e4a 100644
--- a/users/drashna/drashna.c
+++ b/users/drashna/drashna.c
@@ -19,78 +19,78 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
19 19
20userspace_config_t userspace_config; 20userspace_config_t userspace_config;
21#if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE)) 21#if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE))
22 #define DRASHNA_UNICODE_MODE UC_WIN 22 #define DRASHNA_UNICODE_MODE UC_WIN
23#else 23#else
24 // set to 2 for UC_WIN, set to 4 for UC_WINC 24 // set to 2 for UC_WIN, set to 4 for UC_WINC
25 #define DRASHNA_UNICODE_MODE 2 25 #define DRASHNA_UNICODE_MODE 2
26#endif 26#endif
27 27
28 28
29// This block is for all of the gaming macros, as they were all doing 29// This block is for all of the gaming macros, as they were all doing
30// the same thing, but with differring text sent. 30// the same thing, but with differring text sent.
31bool send_game_macro(const char *str, keyrecord_t *record, bool override) { 31bool send_game_macro(const char *str, keyrecord_t *record, bool override) {
32 if (!record->event.pressed || override) { 32 if (!record->event.pressed || override) {
33 uint16_t keycode; 33 uint16_t keycode;
34 if (userspace_config.is_overwatch) { 34 if (userspace_config.is_overwatch) {
35 keycode = KC_BSPC; 35 keycode = KC_BSPC;
36 } else { 36 } else {
37 keycode = KC_ENTER; 37 keycode = KC_ENTER;
38 }
39 clear_keyboard();
40 tap_code(keycode);
41 wait_ms(TAP_CODE_DELAY);
42 send_string_with_delay(str, TAP_CODE_DELAY);
43 wait_ms(TAP_CODE_DELAY);
44 tap_code(KC_ENTER);
38 } 45 }
39 clear_keyboard(); 46 if (override) wait_ms(3000);
40 tap_code(keycode); 47 return false;
41 wait_ms(TAP_CODE_DELAY);
42 send_string_with_delay(str, TAP_CODE_DELAY);
43 wait_ms(TAP_CODE_DELAY);
44 tap_code(KC_ENTER);
45 }
46 if (override) wait_ms(3000);
47 return false;
48} 48}
49 49
50bool mod_key_press_timer (uint16_t code, uint16_t mod_code, bool pressed) { 50bool mod_key_press_timer (uint16_t code, uint16_t mod_code, bool pressed) {
51 static uint16_t this_timer; 51 static uint16_t this_timer;
52 if(pressed) { 52 if(pressed) {
53 this_timer= timer_read(); 53 this_timer= timer_read();
54 } else { 54 } else {
55 if (timer_elapsed(this_timer) < TAPPING_TERM){ 55 if (timer_elapsed(this_timer) < TAPPING_TERM){
56 tap_code(code); 56 tap_code(code);
57 } else { 57 } else {
58 register_code(mod_code); 58 register_code(mod_code);
59 tap_code(code); 59 tap_code(code);
60 unregister_code(mod_code); 60 unregister_code(mod_code);
61 } 61 }
62 } 62 }
63 return false; 63 return false;
64} 64}
65 65
66bool mod_key_press (uint16_t code, uint16_t mod_code, bool pressed, uint16_t this_timer) { 66bool mod_key_press (uint16_t code, uint16_t mod_code, bool pressed, uint16_t this_timer) {
67 if(pressed) { 67 if(pressed) {
68 this_timer= timer_read(); 68 this_timer= timer_read();
69 } else { 69 } else {
70 if (timer_elapsed(this_timer) < TAPPING_TERM){ 70 if (timer_elapsed(this_timer) < TAPPING_TERM){
71 tap_code(code); 71 tap_code(code);
72 } else { 72 } else {
73 register_code(mod_code); 73 register_code(mod_code);
74 tap_code(code); 74 tap_code(code);
75 unregister_code(mod_code); 75 unregister_code(mod_code);
76 } 76 }
77 } 77 }
78 return false; 78 return false;
79} 79}
80 80
81void bootmagic_lite(void) { 81void bootmagic_lite(void) {
82 matrix_scan(); 82 matrix_scan();
83 #if defined(DEBOUNCING_DELAY) && DEBOUNCING_DELAY > 0 83 #if defined(DEBOUNCING_DELAY) && DEBOUNCING_DELAY > 0
84 wait_ms(DEBOUNCING_DELAY * 2); 84 wait_ms(DEBOUNCING_DELAY * 2);
85 #elif defined(DEBOUNCE) && DEBOUNCE > 0 85 #elif defined(DEBOUNCE) && DEBOUNCE > 0
86 wait_ms(DEBOUNCE * 2); 86 wait_ms(DEBOUNCE * 2);
87 #else 87 #else
88 wait_ms(30); 88 wait_ms(30);
89 #endif 89 #endif
90 matrix_scan(); 90 matrix_scan();
91 if (matrix_get_row(BOOTMAGIC_LITE_ROW) & (1 << BOOTMAGIC_LITE_COLUMN)) { 91 if (matrix_get_row(BOOTMAGIC_LITE_ROW) & (1 << BOOTMAGIC_LITE_COLUMN)) {
92 bootloader_jump(); 92 bootloader_jump();
93 } 93 }
94} 94}
95 95
96// Add reconfigurable functions here, for keymap customization 96// Add reconfigurable functions here, for keymap customization
@@ -103,21 +103,21 @@ void matrix_init_keymap(void) {}
103// Call user matrix init, set default RGB colors and then 103// Call user matrix init, set default RGB colors and then
104// call the keymap's init function 104// call the keymap's init function
105void matrix_init_user(void) { 105void matrix_init_user(void) {
106 userspace_config.raw = eeconfig_read_user(); 106 userspace_config.raw = eeconfig_read_user();
107 107
108 #ifdef BOOTLOADER_CATERINA 108 #ifdef BOOTLOADER_CATERINA
109 DDRD &= ~(1<<5); 109 DDRD &= ~(1<<5);
110 PORTD &= ~(1<<5); 110 PORTD &= ~(1<<5);
111 111
112 DDRB &= ~(1<<0); 112 DDRB &= ~(1<<0);
113 PORTB &= ~(1<<0); 113 PORTB &= ~(1<<0);
114 #endif 114 #endif
115 115
116 #if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE)) 116 #if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE))
117 set_unicode_input_mode(DRASHNA_UNICODE_MODE); 117 set_unicode_input_mode(DRASHNA_UNICODE_MODE);
118 get_unicode_input_mode(); 118 get_unicode_input_mode();
119 #endif //UNICODE_ENABLE 119 #endif //UNICODE_ENABLE
120 matrix_init_keymap(); 120 matrix_init_keymap();
121} 121}
122 122
123__attribute__((weak)) 123__attribute__((weak))
@@ -125,26 +125,26 @@ void keyboard_post_init_keymap(void){ }
125 125
126void keyboard_post_init_user(void){ 126void keyboard_post_init_user(void){
127#ifdef RGBLIGHT_ENABLE 127#ifdef RGBLIGHT_ENABLE
128 keyboard_post_init_rgb(); 128 keyboard_post_init_rgb();
129#endif 129#endif
130 keyboard_post_init_keymap(); 130 keyboard_post_init_keymap();
131} 131}
132 132
133__attribute__ ((weak)) 133__attribute__ ((weak))
134void shutdown_keymap(void) {} 134void shutdown_keymap(void) {}
135 135
136void shutdown_user (void) { 136void shutdown_user (void) {
137 #ifdef RGBLIGHT_ENABLE 137 #ifdef RGBLIGHT_ENABLE
138 rgblight_enable_noeeprom(); 138 rgblight_enable_noeeprom();
139 rgblight_mode_noeeprom(1); 139 rgblight_mode_noeeprom(1);
140 rgblight_setrgb_red(); 140 rgblight_setrgb_red();
141 #endif // RGBLIGHT_ENABLE 141 #endif // RGBLIGHT_ENABLE
142 #ifdef RGB_MATRIX_ENABLE 142 #ifdef RGB_MATRIX_ENABLE
143 // uint16_t timer_start = timer_read(); 143 // uint16_t timer_start = timer_read();
144 // rgb_matrix_set_color_all( 0xFF, 0x00, 0x00 ); 144 // rgb_matrix_set_color_all( 0xFF, 0x00, 0x00 );
145 // while(timer_elapsed(timer_start) < 250) { wait_ms(1); } 145 // while(timer_elapsed(timer_start) < 250) { wait_ms(1); }
146 #endif //RGB_MATRIX_ENABLE 146 #endif //RGB_MATRIX_ENABLE
147 shutdown_keymap(); 147 shutdown_keymap();
148} 148}
149 149
150__attribute__ ((weak)) 150__attribute__ ((weak))
@@ -158,7 +158,7 @@ __attribute__ ((weak))
158void suspend_wakeup_init_keymap(void) {} 158void suspend_wakeup_init_keymap(void) {}
159 159
160void suspend_wakeup_init_user(void) { 160void suspend_wakeup_init_user(void) {
161 suspend_wakeup_init_keymap(); 161 suspend_wakeup_init_keymap();
162} 162}
163 163
164 164
@@ -168,54 +168,54 @@ void matrix_scan_keymap(void) {}
168// No global matrix scan code, so just run keymap's matrix 168// No global matrix scan code, so just run keymap's matrix
169// scan function 169// scan function
170void matrix_scan_user(void) { 170void matrix_scan_user(void) {
171 static bool has_ran_yet; 171 static bool has_ran_yet;
172 if (!has_ran_yet) { 172 if (!has_ran_yet) {
173 has_ran_yet = true; 173 has_ran_yet = true;
174 startup_user(); 174 startup_user();
175 } 175 }
176 176
177#ifdef TAP_DANCE_ENABLE // Run Diablo 3 macro checking code. 177#ifdef TAP_DANCE_ENABLE // Run Diablo 3 macro checking code.
178 run_diablo_macro_check(); 178 run_diablo_macro_check();
179#endif // TAP_DANCE_ENABLE 179#endif // TAP_DANCE_ENABLE
180 180
181#ifdef RGBLIGHT_ENABLE 181#ifdef RGBLIGHT_ENABLE
182 matrix_scan_rgb(); 182 matrix_scan_rgb();
183#endif // RGBLIGHT_ENABLE 183#endif // RGBLIGHT_ENABLE
184 184
185 matrix_scan_keymap(); 185 matrix_scan_keymap();
186} 186}
187 187
188 188
189__attribute__ ((weak)) 189__attribute__ ((weak))
190uint32_t layer_state_set_keymap (uint32_t state) { 190uint32_t layer_state_set_keymap (uint32_t state) {
191 return state; 191 return state;
192} 192}
193 193
194// on layer change, no matter where the change was initiated 194// on layer change, no matter where the change was initiated
195// Then runs keymap's layer change check 195// Then runs keymap's layer change check
196uint32_t layer_state_set_user(uint32_t state) { 196uint32_t layer_state_set_user(uint32_t state) {
197 state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); 197 state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST);
198#ifdef RGBLIGHT_ENABLE 198#ifdef RGBLIGHT_ENABLE
199 state = layer_state_set_rgb(state); 199 state = layer_state_set_rgb(state);
200#endif // RGBLIGHT_ENABLE 200#endif // RGBLIGHT_ENABLE
201 return layer_state_set_keymap (state); 201 return layer_state_set_keymap (state);
202} 202}
203 203
204 204
205__attribute__ ((weak)) 205__attribute__ ((weak))
206uint32_t default_layer_state_set_keymap (uint32_t state) { 206uint32_t default_layer_state_set_keymap (uint32_t state) {
207 return state; 207 return state;
208} 208}
209 209
210// Runs state check and changes underglow color and animation 210// Runs state check and changes underglow color and animation
211uint32_t default_layer_state_set_user(uint32_t state) { 211uint32_t default_layer_state_set_user(uint32_t state) {
212 state = default_layer_state_set_keymap(state); 212 state = default_layer_state_set_keymap(state);
213#if 0 213#if 0
214#ifdef RGBLIGHT_ENABLE 214#ifdef RGBLIGHT_ENABLE
215 state = default_layer_state_set_rgb(state); 215 state = default_layer_state_set_rgb(state);
216#endif // RGBLIGHT_ENABLE 216#endif // RGBLIGHT_ENABLE
217#endif 217#endif
218 return state; 218 return state;
219} 219}
220 220
221__attribute__ ((weak)) 221__attribute__ ((weak))
@@ -225,16 +225,16 @@ void led_set_keymap(uint8_t usb_led) {}
225// So far, I only have keyboard specific code, 225// So far, I only have keyboard specific code,
226// So nothing goes here. 226// So nothing goes here.
227void led_set_user(uint8_t usb_led) { 227void led_set_user(uint8_t usb_led) {
228 led_set_keymap(usb_led); 228 led_set_keymap(usb_led);
229} 229}
230 230
231__attribute__ ((weak)) 231__attribute__ ((weak))
232void eeconfig_init_keymap(void) {} 232void eeconfig_init_keymap(void) {}
233 233
234void eeconfig_init_user(void) { 234void eeconfig_init_user(void) {
235 userspace_config.raw = 0; 235 userspace_config.raw = 0;
236 userspace_config.rgb_layer_change = true; 236 userspace_config.rgb_layer_change = true;
237 eeconfig_update_user(userspace_config.raw); 237 eeconfig_update_user(userspace_config.raw);
238 #if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE)) 238 #if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE))
239 set_unicode_input_mode(DRASHNA_UNICODE_MODE); 239 set_unicode_input_mode(DRASHNA_UNICODE_MODE);
240 get_unicode_input_mode(); 240 get_unicode_input_mode();
diff --git a/users/drashna/drashna.h b/users/drashna/drashna.h
index 6645626d9..5df67792a 100644
--- a/users/drashna/drashna.h
+++ b/users/drashna/drashna.h
@@ -22,36 +22,36 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
22#include "wrappers.h" 22#include "wrappers.h"
23#include "process_records.h" 23#include "process_records.h"
24#ifdef TAP_DANCE_ENABLE 24#ifdef TAP_DANCE_ENABLE
25 #include "tap_dances.h" 25# include "tap_dances.h"
26#endif // TAP_DANCE_ENABLE 26#endif // TAP_DANCE_ENABLE
27#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) 27#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
28 #include "rgb_stuff.h" 28# include "rgb_stuff.h"
29#endif 29#endif
30#if defined(AUDIO_ENABLE) && __GNUC__ > 7 30#if defined(AUDIO_ENABLE) && __GNUC__ > 7
31 #if __has_include("drashna_song_list.h") 31# if __has_include("drashna_song_list.h")
32 #include "drashna_song_list.h" 32# include "drashna_song_list.h"
33 #endif 33# endif
34#endif 34#endif
35 35
36/* Define layer names */ 36/* Define layer names */
37enum userspace_layers { 37enum userspace_layers {
38 _QWERTY = 0, 38 _QWERTY = 0,
39 _NUMLOCK = 0, 39 _NUMLOCK = 0,
40 _COLEMAK, 40 _COLEMAK,
41 _DVORAK, 41 _DVORAK,
42 _WORKMAN, 42 _WORKMAN,
43 _NORMAN, 43 _NORMAN,
44 _MALTRON, 44 _MALTRON,
45 _EUCALYN, 45 _EUCALYN,
46 _CARPLAX, 46 _CARPLAX,
47 _MODS, /* layer 8 */ 47 _MODS, /* layer 8 */
48 _GAMEPAD, 48 _GAMEPAD,
49 _DIABLO, 49 _DIABLO,
50 _MACROS, 50 _MACROS,
51 _MEDIA, 51 _MEDIA,
52 _LOWER, 52 _LOWER,
53 _RAISE, 53 _RAISE,
54 _ADJUST, 54 _ADJUST,
55}; 55};
56 56
57/* 57/*
@@ -73,14 +73,14 @@ void led_set_keymap(uint8_t usb_led);
73void eeconfig_init_keymap(void); 73void eeconfig_init_keymap(void);
74 74
75typedef union { 75typedef union {
76 uint32_t raw; 76 uint32_t raw;
77 struct { 77 struct {
78 bool rgb_layer_change :1; 78 bool rgb_layer_change :1;
79 bool is_overwatch :1; 79 bool is_overwatch :1;
80 bool nuke_switch :1; 80 bool nuke_switch :1;
81 uint8_t unicode_mod :4; 81 uint8_t unicode_mod :4;
82 bool swapped_numbers :1; 82 bool swapped_numbers :1;
83 }; 83 };
84} userspace_config_t; 84} userspace_config_t;
85 85
86extern userspace_config_t userspace_config; 86extern userspace_config_t userspace_config;
@@ -92,13 +92,13 @@ But since TD() doesn't work when tap dance is disabled
92We use custom codes here, so we can substitute the right stuff 92We use custom codes here, so we can substitute the right stuff
93*/ 93*/
94#ifdef TAP_DANCE_ENABLE 94#ifdef TAP_DANCE_ENABLE
95#define KC_D3_1 TD(TD_D3_1) 95# define KC_D3_1 TD(TD_D3_1)
96#define KC_D3_2 TD(TD_D3_2) 96# define KC_D3_2 TD(TD_D3_2)
97#define KC_D3_3 TD(TD_D3_3) 97# define KC_D3_3 TD(TD_D3_3)
98#define KC_D3_4 TD(TD_D3_4) 98# define KC_D3_4 TD(TD_D3_4)
99#else // TAP_DANCE_ENABLE 99#else // TAP_DANCE_ENABLE
100#define KC_D3_1 KC_1 100# define KC_D3_1 KC_1
101#define KC_D3_2 KC_2 101# define KC_D3_2 KC_2
102#define KC_D3_3 KC_3 102# define KC_D3_3 KC_3
103#define KC_D3_4 KC_4 103# define KC_D3_4 KC_4
104#endif // TAP_DANCE_ENABLE 104#endif // TAP_DANCE_ENABLE
diff --git a/users/drashna/process_records.c b/users/drashna/process_records.c
index 2b6ccf510..a5487b585 100644
--- a/users/drashna/process_records.c
+++ b/users/drashna/process_records.c
@@ -4,12 +4,12 @@ uint16_t copy_paste_timer;
4 4
5__attribute__ ((weak)) 5__attribute__ ((weak))
6bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { 6bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
7 return true; 7 return true;
8} 8}
9 9
10__attribute__ ((weak)) 10__attribute__ ((weak))
11bool process_record_secrets(uint16_t keycode, keyrecord_t *record) { 11bool process_record_secrets(uint16_t keycode, keyrecord_t *record) {
12 return true; 12 return true;
13} 13}
14 14
15// Defines actions tor my global custom keycodes. Defined in drashna.h file 15// Defines actions tor my global custom keycodes. Defined in drashna.h file
@@ -18,140 +18,140 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
18 18
19 // If console is enabled, it will print the matrix position and status of each key pressed 19 // If console is enabled, it will print the matrix position and status of each key pressed
20#ifdef KEYLOGGER_ENABLE 20#ifdef KEYLOGGER_ENABLE
21 #if defined(KEYBOARD_ergodox_ez) || defined(KEYBOARD_keebio_iris_rev2) 21# if defined(KEYBOARD_ergodox_ez) || defined(KEYBOARD_keebio_iris_rev2)
22 xprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.row, record->event.key.col, record->event.pressed); 22 xprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.row, record->event.key.col, record->event.pressed);
23 #else 23# else
24 xprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed); 24 xprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed);
25 #endif 25# endif
26#endif //KEYLOGGER_ENABLE 26#endif //KEYLOGGER_ENABLE
27 27
28 switch (keycode) { 28 switch (keycode) {
29 case KC_QWERTY ... KC_CARPLAX: 29 case KC_QWERTY ... KC_CARPLAX:
30 if (record->event.pressed) { 30 if (record->event.pressed) {
31 set_single_persistent_default_layer(keycode - KC_QWERTY); 31 set_single_persistent_default_layer(keycode - KC_QWERTY);
32 } 32 }
33 break; 33 break;
34 34
35 case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader 35 case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader
36 if (!record->event.pressed) { 36 if (!record->event.pressed) {
37 uint8_t temp_mod = get_mods(); 37 uint8_t temp_mod = get_mods();
38 uint8_t temp_osm = get_oneshot_mods(); 38 uint8_t temp_osm = get_oneshot_mods();
39 clear_mods(); clear_oneshot_mods(); 39 clear_mods(); clear_oneshot_mods();
40 send_string_with_delay_P(PSTR("make " QMK_KEYBOARD ":" QMK_KEYMAP), TAP_CODE_DELAY); 40 send_string_with_delay_P(PSTR("make " QMK_KEYBOARD ":" QMK_KEYMAP), TAP_CODE_DELAY);
41#ifndef MAKE_BOOTLOADER 41#ifndef MAKE_BOOTLOADER
42 if ( ( temp_mod | temp_osm ) & MOD_MASK_SHIFT ) 42 if ( ( temp_mod | temp_osm ) & MOD_MASK_SHIFT )
43#endif 43#endif
44 { 44 {
45 #if defined(__arm__) 45 #if defined(__arm__)
46 send_string_with_delay_P(PSTR(":dfu-util"), TAP_CODE_DELAY); 46 send_string_with_delay_P(PSTR(":dfu-util"), TAP_CODE_DELAY);
47 #elif defined(BOOTLOADER_DFU) 47 #elif defined(BOOTLOADER_DFU)
48 send_string_with_delay_P(PSTR(":dfu"), TAP_CODE_DELAY); 48 send_string_with_delay_P(PSTR(":dfu"), TAP_CODE_DELAY);
49 #elif defined(BOOTLOADER_HALFKAY) 49 #elif defined(BOOTLOADER_HALFKAY)
50 send_string_with_delay_P(PSTR(":teensy"), TAP_CODE_DELAY); 50 send_string_with_delay_P(PSTR(":teensy"), TAP_CODE_DELAY);
51 #elif defined(BOOTLOADER_CATERINA) 51 #elif defined(BOOTLOADER_CATERINA)
52 send_string_with_delay_P(PSTR(":avrdude"), TAP_CODE_DELAY); 52 send_string_with_delay_P(PSTR(":avrdude"), TAP_CODE_DELAY);
53 #endif // bootloader options 53 #endif // bootloader options
54 } 54 }
55 if ( ( temp_mod | temp_osm ) & MOD_MASK_CTRL) { send_string_with_delay_P(PSTR(" -j8 --output-sync"), TAP_CODE_DELAY); } 55 if ( ( temp_mod | temp_osm ) & MOD_MASK_CTRL) { send_string_with_delay_P(PSTR(" -j8 --output-sync"), TAP_CODE_DELAY); }
56 send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), TAP_CODE_DELAY); 56 send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), TAP_CODE_DELAY);
57 } 57 }
58 break; 58 break;
59 59
60 case VRSN: // Prints firmware version 60 case VRSN: // Prints firmware version
61 if (record->event.pressed) { 61 if (record->event.pressed) {
62 send_string_with_delay_P(PSTR(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION ", Built on: " QMK_BUILDDATE), TAP_CODE_DELAY); 62 send_string_with_delay_P(PSTR(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION ", Built on: " QMK_BUILDDATE), TAP_CODE_DELAY);
63 } 63 }
64 break; 64 break;
65 65
66// These are a serious of gaming macros. 66 // These are a serious of gaming macros.
67// Only enables for the viterbi, basically, 67 // Only enables for the viterbi, basically,
68// to save on firmware space, since it's limited. 68 // to save on firmware space, since it's limited.
69#ifdef MACROS_ENABLED 69#ifdef MACROS_ENABLED
70 case KC_OVERWATCH: // Toggle's if we hit "ENTER" or "BACKSPACE" to input macros 70 case KC_OVERWATCH: // Toggle's if we hit "ENTER" or "BACKSPACE" to input macros
71 if (record->event.pressed) { userspace_config.is_overwatch ^= 1; eeconfig_update_user(userspace_config.raw); } 71 if (record->event.pressed) { userspace_config.is_overwatch ^= 1; eeconfig_update_user(userspace_config.raw); }
72#ifdef RGBLIGHT_ENABLE 72#ifdef RGBLIGHT_ENABLE
73 userspace_config.is_overwatch ? rgblight_mode_noeeprom(17) : rgblight_mode_noeeprom(18); 73 userspace_config.is_overwatch ? rgblight_mode_noeeprom(17) : rgblight_mode_noeeprom(18);
74#endif //RGBLIGHT_ENABLE 74#endif //RGBLIGHT_ENABLE
75 break; 75 break;
76 case KC_SALT: 76 case KC_SALT:
77 return send_game_macro("Salt, salt, salt...", record, false); 77 return send_game_macro("Salt, salt, salt...", record, false);
78 case KC_MORESALT: 78 case KC_MORESALT:
79 return send_game_macro("Please sir, can I have some more salt?!", record, false); 79 return send_game_macro("Please sir, can I have some more salt?!", record, false);
80 case KC_SALTHARD: 80 case KC_SALTHARD:
81 return send_game_macro("Your salt only makes me harder, and even more aggressive!", record, false); 81 return send_game_macro("Your salt only makes me harder, and even more aggressive!", record, false);
82 case KC_GOODGAME: 82 case KC_GOODGAME:
83 return send_game_macro("Good game, everyone!", record, false); 83 return send_game_macro("Good game, everyone!", record, false);
84 case KC_GLHF: 84 case KC_GLHF:
85 return send_game_macro("Good luck, have fun!!!", record, false); 85 return send_game_macro("Good luck, have fun!!!", record, false);
86 case KC_SYMM: 86 case KC_SYMM:
87 return send_game_macro("Left click to win!", record, false); 87 return send_game_macro("Left click to win!", record, false);
88 case KC_JUSTGAME: 88 case KC_JUSTGAME:
89 return send_game_macro("It may be a game, but if you don't want to actually try, please go play AI, so that people that actually want to take the game seriously and \"get good\" have a place to do so without trolls like you throwing games.", record, false); 89 return send_game_macro("It may be a game, but if you don't want to actually try, please go play AI, so that people that actually want to take the game seriously and \"get good\" have a place to do so without trolls like you throwing games.", record, false);
90 case KC_TORB: 90 case KC_TORB:
91 return send_game_macro("That was positively riveting!", record, false); 91 return send_game_macro("That was positively riveting!", record, false);
92 case KC_AIM: 92 case KC_AIM:
93 send_game_macro("That aim is absolutely amazing. It's almost like you're a machine!", record, true); 93 send_game_macro("That aim is absolutely amazing. It's almost like you're a machine!", record, true);
94 return send_game_macro("Wait! That aim is TOO good! You're clearly using an aim hack! CHEATER!", record, false); 94 return send_game_macro("Wait! That aim is TOO good! You're clearly using an aim hack! CHEATER!", record, false);
95 case KC_C9: 95 case KC_C9:
96 return send_game_macro("OMG!!! C9!!!", record, false); 96 return send_game_macro("OMG!!! C9!!!", record, false);
97 case KC_GGEZ: 97 case KC_GGEZ:
98 return send_game_macro("That was a fantastic game, though it was a bit easy. Try harder next time!", record, false); 98 return send_game_macro("That was a fantastic game, though it was a bit easy. Try harder next time!", record, false);
99#endif // MACROS_ENABLED 99#endif // MACROS_ENABLED
100 100
101 101
102 case KC_DIABLO_CLEAR: // reset all Diablo timers, disabling them 102 case KC_DIABLO_CLEAR: // reset all Diablo timers, disabling them
103#ifdef TAP_DANCE_ENABLE 103#ifdef TAP_DANCE_ENABLE
104 if (record->event.pressed) { 104 if (record->event.pressed) {
105 uint8_t dtime; 105 uint8_t dtime;
106 for (dtime = 0; dtime < 4; dtime++) { 106 for (dtime = 0; dtime < 4; dtime++) {
107 diablo_key_time[dtime] = diablo_times[0]; 107 diablo_timer[dtime].key_time = diablo_times[0];
108 } 108 }
109 } 109 }
110#endif // TAP_DANCE_ENABLE 110#endif // TAP_DANCE_ENABLE
111 break; 111 break;
112 112
113 113
114 case KC_CCCV: // One key copy/paste 114 case KC_CCCV: // One key copy/paste
115 if(record->event.pressed){ 115 if(record->event.pressed){
116 copy_paste_timer = timer_read(); 116 copy_paste_timer = timer_read();
117 } else { 117 } else {
118 if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { // Hold, copy 118 if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { // Hold, copy
119 register_code(KC_LCTL); 119 register_code(KC_LCTL);
120 tap_code(KC_C); 120 tap_code(KC_C);
121 unregister_code(KC_LCTL); 121 unregister_code(KC_LCTL);
122 } else { // Tap, paste 122 } else { // Tap, paste
123 register_code(KC_LCTL); 123 register_code(KC_LCTL);
124 tap_code(KC_V); 124 tap_code(KC_V);
125 unregister_code(KC_LCTL); 125 unregister_code(KC_LCTL);
126 } 126 }
127 } 127 }
128 break; 128 break;
129#ifdef UNICODE_ENABLE 129#ifdef UNICODE_ENABLE
130 case UC_FLIP: // (ノಠ痊ಠ)ノ彡┻━┻ 130 case UC_FLIP: // (ノಠ痊ಠ)ノ彡┻━┻
131 if (record->event.pressed) { 131 if (record->event.pressed) {
132 send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B"); 132 send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B");
133 } 133 }
134 break; 134 break;
135 case UC_TABL: // ┬─┬ノ( º _ ºノ) 135 case UC_TABL: // ┬─┬ノ( º _ ºノ)
136 if (record->event.pressed) { 136 if (record->event.pressed) {
137 send_unicode_hex_string("252C 2500 252C 30CE 0028 0020 00BA 0020 005F 0020 00BA 30CE 0029"); 137 send_unicode_hex_string("252C 2500 252C 30CE 0028 0020 00BA 0020 005F 0020 00BA 30CE 0029");
138 } 138 }
139 break; 139 break;
140 case UC_SHRG: // ¯\_(ツ)_/¯ 140 case UC_SHRG: // ¯\_(ツ)_/¯
141 if (record->event.pressed) { 141 if (record->event.pressed) {
142 send_unicode_hex_string("00AF 005C 005F 0028 30C4 0029 005F 002F 00AF"); 142 send_unicode_hex_string("00AF 005C 005F 0028 30C4 0029 005F 002F 00AF");
143 } 143 }
144 break; 144 break;
145 case UC_DISA: // ಠ_ಠ 145 case UC_DISA: // ಠ_ಠ
146 if (record->event.pressed) { 146 if (record->event.pressed) {
147 send_unicode_hex_string("0CA0 005F 0CA0"); 147 send_unicode_hex_string("0CA0 005F 0CA0");
148 } 148 }
149 break; 149 break;
150#endif 150#endif
151 } 151 }
152 return process_record_keymap(keycode, record) && 152 return process_record_keymap(keycode, record) &&
153#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) 153#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
154 process_record_user_rgb(keycode, record) && 154 process_record_user_rgb(keycode, record) &&
155#endif // RGBLIGHT_ENABLE 155#endif // RGBLIGHT_ENABLE
156 process_record_secrets(keycode, record); 156 process_record_secrets(keycode, record);
157} 157}
diff --git a/users/drashna/process_records.h b/users/drashna/process_records.h
index 5e3374d3f..35adec84c 100644
--- a/users/drashna/process_records.h
+++ b/users/drashna/process_records.h
@@ -2,48 +2,48 @@
2#include "drashna.h" 2#include "drashna.h"
3 3
4#if defined(KEYMAP_SAFE_RANGE) 4#if defined(KEYMAP_SAFE_RANGE)
5 #define PLACEHOLDER_SAFE_RANGE KEYMAP_SAFE_RANGE 5# define PLACEHOLDER_SAFE_RANGE KEYMAP_SAFE_RANGE
6#else 6#else
7 #define PLACEHOLDER_SAFE_RANGE SAFE_RANGE 7# define PLACEHOLDER_SAFE_RANGE SAFE_RANGE
8#endif 8#endif
9 9
10enum userspace_custom_keycodes { 10enum userspace_custom_keycodes {
11 VRSN = PLACEHOLDER_SAFE_RANGE, // Prints QMK Firmware and board info 11 VRSN = PLACEHOLDER_SAFE_RANGE, // Prints QMK Firmware and board info
12 KC_QWERTY, // Sets default layer to QWERTY 12 KC_QWERTY, // Sets default layer to QWERTY
13 KC_COLEMAK, // Sets default layer to COLEMAK 13 KC_COLEMAK, // Sets default layer to COLEMAK
14 KC_DVORAK, // Sets default layer to DVORAK 14 KC_DVORAK, // Sets default layer to DVORAK
15 KC_WORKMAN, // Sets default layer to WORKMAN 15 KC_WORKMAN, // Sets default layer to WORKMAN
16 KC_NORMAN, // Sets default layer to NORMAN 16 KC_NORMAN, // Sets default layer to NORMAN
17 KC_MALTRON, // Sets default layer to MALTRON 17 KC_MALTRON, // Sets default layer to MALTRON
18 KC_EUCALYN, // Sets default layer to EUCALYN 18 KC_EUCALYN, // Sets default layer to EUCALYN
19 KC_CARPLAX, // Sets default layer to CARPLAX 19 KC_CARPLAX, // Sets default layer to CARPLAX
20 KC_DIABLO_CLEAR, // Clears all Diablo Timers 20 KC_DIABLO_CLEAR, // Clears all Diablo Timers
21 KC_OVERWATCH, // Toggles game macro input mode (so in OW, it defaults to game chat) 21 KC_OVERWATCH, // Toggles game macro input mode (so in OW, it defaults to game chat)
22 KC_SALT, // See drashna.c for details 22 KC_SALT, // See drashna.c for details
23 KC_MORESALT, 23 KC_MORESALT,
24 KC_SALTHARD, 24 KC_SALTHARD,
25 KC_GOODGAME, 25 KC_GOODGAME,
26 KC_SYMM, 26 KC_SYMM,
27 KC_JUSTGAME, 27 KC_JUSTGAME,
28 KC_GLHF, 28 KC_GLHF,
29 KC_TORB, 29 KC_TORB,
30 KC_AIM, 30 KC_AIM,
31 KC_C9, 31 KC_C9,
32 KC_GGEZ, 32 KC_GGEZ,
33 KC_MAKE, // Run keyboard's customized make command 33 KC_MAKE, // Run keyboard's customized make command
34 KC_RGB_T, // Toggles RGB Layer Indication mode 34 KC_RGB_T, // Toggles RGB Layer Indication mode
35 KC_SECRET_1, // test1 35 KC_SECRET_1, // test1
36 KC_SECRET_2, // test2 36 KC_SECRET_2, // test2
37 KC_SECRET_3, // test3 37 KC_SECRET_3, // test3
38 KC_SECRET_4, // test4 38 KC_SECRET_4, // test4
39 KC_SECRET_5, // test5 39 KC_SECRET_5, // test5
40 KC_CCCV, // Hold to copy, tap to paste 40 KC_CCCV, // Hold to copy, tap to paste
41 KC_NUKE, // NUCLEAR LAUNCH DETECTED!!! 41 KC_NUKE, // NUCLEAR LAUNCH DETECTED!!!
42 UC_FLIP, // (ಠ痊ಠ)┻━┻ 42 UC_FLIP, // (ಠ痊ಠ)┻━┻
43 UC_TABL, // ┬─┬ノ( º _ ºノ) 43 UC_TABL, // ┬─┬ノ( º _ ºノ)
44 UC_SHRG, // ¯\_(ツ)_/¯ 44 UC_SHRG, // ¯\_(ツ)_/¯
45 UC_DISA, // ಠ_ಠ 45 UC_DISA, // ಠ_ಠ
46 NEW_SAFE_RANGE //use "NEWPLACEHOLDER for keymap specific codes 46 NEW_SAFE_RANGE //use "NEWPLACEHOLDER for keymap specific codes
47}; 47};
48 48
49bool process_record_secrets(uint16_t keycode, keyrecord_t *record); 49bool process_record_secrets(uint16_t keycode, keyrecord_t *record);
diff --git a/users/drashna/rgb_stuff.c b/users/drashna/rgb_stuff.c
index b5e145842..38e86ae0e 100644
--- a/users/drashna/rgb_stuff.c
+++ b/users/drashna/rgb_stuff.c
@@ -11,80 +11,80 @@ extern rgb_config_t rgb_matrix_config;
11 11
12#ifdef RGBLIGHT_ENABLE 12#ifdef RGBLIGHT_ENABLE
13void rgblight_sethsv_default_helper(uint8_t index) { 13void rgblight_sethsv_default_helper(uint8_t index) {
14 rgblight_sethsv_at(rgblight_config.hue, rgblight_config.sat, rgblight_config.val, index); 14 rgblight_sethsv_at(rgblight_config.hue, rgblight_config.sat, rgblight_config.val, index);
15} 15}
16#endif // RGBLIGHT_ENABLE 16#endif // RGBLIGHT_ENABLE
17 17
18#ifdef INDICATOR_LIGHTS 18#ifdef INDICATOR_LIGHTS
19void set_rgb_indicators(uint8_t this_mod, uint8_t this_led, uint8_t this_osm) { 19void set_rgb_indicators(uint8_t this_mod, uint8_t this_led, uint8_t this_osm) {
20 if (userspace_config.rgb_layer_change && biton32(layer_state) == 0) { 20 if (userspace_config.rgb_layer_change && biton32(layer_state) == 0) {
21 if ( (this_mod | this_osm) & MOD_MASK_SHIFT || this_led & (1<<USB_LED_CAPS_LOCK) ) { 21 if ( (this_mod | this_osm) & MOD_MASK_SHIFT || this_led & (1<<USB_LED_CAPS_LOCK) ) {
22 #ifdef SHFT_LED1 22 #ifdef SHFT_LED1
23 rgblight_sethsv_at(120, 255, 255, SHFT_LED1); 23 rgblight_sethsv_at(120, 255, 255, SHFT_LED1);
24 #endif // SHFT_LED1 24 #endif // SHFT_LED1
25 #ifdef SHFT_LED2 25 #ifdef SHFT_LED2
26 rgblight_sethsv_at(120, 255, 255, SHFT_LED2); 26 rgblight_sethsv_at(120, 255, 255, SHFT_LED2);
27 #endif // SHFT_LED2 27 #endif // SHFT_LED2
28 } else { 28 } else {
29 #ifdef SHFT_LED1 29 #ifdef SHFT_LED1
30 rgblight_sethsv_default_helper(SHFT_LED1); 30 rgblight_sethsv_default_helper(SHFT_LED1);
31 #endif // SHFT_LED1 31 #endif // SHFT_LED1
32 #ifdef SHFT_LED2 32 #ifdef SHFT_LED2
33 rgblight_sethsv_default_helper(SHFT_LED2); 33 rgblight_sethsv_default_helper(SHFT_LED2);
34 #endif // SHFT_LED2 34 #endif // SHFT_LED2
35 } 35 }
36 if ( (this_mod | this_osm) & MOD_MASK_CTRL) { 36 if ( (this_mod | this_osm) & MOD_MASK_CTRL) {
37 #ifdef CTRL_LED1 37 #ifdef CTRL_LED1
38 rgblight_sethsv_at(0, 255, 255, CTRL_LED1); 38 rgblight_sethsv_at(0, 255, 255, CTRL_LED1);
39 #endif // CTRL_LED1 39 #endif // CTRL_LED1
40 #ifdef CTRL_LED2 40 #ifdef CTRL_LED2
41 rgblight_sethsv_at(0, 255, 255, CTRL_LED2); 41 rgblight_sethsv_at(0, 255, 255, CTRL_LED2);
42 #endif // CTRL_LED2 42 #endif // CTRL_LED2
43 } else { 43 } else {
44 #ifdef CTRL_LED1 44 #ifdef CTRL_LED1
45 rgblight_sethsv_default_helper(CTRL_LED1); 45 rgblight_sethsv_default_helper(CTRL_LED1);
46 #endif // CTRL_LED1 46 #endif // CTRL_LED1
47 #ifdef CTRL_LED2 47 #ifdef CTRL_LED2
48 rgblight_sethsv_default_helper(CTRL_LED2); 48 rgblight_sethsv_default_helper(CTRL_LED2);
49 #endif // CTRL_LED2 49 #endif // CTRL_LED2
50 } 50 }
51 if ( (this_mod | this_osm) & MOD_MASK_GUI) { 51 if ( (this_mod | this_osm) & MOD_MASK_GUI) {
52 #ifdef GUI_LED1 52 #ifdef GUI_LED1
53 rgblight_sethsv_at(51, 255, 255, GUI_LED1); 53 rgblight_sethsv_at(51, 255, 255, GUI_LED1);
54 #endif // GUI_LED1 54 #endif // GUI_LED1
55 #ifdef GUI_LED2 55 #ifdef GUI_LED2
56 rgblight_sethsv_at(51, 255, 255, GUI_LED2); 56 rgblight_sethsv_at(51, 255, 255, GUI_LED2);
57 #endif // GUI_LED2 57 #endif // GUI_LED2
58 } else { 58 } else {
59 #ifdef GUI_LED1 59 #ifdef GUI_LED1
60 rgblight_sethsv_default_helper(GUI_LED1); 60 rgblight_sethsv_default_helper(GUI_LED1);
61 #endif // GUI_LED1 61 #endif // GUI_LED1
62 #ifdef GUI_LED2 62 #ifdef GUI_LED2
63 rgblight_sethsv_default_helper(GUI_LED2); 63 rgblight_sethsv_default_helper(GUI_LED2);
64 #endif // GUI_LED2 64 #endif // GUI_LED2
65 } 65 }
66 if ( (this_mod | this_osm) & MOD_MASK_ALT) { 66 if ( (this_mod | this_osm) & MOD_MASK_ALT) {
67 #ifdef ALT_LED1 67 #ifdef ALT_LED1
68 rgblight_sethsv_at(240, 255, 255, ALT_LED1); 68 rgblight_sethsv_at(240, 255, 255, ALT_LED1);
69 #endif // ALT_LED1 69 #endif // ALT_LED1
70 #ifdef GUI_LED2 70 #ifdef GUI_LED2
71 rgblight_sethsv_at(240, 255, 255, ALT_LED2); 71 rgblight_sethsv_at(240, 255, 255, ALT_LED2);
72 #endif // GUI_LED2 72 #endif // GUI_LED2
73 } else { 73 } else {
74 #ifdef GUI_LED1 74 #ifdef GUI_LED1
75 rgblight_sethsv_default_helper(ALT_LED1); 75 rgblight_sethsv_default_helper(ALT_LED1);
76 #endif // GUI_LED1 76 #endif // GUI_LED1
77 #ifdef GUI_LED2 77 #ifdef GUI_LED2
78 rgblight_sethsv_default_helper(ALT_LED2); 78 rgblight_sethsv_default_helper(ALT_LED2);
79 #endif // GUI_LED2 79 #endif // GUI_LED2
80 }
80 } 81 }
81 }
82} 82}
83 83
84void matrix_scan_indicator(void) { 84void matrix_scan_indicator(void) {
85 if (has_initialized) { 85 if (has_initialized) {
86 set_rgb_indicators(get_mods(), host_keyboard_leds(), get_oneshot_mods()); 86 set_rgb_indicators(get_mods(), host_keyboard_leds(), get_oneshot_mods());
87 } 87 }
88} 88}
89#endif //INDICATOR_LIGHTS 89#endif //INDICATOR_LIGHTS
90 90
@@ -95,69 +95,71 @@ __attribute__ ((weak))
95bool rgblight_twinkle_is_led_used_keymap(uint8_t index) { return false; } 95bool rgblight_twinkle_is_led_used_keymap(uint8_t index) { return false; }
96 96
97bool rgblight_twinkle_is_led_used(uint8_t index) { 97bool rgblight_twinkle_is_led_used(uint8_t index) {
98 switch (index) { 98 switch (index) {
99#ifdef INDICATOR_LIGHTS 99#ifdef INDICATOR_LIGHTS
100#ifdef SHFT_LED1 100#ifdef SHFT_LED1
101 case SHFT_LED1: 101 case SHFT_LED1:
102 return true; 102 return true;
103#endif //SHFT_LED1 103#endif //SHFT_LED1
104#ifdef SHFT_LED2 104#ifdef SHFT_LED2
105 case SHFT_LED2: 105 case SHFT_LED2:
106 return true; 106 return true;
107#endif //SHFT_LED2 107#endif //SHFT_LED2
108#ifdef CTRL_LED1 108#ifdef CTRL_LED1
109 case CTRL_LED1: 109 case CTRL_LED1:
110 return true; 110 return true;
111#endif //CTRL_LED1 111#endif //CTRL_LED1
112#ifdef CTRL_LED2 112#ifdef CTRL_LED2
113 case CTRL_LED2: 113 case CTRL_LED2:
114 return true; 114 return true;
115#endif //CTRL_LED2 115#endif //CTRL_LED2
116#ifdef GUI_LED1 116#ifdef GUI_LED1
117 case GUI_LED1: 117 case GUI_LED1:
118 return true; 118 return true;
119#endif //GUI_LED1 119#endif //GUI_LED1
120#ifdef GUI_LED2 120#ifdef GUI_LED2
121 case GUI_LED2: 121 case GUI_LED2:
122 return true; 122 return true;
123#endif //GUI_LED2 123#endif //GUI_LED2
124#ifdef ALT_LED1 124#ifdef ALT_LED1
125 case ALT_LED1: 125 case ALT_LED1:
126 return true; 126 return true;
127#endif //ALT_LED1 127#endif //ALT_LED1
128#ifdef ALT_LED2 128#ifdef ALT_LED2
129 case ALT_LED2: 129 case ALT_LED2:
130 return true; 130 return true;
131#endif //ALT_LED2 131#endif //ALT_LED2
132#endif //INDICATOR_LIGHTS 132#endif //INDICATOR_LIGHTS
133 default: 133 default:
134 return rgblight_twinkle_is_led_used_keymap(index); 134 return rgblight_twinkle_is_led_used_keymap(index);
135 } 135 }
136} 136}
137 137
138void scan_rgblight_fadeout(void) { // Don't effing change this function .... rgblight_sethsv is supppppper intensive 138void scan_rgblight_fadeout(void) { // Don't effing change this function .... rgblight_sethsv is supppppper intensive
139 bool litup = false; 139 bool litup = false;
140 for (uint8_t light_index = 0 ; light_index < RGBLED_NUM ; ++light_index ) { 140 for (uint8_t light_index = 0 ; light_index < RGBLED_NUM ; ++light_index ) {
141 if (lights[light_index].enabled && timer_elapsed(lights[light_index].timer) > 10) { 141 if (lights[light_index].enabled && timer_elapsed(lights[light_index].timer) > 10) {
142 rgblight_fadeout *light = &lights[light_index]; 142 rgblight_fadeout *light = &lights[light_index];
143 litup = true; 143 litup = true;
144 144
145 if (light->life) { 145 if (light->life) {
146 light->life -= 1; 146 light->life -= 1;
147 if (biton32(layer_state) == 0) { 147 if (biton32(layer_state) == 0) {
148 sethsv(light->hue + rand() % 0xF, 255, light->life, (LED_TYPE *)&led[light_index]); 148 sethsv(light->hue + rand() % 0xF, 255, light->life, (LED_TYPE *)&led[light_index]);
149 }
150 light->timer = timer_read();
151 }
152 else {
153 if (light->enabled && biton32(layer_state) == 0) {
154 rgblight_sethsv_default_helper(light_index);
155 }
156 litup = light->enabled = false;
157 }
149 } 158 }
150 light->timer = timer_read();
151 }
152 else {
153 if (light->enabled && biton32(layer_state) == 0) { rgblight_sethsv_default_helper(light_index); }
154 litup = light->enabled = false;
155 }
156 } 159 }
157 } 160 if (litup && biton32(layer_state) == 0) {
158 if (litup && biton32(layer_state) == 0) { 161 rgblight_set();
159 rgblight_set(); 162 }
160 }
161} 163}
162 164
163void start_rgb_light(void) { 165void start_rgb_light(void) {
@@ -203,42 +205,42 @@ void start_rgb_light(void) {
203 205
204 206
205bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { 207bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) {
206 if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) { 208 if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) {
207 keycode = keycode & 0xFF; 209 keycode = keycode & 0xFF;
208 } 210 }
209 switch (keycode) { 211 switch (keycode) {
210#ifdef RGBLIGHT_TWINKLE 212#ifdef RGBLIGHT_TWINKLE
211 case KC_A ... KC_SLASH: 213 case KC_A ... KC_SLASH:
212 case KC_F1 ... KC_F12: 214 case KC_F1 ... KC_F12:
213 case KC_INSERT ... KC_UP: 215 case KC_INSERT ... KC_UP:
214 case KC_KP_SLASH ... KC_KP_DOT: 216 case KC_KP_SLASH ... KC_KP_DOT:
215 case KC_F13 ... KC_F24: 217 case KC_F13 ... KC_F24:
216 case KC_AUDIO_MUTE ... KC_MEDIA_REWIND: 218 case KC_AUDIO_MUTE ... KC_MEDIA_REWIND:
217 if (record->event.pressed) { start_rgb_light(); } 219 if (record->event.pressed) { start_rgb_light(); }
218 return true; break; 220 return true; break;
219#endif // RGBLIGHT_TWINKLE 221#endif // RGBLIGHT_TWINKLE
220 case KC_RGB_T: // This allows me to use underglow as layer indication, or as normal 222 case KC_RGB_T: // This allows me to use underglow as layer indication, or as normal
221#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) 223#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
222 if (record->event.pressed) { 224 if (record->event.pressed) {
223 userspace_config.rgb_layer_change ^= 1; 225 userspace_config.rgb_layer_change ^= 1;
224 xprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change); 226 xprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change);
225 eeconfig_update_user(userspace_config.raw); 227 eeconfig_update_user(userspace_config.raw);
226 if (userspace_config.rgb_layer_change) { 228 if (userspace_config.rgb_layer_change) {
227 layer_state_set(layer_state); // This is needed to immediately set the layer color (looks better) 229 layer_state_set(layer_state); // This is needed to immediately set the layer color (looks better)
228 } 230 }
229 } 231 }
230#endif // RGBLIGHT_ENABLE 232#endif // RGBLIGHT_ENABLE
231 return false; break; 233 return false; break;
232#ifdef RGBLIGHT_ENABLE 234#ifdef RGBLIGHT_ENABLE
233 case RGB_MODE_FORWARD ... RGB_MODE_GRADIENT: // quantum_keycodes.h L400 for definitions 235 case RGB_MODE_FORWARD ... RGB_MODE_GRADIENT: // quantum_keycodes.h L400 for definitions
234 if (record->event.pressed) { //This disables layer indication, as it's assumed that if you're changing this ... you want that disabled 236 if (record->event.pressed) { //This disables layer indication, as it's assumed that if you're changing this ... you want that disabled
235 if (userspace_config.rgb_layer_change) { 237 if (userspace_config.rgb_layer_change) {
236 userspace_config.rgb_layer_change = false; 238 userspace_config.rgb_layer_change = false;
237 xprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change); 239 xprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change);
238 eeconfig_update_user(userspace_config.raw); 240 eeconfig_update_user(userspace_config.raw);
239 } 241 }
240 } 242 }
241 return true; break; 243 return true; break;
242#endif // RGBLIGHT_ENABLE 244#endif // RGBLIGHT_ENABLE
243 } 245 }
244 return true; 246 return true;
@@ -248,28 +250,28 @@ bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) {
248 250
249void keyboard_post_init_rgb(void) { 251void keyboard_post_init_rgb(void) {
250#if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_STARTUP_ANIMATION) 252#if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_STARTUP_ANIMATION)
251 if (userspace_config.rgb_layer_change) { rgblight_enable_noeeprom(); } 253 if (userspace_config.rgb_layer_change) { rgblight_enable_noeeprom(); }
252 if (rgblight_config.enable) { 254 if (rgblight_config.enable) {
253 layer_state_set_user(layer_state); 255 layer_state_set_user(layer_state);
254 uint16_t old_hue = rgblight_config.hue; 256 uint16_t old_hue = rgblight_config.hue;
255 rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); 257 rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
256 for (uint16_t i = 360; i > 0; i--) { 258 for (uint16_t i = 255; i > 0; i--) {
257 rgblight_sethsv_noeeprom( ( i + old_hue) % 360, 255, 255); 259 rgblight_sethsv_noeeprom( ( i + old_hue) % 255, 255, 255);
258 matrix_scan(); 260 matrix_scan();
259 wait_ms(10); 261 wait_ms(10);
262 }
260 } 263 }
261 }
262#endif 264#endif
263 layer_state_set_user(layer_state); 265 layer_state_set_user(layer_state);
264} 266}
265 267
266void matrix_scan_rgb(void) { 268void matrix_scan_rgb(void) {
267#ifdef RGBLIGHT_TWINKLE 269#ifdef RGBLIGHT_TWINKLE
268 scan_rgblight_fadeout(); 270 scan_rgblight_fadeout();
269#endif // RGBLIGHT_ENABLE 271#endif // RGBLIGHT_ENABLE
270 272
271#ifdef INDICATOR_LIGHTS 273#ifdef INDICATOR_LIGHTS
272 matrix_scan_indicator(); 274 matrix_scan_indicator();
273#endif 275#endif
274 276
275} 277}
@@ -277,99 +279,60 @@ void matrix_scan_rgb(void) {
277 279
278uint32_t layer_state_set_rgb(uint32_t state) { 280uint32_t layer_state_set_rgb(uint32_t state) {
279#ifdef RGBLIGHT_ENABLE 281#ifdef RGBLIGHT_ENABLE
280 if (userspace_config.rgb_layer_change) { 282 if (userspace_config.rgb_layer_change) {
281 switch (biton32(state)) { 283 switch (biton32(state)) {
282 case _MACROS: 284 case _MACROS:
283 rgblight_sethsv_noeeprom_orange(); 285 rgblight_sethsv_noeeprom_orange();
284 userspace_config.is_overwatch ? rgblight_mode_noeeprom(RGBLIGHT_MODE_SNAKE + 2) : rgblight_mode_noeeprom(RGBLIGHT_MODE_SNAKE + 3); 286 userspace_config.is_overwatch ? rgblight_mode_noeeprom(RGBLIGHT_MODE_SNAKE + 2) : rgblight_mode_noeeprom(RGBLIGHT_MODE_SNAKE + 3);
285 break; 287 break;
286 case _MEDIA: 288 case _MEDIA:
287 rgblight_sethsv_noeeprom_chartreuse(); 289 rgblight_sethsv_noeeprom_chartreuse();
288 rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 1); 290 rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 1);
289 break; 291 break;
290 case _GAMEPAD: 292 case _GAMEPAD:
291 rgblight_sethsv_noeeprom_orange(); 293 rgblight_sethsv_noeeprom_orange();
292 rgblight_mode_noeeprom(RGBLIGHT_MODE_SNAKE + 2); 294 rgblight_mode_noeeprom(RGBLIGHT_MODE_SNAKE + 2);
293 break; 295 break;
294 case _DIABLO: 296 case _DIABLO:
295 rgblight_sethsv_noeeprom_red(); 297 rgblight_sethsv_noeeprom_red();
296 rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3); 298 rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3);
297 break; 299 break;
298 case _RAISE: 300 case _RAISE:
299 rgblight_sethsv_noeeprom_yellow(); 301 rgblight_sethsv_noeeprom_yellow();
300 rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3); 302 rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3);
301 break; 303 break;
302 case _LOWER: 304 case _LOWER:
303 rgblight_sethsv_noeeprom_green(); 305 rgblight_sethsv_noeeprom_green();
304 rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3); 306 rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3);
305 break; 307 break;
306 case _ADJUST: 308 case _ADJUST:
307 rgblight_sethsv_noeeprom_red(); 309 rgblight_sethsv_noeeprom_red();
308 rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2); 310 rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2);
309 break; 311 break;
310 default: // for any other layers, or the default layer 312 default: // for any other layers, or the default layer
311 switch (biton32(default_layer_state)) { 313 switch (biton32(default_layer_state)) {
312 case _COLEMAK: 314 case _COLEMAK:
313 rgblight_sethsv_noeeprom_magenta(); break; 315 rgblight_sethsv_noeeprom_magenta(); break;
314 case _DVORAK: 316 case _DVORAK:
315 rgblight_sethsv_noeeprom_springgreen(); break; 317 rgblight_sethsv_noeeprom_springgreen(); break;
316 case _WORKMAN: 318 case _WORKMAN:
317 rgblight_sethsv_noeeprom_goldenrod(); break; 319 rgblight_sethsv_noeeprom_goldenrod(); break;
318 case _NORMAN: 320 case _NORMAN:
319 rgblight_sethsv_noeeprom_coral(); break; 321 rgblight_sethsv_noeeprom_coral(); break;
320 case _MALTRON: 322 case _MALTRON:
321 rgblight_sethsv_noeeprom_yellow(); break; 323 rgblight_sethsv_noeeprom_yellow(); break;
322 case _EUCALYN: 324 case _EUCALYN:
323 rgblight_sethsv_noeeprom_pink(); break; 325 rgblight_sethsv_noeeprom_pink(); break;
324 case _CARPLAX: 326 case _CARPLAX:
325 rgblight_sethsv_noeeprom_blue(); break; 327 rgblight_sethsv_noeeprom_blue(); break;
326 default: 328 default:
327 rgblight_sethsv_noeeprom_cyan(); break; 329 rgblight_sethsv_noeeprom_cyan(); break;
328 } 330 }
329 biton32(state) == _MODS ? rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING) : rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); // if _MODS layer is on, then breath to denote it 331 biton32(state) == _MODS ? rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING) : rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); // if _MODS layer is on, then breath to denote it
330 break; 332 break;
333 }
331 } 334 }
332// layer_state_set_indicator(); // Runs every scan, so need to call this here .... since I can't get it working "right" anyhow
333 }
334#endif // RGBLIGHT_ENABLE 335#endif // RGBLIGHT_ENABLE
335 336
336 return state; 337 return state;
337}
338
339#if 0
340uint32_t default_layer_state_set_rgb(uint32_t state) {
341#ifdef RGBLIGHT_ENABLE
342 if (userspace_config.rgb_layer_change) {
343 rgblight_config_t temp_rgblight_config = rgblight_config;
344 switch (biton32(state)) {
345 case _COLEMAK:
346 temp_rgblight_config.hue = 300;
347 temp_rgblight_config.val = 255;
348 temp_rgblight_config.sat = 255;
349 temp_rgblight_config.mode = 1;
350 break;
351 case _DVORAK:
352 temp_rgblight_config.hue = 150;
353 temp_rgblight_config.val = 255;
354 temp_rgblight_config.sat = 255;
355 temp_rgblight_config.mode = 1;
356 case _WORKMAN:
357 temp_rgblight_config.hue = 43;
358 temp_rgblight_config.val = 218;
359 temp_rgblight_config.sat = 218;
360 temp_rgblight_config.mode = 1;
361 default:
362 temp_rgblight_config.hue = 180;
363 temp_rgblight_config.val = 255;
364 temp_rgblight_config.sat = 255;
365 temp_rgblight_config.mode = 1;
366 }
367 if (temp_rgblight_config.raw != eeconfig_read_rgblight()) {
368 xprintf("rgblight set default layer hsv [EEPROM]: %u,%u,%u,%u\n", temp_rgblight_config.hue, temp_rgblight_config.sat, temp_rgblight_config.val, temp_rgblight_config.mode);
369 eeconfig_update_rgblight(temp_rgblight_config.raw);
370 }
371 }
372#endif // RGBLIGHT_ENABLE
373 return state;
374} 338}
375#endif
diff --git a/users/drashna/rgblight_breathe_table.h b/users/drashna/rgblight_breathe_table.h
new file mode 100644
index 000000000..05d347fcd
--- /dev/null
+++ b/users/drashna/rgblight_breathe_table.h
@@ -0,0 +1,116 @@
1#ifndef RGBLIGHT_EFFECT_BREATHE_TABLE
2#define RGBLIGHT_EFFECT_BREATHE_TABLE
3
4const uint8_t rgblight_effect_breathe_table[] PROGMEM = {
5 /* #define RGBLIGHT_EFFECT_BREATHE_CENTER 0.00 */
6 /* #define RGBLIGHT_EFFECT_BREATHE_MAX 255 */
7
8 #if RGBLIGHT_BREATHE_TABLE_SIZE == 256
9 0x44, 0x45, 0x47, 0x48, 0x4a, 0x4b, 0x4c, 0x4e,
10 0x4f, 0x51, 0x52, 0x54, 0x55, 0x57, 0x58, 0x5a,
11 0x5c, 0x5d, 0x5f, 0x60, 0x62, 0x64, 0x65, 0x67,
12 0x69, 0x6a, 0x6c, 0x6e, 0x70, 0x72, 0x73, 0x75,
13 0x77, 0x79, 0x7b, 0x7c, 0x7e, 0x80, 0x82, 0x84,
14 0x86, 0x88, 0x8a, 0x8b, 0x8d, 0x8f, 0x91, 0x93,
15 0x95, 0x97, 0x99, 0x9b, 0x9d, 0x9f, 0xa1, 0xa3,
16 0xa5, 0xa7, 0xa9, 0xaa, 0xac, 0xae, 0xb0, 0xb2,
17 0xb4, 0xb6, 0xb8, 0xba, 0xbc, 0xbe, 0xbf, 0xc1,
18 0xc3, 0xc5, 0xc7, 0xc9, 0xca, 0xcc, 0xce, 0xd0,
19 0xd1, 0xd3, 0xd5, 0xd6, 0xd8, 0xda, 0xdb, 0xdd,
20 0xde, 0xe0, 0xe1, 0xe3, 0xe4, 0xe5, 0xe7, 0xe8,
21 0xe9, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xf0, 0xf1,
22 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf8,
23 0xf9, 0xfa, 0xfa, 0xfb, 0xfc, 0xfc, 0xfc, 0xfd,
24 0xfd, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
25 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfd,
26 0xfd, 0xfc, 0xfc, 0xfc, 0xfb, 0xfa, 0xfa, 0xf9,
27 0xf8, 0xf8, 0xf7, 0xf6, 0xf5, 0xf4, 0xf3, 0xf2,
28 0xf1, 0xf0, 0xef, 0xee, 0xed, 0xec, 0xeb, 0xe9,
29 0xe8, 0xe7, 0xe5, 0xe4, 0xe3, 0xe1, 0xe0, 0xde,
30 0xdd, 0xdb, 0xda, 0xd8, 0xd6, 0xd5, 0xd3, 0xd1,
31 0xd0, 0xce, 0xcc, 0xca, 0xc9, 0xc7, 0xc5, 0xc3,
32 0xc1, 0xbf, 0xbe, 0xbc, 0xba, 0xb8, 0xb6, 0xb4,
33 0xb2, 0xb0, 0xae, 0xac, 0xaa, 0xa9, 0xa7, 0xa5,
34 0xa3, 0xa1, 0x9f, 0x9d, 0x9b, 0x99, 0x97, 0x95,
35 0x93, 0x91, 0x8f, 0x8d, 0x8b, 0x8a, 0x88, 0x86,
36 0x84, 0x82, 0x80, 0x7e, 0x7c, 0x7b, 0x79, 0x77,
37 0x75, 0x73, 0x72, 0x70, 0x6e, 0x6c, 0x6a, 0x69,
38 0x67, 0x65, 0x64, 0x62, 0x60, 0x5f, 0x5d, 0x5c,
39 0x5a, 0x58, 0x57, 0x55, 0x54, 0x52, 0x51, 0x4f,
40 0x4e, 0x4c, 0x4b, 0x4a, 0x48, 0x47, 0x45, 0x44
41 #endif /* 256 bytes table */
42
43 #if RGBLIGHT_BREATHE_TABLE_SIZE == 128
44 0x44, 0x47, 0x4a, 0x4c,
45 0x4f, 0x52, 0x55, 0x58,
46 0x5c, 0x5f, 0x62, 0x65,
47 0x69, 0x6c, 0x70, 0x73,
48 0x77, 0x7b, 0x7e, 0x82,
49 0x86, 0x8a, 0x8d, 0x91,
50 0x95, 0x99, 0x9d, 0xa1,
51 0xa5, 0xa9, 0xac, 0xb0,
52 0xb4, 0xb8, 0xbc, 0xbf,
53 0xc3, 0xc7, 0xca, 0xce,
54 0xd1, 0xd5, 0xd8, 0xdb,
55 0xde, 0xe1, 0xe4, 0xe7,
56 0xe9, 0xec, 0xee, 0xf0,
57 0xf2, 0xf4, 0xf6, 0xf8,
58 0xf9, 0xfa, 0xfc, 0xfc,
59 0xfd, 0xfe, 0xfe, 0xfe,
60 0xfe, 0xfe, 0xfe, 0xfe,
61 0xfd, 0xfc, 0xfb, 0xfa,
62 0xf8, 0xf7, 0xf5, 0xf3,
63 0xf1, 0xef, 0xed, 0xeb,
64 0xe8, 0xe5, 0xe3, 0xe0,
65 0xdd, 0xda, 0xd6, 0xd3,
66 0xd0, 0xcc, 0xc9, 0xc5,
67 0xc1, 0xbe, 0xba, 0xb6,
68 0xb2, 0xae, 0xaa, 0xa7,
69 0xa3, 0x9f, 0x9b, 0x97,
70 0x93, 0x8f, 0x8b, 0x88,
71 0x84, 0x80, 0x7c, 0x79,
72 0x75, 0x72, 0x6e, 0x6a,
73 0x67, 0x64, 0x60, 0x5d,
74 0x5a, 0x57, 0x54, 0x51,
75 0x4e, 0x4b, 0x48, 0x45
76 #endif /* 128 bytes table */
77
78 #if RGBLIGHT_BREATHE_TABLE_SIZE == 64
79 0x44, 0x4a,
80 0x4f, 0x55,
81 0x5c, 0x62,
82 0x69, 0x70,
83 0x77, 0x7e,
84 0x86, 0x8d,
85 0x95, 0x9d,
86 0xa5, 0xac,
87 0xb4, 0xbc,
88 0xc3, 0xca,
89 0xd1, 0xd8,
90 0xde, 0xe4,
91 0xe9, 0xee,
92 0xf2, 0xf6,
93 0xf9, 0xfc,
94 0xfd, 0xfe,
95 0xfe, 0xfe,
96 0xfd, 0xfb,
97 0xf8, 0xf5,
98 0xf1, 0xed,
99 0xe8, 0xe3,
100 0xdd, 0xd6,
101 0xd0, 0xc9,
102 0xc1, 0xba,
103 0xb2, 0xaa,
104 0xa3, 0x9b,
105 0x93, 0x8b,
106 0x84, 0x7c,
107 0x75, 0x6e,
108 0x67, 0x60,
109 0x5a, 0x54,
110 0x4e, 0x48
111 #endif /* 64 bytes table */
112};
113
114static const int table_scale = 256/sizeof(rgblight_effect_breathe_table);
115
116#endif /* RGBLIGHT_EFFECT_BREATHE_TABLE */
diff --git a/users/drashna/rules.mk b/users/drashna/rules.mk
index bef25e259..085840f1c 100644
--- a/users/drashna/rules.mk
+++ b/users/drashna/rules.mk
@@ -1,40 +1,40 @@
1SRC += drashna.c \ 1SRC += drashna.c \
2 process_records.c 2 process_records.c
3 3
4LINK_TIME_OPTIMIZATION_ENABLE = yes
5
4ifneq ("$(wildcard $(USER_PATH)/secrets.c)","") 6ifneq ("$(wildcard $(USER_PATH)/secrets.c)","")
5 SRC += secrets.c 7 SRC += secrets.c
6endif 8endif
7 9
8ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) 10ifeq ($(strip $(TAP_DANCE_ENABLE)), yes)
9 SRC += tap_dances.c 11 SRC += tap_dances.c
10endif 12endif
11 13
12ifeq ($(PLATFORM),AVR) 14
13 EXTRAFLAGS += -flto
14endif
15 15
16ifeq ($(strip $(NO_SECRETS)), yes) 16ifeq ($(strip $(NO_SECRETS)), yes)
17 OPT_DEFS += -DNO_SECRETS 17 OPT_DEFS += -DNO_SECRETS
18endif 18endif
19 19
20ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) 20ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
21 SRC += rgb_stuff.c 21 SRC += rgb_stuff.c
22 ifeq ($(strip $(INDICATOR_LIGHTS)), yes) 22 ifeq ($(strip $(INDICATOR_LIGHTS)), yes)
23 OPT_DEFS += -DINDICATOR_LIGHTS 23 OPT_DEFS += -DINDICATOR_LIGHTS
24 endif 24 endif
25 ifeq ($(strip $(RGBLIGHT_TWINKLE)), yes) 25 ifeq ($(strip $(RGBLIGHT_TWINKLE)), yes)
26 OPT_DEFS += -DRGBLIGHT_TWINKLE 26 OPT_DEFS += -DRGBLIGHT_TWINKLE
27 endif 27 endif
28 ifeq ($(strip $(RGBLIGHT_NOEEPROM)), yes) 28 ifeq ($(strip $(RGBLIGHT_NOEEPROM)), yes)
29 OPT_DEFS += -DRGBLIGHT_NOEEPROM 29 OPT_DEFS += -DRGBLIGHT_NOEEPROM
30 endif 30 endif
31 ifeq ($(strip $(RGBLIGHT_STARTUP_ANIMATION)), yes) 31 ifeq ($(strip $(RGBLIGHT_STARTUP_ANIMATION)), yes)
32 OPT_DEFS += -DRGBLIGHT_STARTUP_ANIMATION 32 OPT_DEFS += -DRGBLIGHT_STARTUP_ANIMATION
33 endif 33 endif
34endif 34endif
35 35
36ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes) 36ifneq ($(strip $(RGB_MATRIX_ENABLE)), no)
37 SRC += rgb_stuff.c 37 SRC += rgb_stuff.c
38endif 38endif
39 39
40 40
@@ -43,9 +43,9 @@ ifeq ($(strip $(MACROS_ENABLED)), yes)
43endif 43endif
44 44
45ifdef CONSOLE_ENABLE 45ifdef CONSOLE_ENABLE
46 ifeq ($(strip $(KEYLOGGER_ENABLE)), yes) 46 ifeq ($(strip $(KEYLOGGER_ENABLE)), yes)
47 OPT_DEFS += -DKEYLOGGER_ENABLE 47 OPT_DEFS += -DKEYLOGGER_ENABLE
48 endif 48 endif
49endif 49endif
50 50
51ifeq ($(strip $(MAKE_BOOTLOADER)), yes) 51ifeq ($(strip $(MAKE_BOOTLOADER)), yes)
diff --git a/users/drashna/send_unicode.h b/users/drashna/send_unicode.h
index 818b6e571..743abc58b 100644
--- a/users/drashna/send_unicode.h
+++ b/users/drashna/send_unicode.h
@@ -7,65 +7,65 @@ void send_unicode_hex_string(const char* str);
7/* use X(n) to call the */ 7/* use X(n) to call the */
8#ifdef UNICODEMAP_ENABLE 8#ifdef UNICODEMAP_ENABLE
9enum unicode_name { 9enum unicode_name {
10 THINK, // thinking face 🤔 10 THINK, // thinking face 🤔
11 GRIN, // grinning face 😊 11 GRIN, // grinning face 😊
12 SMRK, // smirk 😏 12 SMRK, // smirk 😏
13 WEARY, // good shit 😩 13 WEARY, // good shit 😩
14 UNAMU, // unamused 😒 14 UNAMU, // unamused 😒
15 15
16 SNEK, // snke 🐍 16 SNEK, // snke 🐍
17 PENGUIN, // 🐧 17 PENGUIN, // 🐧
18 DRAGON, // 🐉 18 DRAGON, // 🐉
19 MONKEY, // 🐒 19 MONKEY, // 🐒
20 CHICK, // 🐥 20 CHICK, // 🐥
21 BOAR, // 🐗 21 BOAR, // 🐗
22 22
23 OKOK, // 👌 23 OKOK, // 👌
24 EFFU, // 🖕 24 EFFU, // 🖕
25 INUP, // 👆 25 INUP, // 👆
26 THUP, // 👍 26 THUP, // 👍
27 THDN, // 👎 27 THDN, // 👎
28 28
29 BBB, // dat B 🅱 29 BBB, // dat B 🅱
30 POO, // poop 💩 30 POO, // poop 💩
31 HUNDR, // 100 💯 31 HUNDR, // 100 💯
32 EGGPL, // EGGPLANT 🍆 32 EGGPL, // EGGPLANT 🍆
33 WATER, // wet 💦 33 WATER, // wet 💦
34 TUMBLER, // 🥃 34 TUMBLER, // 🥃
35 35
36 LIT, // fire 🔥 36 LIT, // fire 🔥
37 BANG, // ‽ 37 BANG, // ‽
38 IRONY, // ⸮ 38 IRONY, // ⸮
39 DEGREE // ° 39 DEGREE // °
40}; 40};
41 41
42 42
43const uint32_t PROGMEM unicode_map[] = { 43const uint32_t PROGMEM unicode_map[] = {
44 [THINK] = 0x1F914, 44 [THINK] = 0x1F914,
45 [GRIN] = 0x1F600, 45 [GRIN] = 0x1F600,
46 [BBB] = 0x1F171, 46 [BBB] = 0x1F171,
47 [POO] = 0x1F4A9, 47 [POO] = 0x1F4A9,
48 [HUNDR] = 0x1F4AF, 48 [HUNDR] = 0x1F4AF,
49 [SMRK] = 0x1F60F, 49 [SMRK] = 0x1F60F,
50 [WEARY] = 0x1F629, 50 [WEARY] = 0x1F629,
51 [EGGPL] = 0x1F346, 51 [EGGPL] = 0x1F346,
52 [WATER] = 0x1F4A6, 52 [WATER] = 0x1F4A6,
53 [LIT] = 0x1F525, 53 [LIT] = 0x1F525,
54 [UNAMU] = 0x1F612, 54 [UNAMU] = 0x1F612,
55 [SNEK] = 0x1F40D, 55 [SNEK] = 0x1F40D,
56 [PENGUIN] = 0x1F427, 56 [PENGUIN] = 0x1F427,
57 [BOAR] = 0x1F417, 57 [BOAR] = 0x1F417,
58 [MONKEY] = 0x1F412, 58 [MONKEY] = 0x1F412,
59 [CHICK] = 0x1F425, 59 [CHICK] = 0x1F425,
60 [DRAGON] = 0x1F409, 60 [DRAGON] = 0x1F409,
61 [OKOK] = 0x1F44C, 61 [OKOK] = 0x1F44C,
62 [EFFU] = 0x1F595, 62 [EFFU] = 0x1F595,
63 [INUP] = 0x1F446, 63 [INUP] = 0x1F446,
64 [THDN] = 0x1F44E, 64 [THDN] = 0x1F44E,
65 [THUP] = 0x1F44D, 65 [THUP] = 0x1F44D,
66 [TUMBLER] = 0x1F943, 66 [TUMBLER] = 0x1F943,
67 [BANG] = 0x0203D, 67 [BANG] = 0x0203D,
68 [IRONY] = 0x02E2E, 68 [IRONY] = 0x02E2E,
69 [DEGREE] = 0x000B0 69 [DEGREE] = 0x000B0
70 }; 70 };
71#endif // UNICODEMAP_ENABLE 71#endif // UNICODEMAP_ENABLE
diff --git a/users/drashna/tap_dances.c b/users/drashna/tap_dances.c
index cbb3cf54e..18ca96e18 100644
--- a/users/drashna/tap_dances.c
+++ b/users/drashna/tap_dances.c
@@ -2,63 +2,64 @@
2 2
3 3
4//define diablo macro timer variables 4//define diablo macro timer variables
5uint16_t diablo_timer[4]; 5diablo_timer_t diablo_timer[4];
6uint8_t diablo_times[] = { 0, 1, 3, 5, 10, 30 }; 6
7uint8_t diablo_key_time[4]; 7uint8_t diablo_times[] = { 0, 0, 1, 3, 5, 10, 30 };
8 8
9// has the correct number of seconds elapsed (as defined by diablo_times) 9// has the correct number of seconds elapsed (as defined by diablo_times)
10bool check_dtimer(uint8_t dtimer) { return (timer_elapsed(diablo_timer[dtimer]) < (diablo_key_time[dtimer] * 1000)) ? false : true; }; 10bool check_dtimer(uint8_t dtimer) { return (timer_elapsed(diablo_timer[dtimer].key_time) < (diablo_timer[dtimer].timer * 1000)) ? false : true; };
11 11
12// Cycle through the times for the macro, starting at 0, for disabled. 12// Cycle through the times for the macro, starting at 0, for disabled.
13// Max of six values, so don't exceed 13// Max of six values, so don't exceed
14void diablo_tapdance_master(qk_tap_dance_state_t *state, void *user_data, uint8_t diablo_key) { 14void diablo_tapdance_master(qk_tap_dance_state_t *state, void *user_data) {
15 if (state->count >= 7) { 15 int index = (int)user_data;
16 diablo_key_time[diablo_key] = diablo_times[0]; 16 if (state->count >= 7) {
17 reset_tap_dance(state); 17 diablo_timer[index].key_time = diablo_times[0];
18 } else { 18 reset_tap_dance(state);
19 diablo_key_time[diablo_key] = diablo_times[state->count - 1]; 19 } else {
20 } 20 diablo_timer[index].key_time = diablo_times[state->count];
21 }
21} 22}
22 23
23// Would rather have one function for all of this, but no idea how to do that... 24// One funtion to rule them all!!
24void diablo_tapdance1(qk_tap_dance_state_t *state, void *user_data) { diablo_tapdance_master(state, user_data, 0); } 25#define ACTION_TAP_DANCE_DIABLO(arg) { \
25void diablo_tapdance2(qk_tap_dance_state_t *state, void *user_data) { diablo_tapdance_master(state, user_data, 1); } 26 .fn = { NULL, (void *)diablo_tapdance_master, NULL }, \
26void diablo_tapdance3(qk_tap_dance_state_t *state, void *user_data) { diablo_tapdance_master(state, user_data, 2); } 27 .user_data = (void *)arg, \
27void diablo_tapdance4(qk_tap_dance_state_t *state, void *user_data) { diablo_tapdance_master(state, user_data, 3); } 28 }
28 29
29//Tap Dance Definitions 30//Tap Dance Definitions
30qk_tap_dance_action_t tap_dance_actions[] = { 31qk_tap_dance_action_t tap_dance_actions[] = {
31 // tap once to disable, and more to enable timed micros 32 // tap once to disable, and more to enable timed micros
32 [TD_D3_1] = ACTION_TAP_DANCE_FN(diablo_tapdance1), 33 [TD_D3_1] = ACTION_TAP_DANCE_DIABLO(0),
33 [TD_D3_2] = ACTION_TAP_DANCE_FN(diablo_tapdance2), 34 [TD_D3_2] = ACTION_TAP_DANCE_DIABLO(1),
34 [TD_D3_3] = ACTION_TAP_DANCE_FN(diablo_tapdance3), 35 [TD_D3_3] = ACTION_TAP_DANCE_DIABLO(2),
35 [TD_D3_4] = ACTION_TAP_DANCE_FN(diablo_tapdance4), 36 [TD_D3_4] = ACTION_TAP_DANCE_DIABLO(3),
36}; 37};
37 38
38// Sends the key press to system, but only if on the Diablo layer 39// Sends the key press to system, but only if on the Diablo layer
39void send_diablo_keystroke(uint8_t diablo_key) { 40void send_diablo_keystroke(uint8_t diablo_key) {
40 if (IS_LAYER_ON(_DIABLO)) { 41 if (IS_LAYER_ON(_DIABLO)) {
41 switch (diablo_key) { 42 switch (diablo_key) {
42 case 0: 43 case 0:
43 tap_code(KC_1); break; 44 tap_code(KC_1); break;
44 case 1: 45 case 1:
45 tap_code(KC_2); break; 46 tap_code(KC_2); break;
46 case 2: 47 case 2:
47 tap_code(KC_3); break; 48 tap_code(KC_3); break;
48 case 3: 49 case 3:
49 tap_code(KC_4); break; 50 tap_code(KC_4); break;
51 }
50 } 52 }
51 }
52} 53}
53 54
54// Checks each of the 4 timers/keys to see if enough time has elapsed 55// Checks each of the 4 timers/keys to see if enough time has elapsed
55// Runs the "send string" command if enough time has passed, and resets the timer. 56// Runs the "send string" command if enough time has passed, and resets the timer.
56void run_diablo_macro_check(void) { 57void run_diablo_macro_check(void) {
57 uint8_t dtime; 58 uint8_t dtime;
58 for (dtime = 0; dtime < 4; dtime++) { 59 for (dtime = 0; dtime < 4; dtime++) {
59 if (check_dtimer(dtime) && diablo_key_time[dtime]) { 60 if (check_dtimer(dtime) && diablo_timer[dtime].key_time) {
60 diablo_timer[dtime] = timer_read(); 61 diablo_timer[dtime].timer = timer_read();
61 send_diablo_keystroke(dtime); 62 send_diablo_keystroke(dtime);
63 }
62 } 64 }
63 }
64} 65}
diff --git a/users/drashna/tap_dances.h b/users/drashna/tap_dances.h
index 41d2bacb7..4a293b258 100644
--- a/users/drashna/tap_dances.h
+++ b/users/drashna/tap_dances.h
@@ -2,18 +2,21 @@
2#include "drashna.h" 2#include "drashna.h"
3 3
4//define diablo macro timer variables 4//define diablo macro timer variables
5extern uint16_t diablo_timer[4];
6extern uint8_t diablo_times[]; 5extern uint8_t diablo_times[];
7extern uint8_t diablo_key_time[4]; 6typedef struct {
7 uint16_t timer;
8 uint8_t key_time;
9} diablo_timer_t;
8 10
11extern diablo_timer_t diablo_timer[4];
9 12
10void run_diablo_macro_check(void); 13void run_diablo_macro_check(void);
11 14
12#ifdef TAP_DANCE_ENABLE 15#ifdef TAP_DANCE_ENABLE
13enum { 16enum {
14 TD_D3_1 = 0, 17 TD_D3_1 = 0,
15 TD_D3_2, 18 TD_D3_2,
16 TD_D3_3, 19 TD_D3_3,
17 TD_D3_4 20 TD_D3_4
18}; 21};
19#endif // TAP_DANCE_ENABLE 22#endif // TAP_DANCE_ENABLE
diff --git a/users/drashna/wrappers.h b/users/drashna/wrappers.h
index 3260c58ae..93f842f4b 100644
--- a/users/drashna/wrappers.h
+++ b/users/drashna/wrappers.h
@@ -6,7 +6,7 @@ arguments, we need a wrapper in order for these definitions to be
6expanded before being used as arguments to the LAYOUT_xxx macro. 6expanded before being used as arguments to the LAYOUT_xxx macro.
7*/ 7*/
8#if (!defined(LAYOUT) && defined(KEYMAP)) 8#if (!defined(LAYOUT) && defined(KEYMAP))
9#define LAYOUT KEYMAP 9# define LAYOUT KEYMAP
10#endif 10#endif
11 11
12#define LAYOUT_ergodox_wrapper(...) LAYOUT_ergodox(__VA_ARGS__) 12#define LAYOUT_ergodox_wrapper(...) LAYOUT_ergodox(__VA_ARGS__)
@@ -15,6 +15,7 @@ expanded before being used as arguments to the LAYOUT_xxx macro.
15#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__) 15#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__)
16#define LAYOUT_ortho_4x12_wrapper(...) LAYOUT_ortho_4x12(__VA_ARGS__) 16#define LAYOUT_ortho_4x12_wrapper(...) LAYOUT_ortho_4x12(__VA_ARGS__)
17#define LAYOUT_ortho_5x12_wrapper(...) LAYOUT_ortho_5x12(__VA_ARGS__) 17#define LAYOUT_ortho_5x12_wrapper(...) LAYOUT_ortho_5x12(__VA_ARGS__)
18#define LAYOUT_gergo_wrapper(...) LAYOUT_gergo(__VA_ARGS__)
18 19
19/* 20/*
20Blocks for each of the four major keyboard layouts 21Blocks for each of the four major keyboard layouts