aboutsummaryrefslogtreecommitdiff
path: root/users
diff options
context:
space:
mode:
Diffstat (limited to 'users')
-rw-r--r--users/333fred/333fred.c2
-rw-r--r--users/bbaserdem/bbaserdem.c10
-rw-r--r--users/bbaserdem/rules.mk4
-rw-r--r--users/bcat/config.h2
-rw-r--r--users/bcat/rules.mk3
-rw-r--r--users/billypython/billypython.c2
-rw-r--r--users/curry/config.h2
-rw-r--r--users/cwebster2/rules.mk2
-rw-r--r--users/d4mation/rules.mk2
-rw-r--r--users/danielo515/process_records.h4
-rw-r--r--users/doogle999/rules.mk2
-rw-r--r--users/draevin/rules.mk2
-rw-r--r--users/drashna/config.h172
-rw-r--r--users/drashna/drashna.c13
-rw-r--r--users/drashna/drashna.h42
-rw-r--r--users/drashna/drashna_font.h164
-rw-r--r--users/drashna/drashna_transport.c603
-rw-r--r--users/drashna/oled_stuff.c91
-rw-r--r--users/drashna/oled_stuff.h167
-rw-r--r--users/drashna/pimoroni_trackball.c151
-rw-r--r--users/drashna/process_records.c21
-rw-r--r--users/drashna/process_records.h101
-rw-r--r--users/drashna/rgb_matrix_stuff.c32
-rw-r--r--users/drashna/rgb_stuff.c34
-rw-r--r--users/drashna/rules.mk31
-rw-r--r--users/drashna/tap_dances.h4
-rw-r--r--users/drashna/transport_sync.c188
-rw-r--r--users/drashna/transport_sync.h (renamed from users/drashna/pimoroni_trackball.h)19
-rw-r--r--users/drashna/wrappers.h194
-rw-r--r--users/dshields/rules.mk1
-rw-r--r--users/edvorakjp/edvorakjp.c2
-rw-r--r--users/edvorakjp/edvorakjp.h2
-rw-r--r--users/ericgebhart/base_layers.h2
-rw-r--r--users/ericgebhart/core_keys.h2
-rw-r--r--users/ericgebhart/core_keysets.h36
-rw-r--r--users/ericgebhart/ericgebhart.c22
-rwxr-xr-xusers/ericgebhart/rules.mk3
-rw-r--r--users/gordon/rules.mk1
-rw-r--r--users/issmirnov/rules.mk2
-rw-r--r--users/jdelkins/rules.mk2
-rw-r--r--users/konstantin/konstantin.c2
-rw-r--r--users/kuchosauronad0/kuchosauronad0.c4
-rw-r--r--users/losinggeneration/rules.mk1
-rw-r--r--users/miles2go/keymaps/handwired/ms_sculpt_mobile/rules.mk2
-rw-r--r--users/mtdjr/mtdjr.c2
-rw-r--r--users/ninjonas/rules.mk2
-rw-r--r--users/pvinis/pvinis.c2
-rw-r--r--users/ridingqwerty/rules.mk2
-rw-r--r--users/romus/romus.c26
-rw-r--r--users/romus/rules.mk4
-rw-r--r--users/sigul/sigul.c20
-rw-r--r--users/sigul/sigul.h8
-rw-r--r--users/spacebarracecar/spacebarracecar.c12
-rw-r--r--users/spidey3/config.h4
-rw-r--r--users/spidey3/rules.mk2
-rw-r--r--users/spotpuff/rules.mk2
-rw-r--r--users/stanrc85/layer_rgb.c2
-rw-r--r--users/talljoe/rules.mk2
-rw-r--r--users/talljoe/talljoe.h1
-rw-r--r--users/tominabox1/config.h2
-rw-r--r--users/tominabox1/rules.mk2
-rw-r--r--users/tominabox1/tominabox1.c2
-rw-r--r--users/turbomech/backupturbomech.c2
-rw-r--r--users/xulkal/process_records.c2
-rw-r--r--users/yanfali/rules.mk2
65 files changed, 838 insertions, 1413 deletions
diff --git a/users/333fred/333fred.c b/users/333fred/333fred.c
index 621b9e664..99f4e0168 100644
--- a/users/333fred/333fred.c
+++ b/users/333fred/333fred.c
@@ -117,7 +117,7 @@ void tap_dance_process_keycode(uint16_t keycode) {
117__attribute__ ((weak)) 117__attribute__ ((weak))
118void layer_state_set_rgb(uint32_t state) {} 118void layer_state_set_rgb(uint32_t state) {}
119 119
120uint32_t layer_state_set_user(uint32_t state) { 120layer_state_t layer_state_set_user(layer_state_t state) {
121 layer_state_set_rgb(state); 121 layer_state_set_rgb(state);
122 return state; 122 return state;
123} 123}
diff --git a/users/bbaserdem/bbaserdem.c b/users/bbaserdem/bbaserdem.c
index ac7b1b62e..cdacda12e 100644
--- a/users/bbaserdem/bbaserdem.c
+++ b/users/bbaserdem/bbaserdem.c
@@ -87,7 +87,7 @@ void rgblight_saveBase(void) {
87 base_sta = false; // If saving, that means base layer is being left 87 base_sta = false; // If saving, that means base layer is being left
88} 88}
89 89
90// Load the base state back 90// Load the base state back
91void rgblight_loadBase(void) { 91void rgblight_loadBase(void) {
92 // Don't do anything if not enabled 92 // Don't do anything if not enabled
93 if ( !base_sta ) { 93 if ( !base_sta ) {
@@ -248,7 +248,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
248 } 248 }
249 return false; 249 return false;
250 break; 250 break;
251#endif 251#endif
252 252
253 // If these keys are pressed, load base layer config, and mark saving 253 // If these keys are pressed, load base layer config, and mark saving
254#ifdef RGBLIGHT_ENABLE 254#ifdef RGBLIGHT_ENABLE
@@ -261,7 +261,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
261 case RGB_HUI: 261 case RGB_HUI:
262 case RGB_HUD: 262 case RGB_HUD:
263 if ( !base_sta ) { 263 if ( !base_sta ) {
264 rgblight_loadBase(); 264 rgblight_loadBase();
265 } 265 }
266 return true; 266 return true;
267 break; 267 break;
@@ -301,7 +301,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
301 } 301 }
302 return false; 302 return false;
303 break; 303 break;
304 304
305 // Layer switches with sound 305 // Layer switches with sound
306 case K_GAMES: 306 case K_GAMES:
307 if (record->event.pressed) { 307 if (record->event.pressed) {
@@ -622,7 +622,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
622|*-----LAYER CHANGE-----*| 622|*-----LAYER CHANGE-----*|
623\*----------------------*/ 623\*----------------------*/
624 624
625uint32_t layer_state_set_user(uint32_t state) { 625layer_state_t layer_state_set_user(layer_state_t state) {
626 626
627 state = layer_state_set_keymap (state); 627 state = layer_state_set_keymap (state);
628#ifdef RGBLIGHT_ENABLE 628#ifdef RGBLIGHT_ENABLE
diff --git a/users/bbaserdem/rules.mk b/users/bbaserdem/rules.mk
index 94f01cdff..9c7e78e2f 100644
--- a/users/bbaserdem/rules.mk
+++ b/users/bbaserdem/rules.mk
@@ -10,14 +10,12 @@ ifndef BLUETOOTH_ENABLE
10 BLUETOOTH_ENABLE = no # No bluetooth 10 BLUETOOTH_ENABLE = no # No bluetooth
11endif 11endif
12COMMAND_ENABLE = no # Some bootmagic thing i dont use 12COMMAND_ENABLE = no # Some bootmagic thing i dont use
13BOOTMAGIC_ENABLE = no # Access to EEPROM settings, not needed 13BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
14CONSOLE_ENABLE = no # Allows console output with a command 14CONSOLE_ENABLE = no # Allows console output with a command
15SLEEP_LED_ENABLE = no # Breathes LED's when computer is asleep. Untested. 15SLEEP_LED_ENABLE = no # Breathes LED's when computer is asleep. Untested.
16NKRO_ENABLE = no # Default is 6KRO which is plenty 16NKRO_ENABLE = no # Default is 6KRO which is plenty
17MIDI_ENABLE = no # Untested feature 17MIDI_ENABLE = no # Untested feature
18KEY_LOCK_ENABLE = no # Allows locking any key. Not used 18KEY_LOCK_ENABLE = no # Allows locking any key. Not used
19API_SYSEX_ENABLE = no # Allows OS to send signals.
20KEY_LOCK_ENABLE = no # Allows locking any key. Not used
21 19
22# Disabling this makes it compile, i dont know why 20# Disabling this makes it compile, i dont know why
23# VARIABLE_TRACE = no # Allows debugging variables 21# VARIABLE_TRACE = no # Allows debugging variables
diff --git a/users/bcat/config.h b/users/bcat/config.h
index 16188950e..5bb93f383 100644
--- a/users/bcat/config.h
+++ b/users/bcat/config.h
@@ -33,7 +33,7 @@
33 33
34#if defined(RGB_MATRIX_ENABLE) 34#if defined(RGB_MATRIX_ENABLE)
35/* Turn off per-key RGB when the host goes to sleep. */ 35/* Turn off per-key RGB when the host goes to sleep. */
36# define RGB_DISABLE_WHEN_USB_SUSPENDED true 36# define RGB_DISABLE_WHEN_USB_SUSPENDED
37 37
38/* Keep per-key RGB increments consistent across keyboards. */ 38/* Keep per-key RGB increments consistent across keyboards. */
39# undef RGB_MATRIX_HUE_STEP 39# undef RGB_MATRIX_HUE_STEP
diff --git a/users/bcat/rules.mk b/users/bcat/rules.mk
index 3442a78ac..6d748875a 100644
--- a/users/bcat/rules.mk
+++ b/users/bcat/rules.mk
@@ -1,7 +1,7 @@
1SRC += bcat.c 1SRC += bcat.c
2 2
3# Enable Bootmagic Lite to consistently reset to bootloader and clear EEPROM. 3# Enable Bootmagic Lite to consistently reset to bootloader and clear EEPROM.
4BOOTMAGIC_ENABLE = lite 4BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite
5 5
6# Enable media keys on all keyboards. 6# Enable media keys on all keyboards.
7EXTRAKEY_ENABLE = yes 7EXTRAKEY_ENABLE = yes
@@ -27,7 +27,6 @@ MIDI_ENABLE = no
27SLEEP_LED_ENABLE = no 27SLEEP_LED_ENABLE = no
28 28
29# Disable other unused options on all keyboards. 29# Disable other unused options on all keyboards.
30API_SYSEX_ENABLE = no
31AUTO_SHIFT_ENABLE = no 30AUTO_SHIFT_ENABLE = no
32COMBO_ENABLE = no 31COMBO_ENABLE = no
33KEYBOARD_LOCK_ENABLE = no 32KEYBOARD_LOCK_ENABLE = no
diff --git a/users/billypython/billypython.c b/users/billypython/billypython.c
index 7bdfe33a4..180b478d7 100644
--- a/users/billypython/billypython.c
+++ b/users/billypython/billypython.c
@@ -27,6 +27,6 @@ uint32_t layer_state_set_keymap(uint32_t state) {
27 return state; 27 return state;
28} 28}
29 29
30uint32_t layer_state_set_user(uint32_t state) { 30layer_state_t layer_state_set_user(layer_state_t state) {
31 return layer_state_set_keymap(state); 31 return layer_state_set_keymap(state);
32} 32}
diff --git a/users/curry/config.h b/users/curry/config.h
index b982dab03..e3c0a103e 100644
--- a/users/curry/config.h
+++ b/users/curry/config.h
@@ -17,7 +17,7 @@
17#if defined(RGB_MATRIX_ENABLE) 17#if defined(RGB_MATRIX_ENABLE)
18# define RGB_MATRIX_KEYPRESSES 18# define RGB_MATRIX_KEYPRESSES
19# define RGB_MATRIX_FRAMEBUFFER_EFFECTS 19# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
20# define RGB_DISABLE_WHEN_USB_SUSPENDED true 20# define RGB_DISABLE_WHEN_USB_SUSPENDED
21 21
22# define DISABLE_RGB_MATRIX_ALPHAS_MODS 22# define DISABLE_RGB_MATRIX_ALPHAS_MODS
23# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN 23# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
diff --git a/users/cwebster2/rules.mk b/users/cwebster2/rules.mk
index f39d4ebc9..3aa4d68f3 100644
--- a/users/cwebster2/rules.mk
+++ b/users/cwebster2/rules.mk
@@ -2,7 +2,7 @@ AUTO_SHIFT_ENABLE = no # Enable autoshift
2MOUSEKEY_ENABLE = yes 2MOUSEKEY_ENABLE = yes
3EXTRAKEY_ENABLE = yes 3EXTRAKEY_ENABLE = yes
4CONSOLE_ENABLE = no 4CONSOLE_ENABLE = no
5BOOTMAGIC_ENABLE = no 5BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
6GRAVE_ESC_ENABLE = no 6GRAVE_ESC_ENABLE = no
7CONSOLE_ENABLE = no 7CONSOLE_ENABLE = no
8SPACE_CADET_ENABLE = no 8SPACE_CADET_ENABLE = no
diff --git a/users/d4mation/rules.mk b/users/d4mation/rules.mk
index 3d65a2242..f677721b4 100644
--- a/users/d4mation/rules.mk
+++ b/users/d4mation/rules.mk
@@ -2,7 +2,7 @@ SRC += d4mation.c \
2 tap-hold.c \ 2 tap-hold.c \
3 macros.c 3 macros.c
4 4
5BOOTMAGIC_ENABLE = no 5BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
6LTO_ENABLE = yes 6LTO_ENABLE = yes
7MOUSEKEY_ENABLE = no 7MOUSEKEY_ENABLE = no
8 8
diff --git a/users/danielo515/process_records.h b/users/danielo515/process_records.h
index 490607686..caa85e629 100644
--- a/users/danielo515/process_records.h
+++ b/users/danielo515/process_records.h
@@ -78,8 +78,8 @@ enum layers {
78#define KC_E_GT S(KC_NUBS) 78#define KC_E_GT S(KC_NUBS)
79#define KC_E_TILD ES_TILD 79#define KC_E_TILD ES_TILD
80#define KC_E_MINS ES_MINS 80#define KC_E_MINS ES_MINS
81#define KC_E_OVRR ES_OVRR 81#define KC_E_OVRR ES_MORD
82#define KC_E_APOS ES_APOS 82#define KC_E_APOS ES_QUOT
83#define KC_E_IEXL ES_IEXL 83#define KC_E_IEXL ES_IEXL
84//========== Short hand for complex key combinations 84//========== Short hand for complex key combinations
85#define WIN_LEFT_HALF LALT(LGUI(KC_LEFT)) 85#define WIN_LEFT_HALF LALT(LGUI(KC_LEFT))
diff --git a/users/doogle999/rules.mk b/users/doogle999/rules.mk
index 12698a27e..aab01b243 100644
--- a/users/doogle999/rules.mk
+++ b/users/doogle999/rules.mk
@@ -2,7 +2,7 @@ SRC += doogle999.c
2 2
3CFLAGS += -fstrict-aliasing -ftree-vrp 3CFLAGS += -fstrict-aliasing -ftree-vrp
4 4
5BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) 5BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
6MOUSEKEY_ENABLE = no # Mouse keys(+4700) 6MOUSEKEY_ENABLE = no # Mouse keys(+4700)
7EXTRAKEY_ENABLE = yes # Audio control and System control(+450) 7EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
8CONSOLE_ENABLE = no # Console for debug(+400) 8CONSOLE_ENABLE = no # Console for debug(+400)
diff --git a/users/draevin/rules.mk b/users/draevin/rules.mk
index 7d6740493..1fc377e23 100644
--- a/users/draevin/rules.mk
+++ b/users/draevin/rules.mk
@@ -7,6 +7,6 @@ TAP_DANCE_ENABLE = yes
7 7
8AUDIO_ENABLE = no 8AUDIO_ENABLE = no
9BACKLIGHT_ENABLE = no 9BACKLIGHT_ENABLE = no
10BOOTMAGIC_ENABLE = no 10BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
11CONSOLE_ENABLE = no 11CONSOLE_ENABLE = no
12SLEEP_LED_ENABLE = no \ No newline at end of file 12SLEEP_LED_ENABLE = no \ No newline at end of file
diff --git a/users/drashna/config.h b/users/drashna/config.h
index 5f7c32ff3..ab0080234 100644
--- a/users/drashna/config.h
+++ b/users/drashna/config.h
@@ -17,57 +17,81 @@
17#pragma once 17#pragma once
18 18
19// Use custom magic number so that when switching branches, EEPROM always gets reset 19// Use custom magic number so that when switching branches, EEPROM always gets reset
20#define EECONFIG_MAGIC_NUMBER (uint16_t)0x1339 20#define EECONFIG_MAGIC_NUMBER (uint16_t)0x1339
21 21
22/* Set Polling rate to 1000Hz */ 22/* Set Polling rate to 1000Hz */
23#define USB_POLLING_INTERVAL_MS 1 23#define USB_POLLING_INTERVAL_MS 1
24 24
25#if defined(SPLIT_KEYBOARD) 25#if defined(SPLIT_KEYBOARD)
26// # define SPLIT_TRANSPORT_MIRROR
27# define SPLIT_LAYER_STATE_ENABLE
28# define SPLIT_LED_STATE_ENABLE
26# define SPLIT_MODS_ENABLE 29# define SPLIT_MODS_ENABLE
27# define SPLIT_TRANSPORT_MIRROR 30# ifdef WPM_ENABLE
28# define SERIAL_USE_MULTI_TRANSACTION 31# define SPLIT_WPM_ENABLE
29// # define SPLIT_NUM_TRANSACTIONS_KB 2 32# endif
33# define SELECT_SOFT_SERIAL_SPEED 1
34# define SPLIT_TRANSACTION_IDS_USER RPC_ID_USER_STATE_SYNC, RPC_ID_USER_KEYMAP_SYNC, RPC_ID_USER_CONFIG_SYNC
30#endif 35#endif
31 36
32#ifdef AUDIO_ENABLE 37#ifdef AUDIO_ENABLE
33
34# define AUDIO_CLICKY 38# define AUDIO_CLICKY
35# define STARTUP_SONG SONG(RICK_ROLL)
36# define GOODBYE_SONG SONG(SONIC_RING)
37# define DEFAULT_LAYER_SONGS \
38 { SONG(QWERTY_SOUND), SONG(COLEMAK_SOUND), SONG(DVORAK_SOUND), SONG(OVERWATCH_THEME) }
39
40# define AUDIO_CLICKY_FREQ_RANDOMNESS 1.5f 39# define AUDIO_CLICKY_FREQ_RANDOMNESS 1.5f
41 40
42# define UNICODE_SONG_MAC SONG(RICK_ROLL) 41# ifdef USER_SONG_LIST
43# define UNICODE_SONG_LNX SONG(RICK_ROLL) 42# define STARTUP_SONG SONG(RICK_ROLL)
44# define UNICODE_SONG_WIN SONG(RICK_ROLL) 43# define GOODBYE_SONG SONG(SONIC_RING)
45# define UNICODE_SONG_BSD SONG(RICK_ROLL) 44# define DEFAULT_LAYER_SONGS \
46# define UNICODE_SONG_WINC SONG(RICK_ROLL) 45 { SONG(QWERTY_SOUND), SONG(COLEMAK_SOUND), SONG(DVORAK_SOUND), SONG(OVERWATCH_THEME) }
46# define UNICODE_SONG_MAC SONG(MARIO_THEME)
47# define UNICODE_SONG_LNX SONG(MARIO_POWERUP)
48# define UNICODE_SONG_WIN SONG(MARIO_ONEUP)
49# define UNICODE_SONG_BSD SONG(RICK_ROLL)
50# define UNICODE_SONG_WINC SONG(RICK_ROLL)
51# else
52# define STARTUP_SONG SONG(STARTUP_SOUND)
53# define GOODBYE_SONG SONG(GOODBYE_SOUND)
54# define DEFAULT_LAYER_SONGS \
55 { SONG(QWERTY_SOUND), SONG(COLEMAK_SOUND), SONG(DVORAK_SOUND), SONG(WORKMAN_SOUND) }
56# define UNICODE_SONG_MAC SONG(QWERTY_SOUND)
57# define UNICODE_SONG_LNX SONG(COLEMAK_SOUND)
58# define UNICODE_SONG_WIN SONG(DVORAK_SOUND)
59# define UNICODE_SONG_BSD SONG(WORKMAN_SOUND)
60# define UNICODE_SONG_WINC SONG(PLOVER_GOODBYE_SOUND)
61# endif
47#endif // !AUDIO_ENABLE 62#endif // !AUDIO_ENABLE
48 63
64#define UNICODE_SELECTED_MODES UC_WIN, UC_MAC
65
49#ifdef RGBLIGHT_ENABLE 66#ifdef RGBLIGHT_ENABLE
50# define RGBLIGHT_SLEEP 67# define RGBLIGHT_SLEEP
68# undef RGBLIGHT_ANIMATIONS
51# if defined(__AVR__) && !defined(__AVR_AT90USB1286__) 69# if defined(__AVR__) && !defined(__AVR_AT90USB1286__)
52# undef RGBLIGHT_ANIMATIONS
53# define RGBLIGHT_EFFECT_BREATHING 70# define RGBLIGHT_EFFECT_BREATHING
54# define RGBLIGHT_EFFECT_SNAKE 71# define RGBLIGHT_EFFECT_SNAKE
55# define RGBLIGHT_EFFECT_KNIGHT 72# define RGBLIGHT_EFFECT_KNIGHT
56# else 73# else
57# define RGBLIGHT_ANIMATIONS 74# define RGBLIGHT_EFFECT_BREATHING
75# define RGBLIGHT_EFFECT_RAINBOW_MOOD
76# define RGBLIGHT_EFFECT_RAINBOW_SWIRL
77# define RGBLIGHT_EFFECT_SNAKE
78# define RGBLIGHT_EFFECT_KNIGHT
79// # define RGBLIGHT_EFFECT_CHRISTMAS
80// # define RGBLIGHT_EFFECT_STATIC_GRADIENT
81// # define RGBLIGHT_EFFECT_RGB_TEST
82// # define RGBLIGHT_EFFECT_ALTERNATING
83# define RGBLIGHT_EFFECT_TWINKLE
58# endif 84# endif
59# define RGBLIGHT_EFFECT_TWINKLE_LIFE 250 85# define RGBLIGHT_EFFECT_TWINKLE_LIFE 250
60# define RGBLIGHT_EFFECT_TWINKLE_PROBABILITY 1/24 86# define RGBLIGHT_EFFECT_TWINKLE_PROBABILITY 1 / 24
61#endif // RGBLIGHT_ENABLE 87#endif // RGBLIGHT_ENABLE
62 88
63#ifdef RGB_MATRIX_ENABLE 89#ifdef RGB_MATRIX_ENABLE
64# define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot) 90# define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot)
65// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (not recommened) 91// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (not recommened)
66# define RGB_MATRIX_FRAMEBUFFER_EFFECTS 92# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
67// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects 93// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
68# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended 94// # define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
69// # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
70// # define EECONFIG_RGB_MATRIX (uint32_t *)16
71 95
72# if defined(__AVR__) && !defined(__AVR_AT90USB1286__) && !defined(KEYBOARD_launchpad) 96# if defined(__AVR__) && !defined(__AVR_AT90USB1286__) && !defined(KEYBOARD_launchpad)
73# define DISABLE_RGB_MATRIX_ALPHAS_MODS 97# define DISABLE_RGB_MATRIX_ALPHAS_MODS
@@ -120,7 +144,7 @@
120# ifdef OLED_FONT_H 144# ifdef OLED_FONT_H
121# undef OLED_FONT_H 145# undef OLED_FONT_H
122# endif 146# endif
123# define OLED_FONT_H "drashna_font.h" 147# define OLED_FONT_H "drashna_font.h"
124# define OLED_FONT_END 255 148# define OLED_FONT_END 255
125// # define OLED_FONT_5X5 149// # define OLED_FONT_5X5
126// # define OLED_FONT_AZTECH 150// # define OLED_FONT_AZTECH
@@ -143,8 +167,8 @@
143 167
144#ifdef QMK_KEYS_PER_SCAN 168#ifdef QMK_KEYS_PER_SCAN
145# undef QMK_KEYS_PER_SCAN 169# undef QMK_KEYS_PER_SCAN
146# define QMK_KEYS_PER_SCAN 2 170#endif
147#endif // !QMK_KEYS_PER_SCAN 171#define QMK_KEYS_PER_SCAN 4
148 172
149// this makes it possible to do rolling combos (zx) with keys that 173// this makes it possible to do rolling combos (zx) with keys that
150// convert to other keys on hold (z becomes ctrl when you hold it, 174// convert to other keys on hold (z becomes ctrl when you hold it,
@@ -152,9 +176,9 @@
152// actually sends Ctrl-x. That's bad.) 176// actually sends Ctrl-x. That's bad.)
153#define IGNORE_MOD_TAP_INTERRUPT 177#define IGNORE_MOD_TAP_INTERRUPT
154#undef PERMISSIVE_HOLD 178#undef PERMISSIVE_HOLD
155//#define TAPPING_FORCE_HOLD 179//#define TAPPING_FORCE_HOLD_PER_KEY
156//#define RETRO_TAPPING 180//#define RETRO_TAPPING_PER_KEY
157#ifndef KEYBOARD_kyria_rev1 181#if !defined(KEYBOARD_kyria) && !defined(KEYBOARD_splitkb_kyria)
158# define TAPPING_TERM_PER_KEY 182# define TAPPING_TERM_PER_KEY
159#endif 183#endif
160 184
@@ -185,14 +209,16 @@
185# undef LOCKING_RESYNC_ENABLE 209# undef LOCKING_RESYNC_ENABLE
186#endif 210#endif
187 211
212#define LAYER_STATE_16BIT
213
188#ifdef CONVERT_TO_PROTON_C 214#ifdef CONVERT_TO_PROTON_C
189// pins that are available but not present on Pro Micro 215// pins that are available but not present on Pro Micro
190# define A3 PAL_LINE(GPIOA, 3) 216# define A3 PAL_LINE(GPIOA, 3)
191# define A4 PAL_LINE(GPIOA, 4) 217# define A4 PAL_LINE(GPIOA, 4)
192# define A5 PAL_LINE(GPIOA, 5) 218# define A5 PAL_LINE(GPIOA, 5)
193# define A6 PAL_LINE(GPIOA, 6) 219# define A6 PAL_LINE(GPIOA, 6)
194# define A7 PAL_LINE(GPIOA, 7) 220# define A7 PAL_LINE(GPIOA, 7)
195# define A8 PAL_LINE(GPIOA, 8) 221# define A8 PAL_LINE(GPIOA, 8)
196# define A13 PAL_LINE(GPIOA, 13) 222# define A13 PAL_LINE(GPIOA, 13)
197# define A14 PAL_LINE(GPIOA, 14) 223# define A14 PAL_LINE(GPIOA, 14)
198# define A15 PAL_LINE(GPIOA, 15) 224# define A15 PAL_LINE(GPIOA, 15)
@@ -203,3 +229,79 @@
203# define C14 PAL_LINE(GPIOC, 14) 229# define C14 PAL_LINE(GPIOC, 14)
204# define C15 PAL_LINE(GPIOC, 15) 230# define C15 PAL_LINE(GPIOC, 15)
205#endif 231#endif
232
233#ifdef MOUSEKEY_ENABLE
234// mouse movement config
235# ifdef MK_3_SPEED
236# undef MK_3_SPEED
237# endif
238# define MK_KINETIC_SPEED
239# ifdef MK_KINETIC_SPEED
240# ifndef MOUSEKEY_DELAY
241# define MOUSEKEY_DELAY 8
242# endif
243# ifndef MOUSEKEY_INTERVAL
244# define MOUSEKEY_INTERVAL 20
245# endif
246# ifdef MOUSEKEY_MOVE_DELTA
247# define MOUSEKEY_MOVE_DELTA 25
248# endif
249# else
250# ifndef MOUSEKEY_DELAY
251# define MOUSEKEY_DELAY 300
252# endif
253# ifndef MOUSEKEY_INTERVAL
254# define MOUSEKEY_INTERVAL 50
255# endif
256# ifndef MOUSEKEY_MOVE_DELTA
257# define MOUSEKEY_MOVE_DELTA 5
258# endif
259# endif
260# ifndef MOUSEKEY_MAX_SPEED
261# define MOUSEKEY_MAX_SPEED 7
262# endif
263# ifndef MOUSEKEY_TIME_TO_MAX
264# define MOUSEKEY_TIME_TO_MAX 60
265# endif
266# ifndef MOUSEKEY_INITIAL_SPEED
267# define MOUSEKEY_INITIAL_SPEED 100
268# endif
269# ifndef MOUSEKEY_BASE_SPEED
270# define MOUSEKEY_BASE_SPEED 1000
271# endif
272# ifndef MOUSEKEY_DECELERATED_SPEED
273# define MOUSEKEY_DECELERATED_SPEED 400
274# endif
275# ifndef MOUSEKEY_ACCELERATED_SPEED
276# define MOUSEKEY_ACCELERATED_SPEED 3000
277# endif
278// mouse scroll config
279# ifndef MOUSEKEY_WHEEL_DELAY
280# define MOUSEKEY_WHEEL_DELAY 15
281# endif
282# ifndef MOUSEKEY_WHEEL_DELTA
283# define MOUSEKEY_WHEEL_DELTA 1
284# endif
285# ifndef MOUSEKEY_WHEEL_INTERVAL
286# define MOUSEKEY_WHEEL_INTERVAL 50
287# endif
288# ifndef MOUSEKEY_WHEEL_MAX_SPEED
289# define MOUSEKEY_WHEEL_MAX_SPEED 8
290# endif
291# ifndef MOUSEKEY_WHEEL_TIME_TO_MAX
292# define MOUSEKEY_WHEEL_TIME_TO_MAX 80
293# endif
294// mouse scroll kinetic config
295# ifndef MOUSEKEY_WHEEL_INITIAL_MOVEMENTS
296# define MOUSEKEY_WHEEL_INITIAL_MOVEMENTS 8
297# endif
298# ifndef MOUSEKEY_WHEEL_BASE_MOVEMENTS
299# define MOUSEKEY_WHEEL_BASE_MOVEMENTS 48
300# endif
301# ifndef MOUSEKEY_WHEEL_ACCELERATED_MOVEMENTS
302# define MOUSEKEY_WHEEL_ACCELERATED_MOVEMENTS 48
303# endif
304# ifndef MOUSEKEY_WHEEL_DECELERATED_MOVEMENTS
305# define MOUSEKEY_WHEEL_DECELERATED_MOVEMENTS 8
306# endif
307#endif // MOUSEKEY_ENABLE
diff --git a/users/drashna/drashna.c b/users/drashna/drashna.c
index a49373726..4cef5433d 100644
--- a/users/drashna/drashna.c
+++ b/users/drashna/drashna.c
@@ -86,6 +86,9 @@ void keyboard_post_init_user(void) {
86#if defined(RGB_MATRIX_ENABLE) 86#if defined(RGB_MATRIX_ENABLE)
87 keyboard_post_init_rgb_matrix(); 87 keyboard_post_init_rgb_matrix();
88#endif 88#endif
89#if defined(SPLIT_KEYBOARD) && defined(SPLIT_TRANSACTION_IDS_USER)
90 keyboard_post_init_transport_sync();
91#endif
89 keyboard_post_init_keymap(); 92 keyboard_post_init_keymap();
90} 93}
91 94
@@ -120,7 +123,15 @@ void suspend_power_down_user(void) {
120 123
121__attribute__((weak)) void suspend_wakeup_init_keymap(void) {} 124__attribute__((weak)) void suspend_wakeup_init_keymap(void) {}
122 125
123void suspend_wakeup_init_user(void) { suspend_wakeup_init_keymap(); } 126void suspend_wakeup_init_user(void) {
127 if (layer_state_is(_GAMEPAD)) {
128 layer_off(_GAMEPAD);
129 }
130 if (layer_state_is(_DIABLO)) {
131 layer_off(_DIABLO);
132 }
133 suspend_wakeup_init_keymap();
134}
124 135
125__attribute__((weak)) void matrix_scan_keymap(void) {} 136__attribute__((weak)) void matrix_scan_keymap(void) {}
126 137
diff --git a/users/drashna/drashna.h b/users/drashna/drashna.h
index e66f10657..ca849b050 100644
--- a/users/drashna/drashna.h
+++ b/users/drashna/drashna.h
@@ -33,30 +33,52 @@
33# include "oled_stuff.h" 33# include "oled_stuff.h"
34#endif 34#endif
35#if defined(PIMORONI_TRACKBALL_ENABLE) 35#if defined(PIMORONI_TRACKBALL_ENABLE)
36# include "pimoroni_trackball.h" 36# include "drivers/sensors/pimoroni_trackball.h"
37#endif
38#ifdef SPLIT_KEYBOARD
39# include "transport_sync.h"
37#endif 40#endif
38 41
39/* Define layer names */ 42/* Define layer names */
40enum userspace_layers { 43enum userspace_layers {
41 _QWERTY = 0, 44 _QWERTY = 0,
42 _NUMLOCK = 0, 45 _NUMLOCK = 0,
46 FIRST_DEFAULT_LAYER = 0,
47 _COLEMAK_DH,
43 _COLEMAK, 48 _COLEMAK,
44 _DVORAK, 49 _DVORAK,
45 _WORKMAN, 50 LAST_DEFAULT_LAYER = _DVORAK,
46 _NORMAN,
47 _MALTRON,
48 _EUCALYN,
49 _CARPLAX,
50 _GAMEPAD, 51 _GAMEPAD,
51 _DIABLO, 52 _DIABLO,
52 _MACROS, 53 _MOUSE,
53 _MEDIA, 54 _MEDIA,
54 _LOWER, 55 _LOWER,
55 _RAISE, 56 _RAISE,
56 _ADJUST, 57 _ADJUST,
57}; 58};
58 59
59#define _MOUSE _MACROS 60#define _MACROS _MOUSE
61#define _DEFAULT_LAYER_1 FIRST_DEFAULT_LAYER
62#define _DEFAULT_LAYER_2 (FIRST_DEFAULT_LAYER + 1)
63#define _DEFAULT_LAYER_3 (FIRST_DEFAULT_LAYER + 2)
64#define _DEFAULT_LAYER_4 (FIRST_DEFAULT_LAYER + 3)
65#if LAST_DEFAULT_LAYER > (FIRST_DEFAULT_LAYER + 3)
66# define _DEFAULT_LAYER_2 (FIRST_DEFAULT_LAYER + 4)
67# define _DEFAULT_LAYER_3 (FIRST_DEFAULT_LAYER + 5)
68# define _DEFAULT_LAYER_4 (FIRST_DEFAULT_LAYER + 6)
69# define _DEFAULT_LAYER_2 (FIRST_DEFAULT_LAYER + 7)
70# if LAST_DEFAULT_LAYER > (FIRST_DEFAULT_LAYER + 7)
71# define _DEFAULT_LAYER_2 (FIRST_DEFAULT_LAYER + 8)
72# define _DEFAULT_LAYER_3 (FIRST_DEFAULT_LAYER + 9)
73# define _DEFAULT_LAYER_4 (FIRST_DEFAULT_LAYER + 10)
74# define _DEFAULT_LAYER_4 (FIRST_DEFAULT_LAYER + 11)
75# endif
76#endif
77
78#define DEFAULT_LAYER_1_HSV HSV_CYAN
79#define DEFAULT_LAYER_2_HSV HSV_SPRINGGREEN
80#define DEFAULT_LAYER_3_HSV HSV_MAGENTA
81#define DEFAULT_LAYER_4_HSV HSV_GOLDENROD
60 82
61bool mod_key_press_timer(uint16_t code, uint16_t mod_code, bool pressed); 83bool mod_key_press_timer(uint16_t code, uint16_t mod_code, bool pressed);
62bool mod_key_press(uint16_t code, uint16_t mod_code, bool pressed, uint16_t this_timer); 84bool mod_key_press(uint16_t code, uint16_t mod_code, bool pressed, uint16_t this_timer);
diff --git a/users/drashna/drashna_font.h b/users/drashna/drashna_font.h
index 6a3865a44..e9353e62a 100644
--- a/users/drashna/drashna_font.h
+++ b/users/drashna/drashna_font.h
@@ -3,10 +3,14 @@
3// additional fonts from 3// additional fonts from
4// https://github.com/datacute/TinyOLED-Fonts 4// https://github.com/datacute/TinyOLED-Fonts
5 5
6#include "progmem.h" 6#if __has_include("../../../../Documents/qmk/oled_font.h")
7# include "../../../../Documents/qmk/oled_font.h"
8#else
9# include "progmem.h"
7 10
11// clang-format off
8static const unsigned char font[] PROGMEM = { 12static const unsigned char font[] PROGMEM = {
9 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00 0 13 0x07, 0x08, 0x7F, 0x08, 0x07, 0x00, // 0x00 0
10 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, // 0x01 1 14 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, // 0x01 1
11 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00, // 0x02 2 15 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00, // 0x02 2
12 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00, // 0x03 3 ♥ 16 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00, // 0x03 3 ♥
@@ -38,7 +42,7 @@ static const unsigned char font[] PROGMEM = {
38 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, // 0x1D 29 ↭ 42 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, // 0x1D 29 ↭
39 0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, // 0x1E 30 43 0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, // 0x1E 30
40 0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, // 0x1F 31 44 0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, // 0x1F 31
41#if defined(OLED_FONT_5X5) 45# if defined(OLED_FONT_5X5)
42 0x00,0x00,0x00,0x00,0x00,0x00, // 0x20 32 46 0x00,0x00,0x00,0x00,0x00,0x00, // 0x20 32
43 0x5c,0x00,0x00,0x00,0x00,0x00, // 0x21 33 ! 47 0x5c,0x00,0x00,0x00,0x00,0x00, // 0x21 33 !
44 0x06,0x00,0x06,0x00,0x00,0x00, // 0x22 34 " 48 0x06,0x00,0x06,0x00,0x00,0x00, // 0x22 34 "
@@ -135,7 +139,7 @@ static const unsigned char font[] PROGMEM = {
135 0x44,0x7c,0x10,0x00,0x00,0x00, // 0x7D 125 } 139 0x44,0x7c,0x10,0x00,0x00,0x00, // 0x7D 125 }
136 0x02,0x01,0x02,0x01,0x00,0x00, // 0x7E 126 ~ 140 0x02,0x01,0x02,0x01,0x00,0x00, // 0x7E 126 ~
137 0x00,0x00,0x00,0x00,0x00,0x00, // 0x7F 127 141 0x00,0x00,0x00,0x00,0x00,0x00, // 0x7F 127
138#elif defined(OLED_FONT_AZTECH) 142# lif defined(OLED_FONT_AZTECH)
139 0x00,0x00,0x00,0x00,0x00,0x00, // 0x20 32 143 0x00,0x00,0x00,0x00,0x00,0x00, // 0x20 32
140 0x00,0x2e,0x00,0x00,0x00,0x00, // 0x21 33 ! 144 0x00,0x2e,0x00,0x00,0x00,0x00, // 0x21 33 !
141 0x00,0x02,0x00,0x02,0x00,0x00, // 0x22 34 " 145 0x00,0x02,0x00,0x02,0x00,0x00, // 0x22 34 "
@@ -232,7 +236,7 @@ static const unsigned char font[] PROGMEM = {
232 0x22,0x3e,0x08,0x00,0x00,0x00, // 0x7D 125 } 236 0x22,0x3e,0x08,0x00,0x00,0x00, // 0x7D 125 }
233 0x00,0x00,0x00,0x00,0x00,0x00, // 0x7E 126 ~ 237 0x00,0x00,0x00,0x00,0x00,0x00, // 0x7E 126 ~
234 0x00,0x00,0x00,0x00,0x00,0x00, // 0x7F 127 238 0x00,0x00,0x00,0x00,0x00,0x00, // 0x7F 127
235#elif defined(OLED_FONT_BMPLAIN) 239# elif defined(OLED_FONT_BMPLAIN)
236 0x00,0x00,0x00,0x00,0x00,0x00, // 0x20 32 240 0x00,0x00,0x00,0x00,0x00,0x00, // 0x20 32
237 0x2e,0x00,0x00,0x00,0x00,0x00, // 0x21 33 ! 241 0x2e,0x00,0x00,0x00,0x00,0x00, // 0x21 33 !
238 0x03,0x00,0x03,0x00,0x00,0x00, // 0x22 34 " 242 0x03,0x00,0x03,0x00,0x00,0x00, // 0x22 34 "
@@ -329,7 +333,7 @@ static const unsigned char font[] PROGMEM = {
329 0x22,0x3e,0x08,0x00,0x00,0x00, // 0x7D 125 } 333 0x22,0x3e,0x08,0x00,0x00,0x00, // 0x7D 125 }
330 0x01,0x01,0x01,0x00,0x00,0x00, // 0x7E 126 ~ 334 0x01,0x01,0x01,0x00,0x00,0x00, // 0x7E 126 ~
331 0x00,0x00,0x00,0x00,0x00,0x00, // 0x7F 127 335 0x00,0x00,0x00,0x00,0x00,0x00, // 0x7F 127
332#elif defined(OLED_FONT_SUPER_DIGG) 336# elif defined(OLED_FONT_SUPER_DIGG)
333 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x20 32 337 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x20 32
334 0x58, 0x5C, 0x00, 0x00, 0x00, 0x00, // 0x21 33 ! 338 0x58, 0x5C, 0x00, 0x00, 0x00, 0x00, // 0x21 33 !
335 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, // 0x22 34 " 339 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, // 0x22 34 "
@@ -426,7 +430,7 @@ static const unsigned char font[] PROGMEM = {
426 0xC2, 0xFE, 0x10, 0x00, 0x00, 0x00, // 0x7D 125 } 430 0xC2, 0xFE, 0x10, 0x00, 0x00, 0x00, // 0x7D 125 }
427 0x02, 0x01, 0x03, 0x04, 0x06, 0x02, // 0x7E 126 ~ 431 0x02, 0x01, 0x03, 0x04, 0x06, 0x02, // 0x7E 126 ~
428 0x3C, 0x22, 0x21, 0x22, 0x3C, 0x00, // 0x7F 127 432 0x3C, 0x22, 0x21, 0x22, 0x3C, 0x00, // 0x7F 127
429#else // default font 433# else // default font
430 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x20 32 434 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x20 32
431 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, // 0x21 33 ! 435 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, // 0x21 33 !
432 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, // 0x22 34 " 436 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, // 0x22 34 "
@@ -523,9 +527,9 @@ static const unsigned char font[] PROGMEM = {
523 0x00, 0x41, 0x36, 0x08, 0x00, 0x00, // 0x7D 125 } 527 0x00, 0x41, 0x36, 0x08, 0x00, 0x00, // 0x7D 125 }
524 0x02, 0x01, 0x02, 0x04, 0x02, 0x00, // 0x7E 126 ~ 528 0x02, 0x01, 0x02, 0x04, 0x02, 0x00, // 0x7E 126 ~
525 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, // 0x7F 127 529 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, // 0x7F 127
526#endif 530# endif
527 531
528#if defined(OLED_LOGO_GMK_BAD) 532# if defined(OLED_LOGO_GMK_BAD)
529 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x80 533 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x80
530 0x80, 0xC0, 0xE0, 0xF0, 0xF0, 0x70, // 0x81 534 0x80, 0xC0, 0xE0, 0xF0, 0xF0, 0x70, // 0x81
531 0x38, 0x38, 0x38, 0x78, 0x70, 0xF0, // 0x82 535 0x38, 0x38, 0x38, 0x78, 0x70, 0xF0, // 0x82
@@ -654,7 +658,7 @@ static const unsigned char font[] PROGMEM = {
654 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 658 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
655 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 659 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
656 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 660 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
657 #elif defined(OLED_LOGO_HUE_MANITEE) 661# elif defined(OLED_LOGO_HUE_MANITEE)
658 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x80 662 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x80
659 0x00, 0x00, 0x00, 0x80, 0xC0, 0xC0, 663 0x00, 0x00, 0x00, 0x80, 0xC0, 0xC0,
660 0x90, 0x70, 0xE8, 0xA8, 0xE4, 0xC4, 664 0x90, 0x70, 0xE8, 0xA8, 0xE4, 0xC4,
@@ -783,7 +787,7 @@ static const unsigned char font[] PROGMEM = {
783 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 787 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
784 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 788 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
785 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 789 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
786 #elif defined(OLED_LOGO_CORNE) 790# elif defined(OLED_LOGO_CORNE)
787 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x80 791 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x80
788 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 792 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
789 0x00, 0x00, 0x00, 0x00, 0xC0, 0xE0, 793 0x00, 0x00, 0x00, 0x00, 0xC0, 0xE0,
@@ -913,7 +917,7 @@ static const unsigned char font[] PROGMEM = {
913 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 917 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
914 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 918 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
915 919
916#elif defined(OLED_LOGO_GOTHAM) // see /keyboards/crkbd/keymaps/gotham/oled.c 920# elif defined(OLED_LOGO_GOTHAM) // see /keyboards/crkbd/keymaps/gotham/oled.c
917 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x80 921 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x80
918 0x00, 0x00, 0xC0, 0x60, 0x30, 0x18, 922 0x00, 0x00, 0xC0, 0x60, 0x30, 0x18,
919 0xF8, 0x18, 0x00, 0xC0, 0x70, 0x1C, 923 0xF8, 0x18, 0x00, 0xC0, 0x70, 0x1C,
@@ -1042,137 +1046,7 @@ static const unsigned char font[] PROGMEM = {
1042 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 1046 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1043 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 1047 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1044 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 1048 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1045 1049# else
1046#elif defined(OLED_LOGO_SCIFI)
1047 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1048 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1049 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
1050 0x80, 0x80, 0xC0, 0xC0, 0xE0, 0x60,
1051 0x70, 0x30, 0x38, 0x18, 0x0C, 0x0C,
1052 0x1E, 0x0C, 0x80, 0x00, 0x00, 0x00,
1053 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
1054 0xC0, 0xE0, 0xF0, 0x38, 0x1C, 0x0E,
1055 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
1056 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
1057 0x80, 0x80, 0x00, 0x00, 0x00, 0x00,
1058 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1059 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1060 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
1061 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
1062 0x00, 0x00, 0x80, 0x40, 0x00, 0x00,
1063 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1064 0x00, 0x00, 0x80, 0x80, 0x80, 0x00,
1065 0x00, 0x00, 0x00, 0x80, 0x80, 0xC0,
1066 0xC0, 0x60, 0x60, 0x30, 0x10, 0x00,
1067 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1068 0xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC,
1069 0xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00,
1070 0x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E,
1071 0x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00,
1072 0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B,
1073 0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00,
1074 0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE,
1075 0xDE, 0xD7, 0xDC, 0x00, 0xC0, 0x00,
1076 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1077 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1078 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1079 0x00, 0x00, 0x00, 0x00, 0x00, 0x10,
1080 0x30, 0x30, 0x70, 0x78, 0x78, 0x7C,
1081 0x7C, 0x7E, 0x3E, 0x3F, 0x3F, 0x3B,
1082 0x3B, 0x39, 0x39, 0x38, 0x38, 0x38,
1083 0x38, 0x38, 0x38, 0x38, 0x3C, 0x38,
1084 0x18, 0x8F, 0xDF, 0xF8, 0x7C, 0xBE,
1085 0xDF, 0xF7, 0xFB, 0xFD, 0xFE, 0xEF,
1086 0x73, 0x3B, 0x1B, 0x1F, 0xEF, 0xF7,
1087 0xFF, 0x7E, 0x6F, 0x6F, 0x6F, 0x6F,
1088 0x6D, 0xBD, 0xE1, 0xF9, 0x3F, 0x3F,
1089 0x39, 0x79, 0x79, 0x7D, 0xED, 0xED,
1090 0xCD, 0xC7, 0xC7, 0x87, 0xC7, 0xE3,
1091 0xE0, 0xF8, 0x7E, 0x3F, 0x37, 0x33,
1092 0x3B, 0x1B, 0x19, 0x19, 0x0D, 0xED,
1093 0xFF, 0xBF, 0xC7, 0xE7, 0xE3, 0xF0,
1094 0x7C, 0xDE, 0xE7, 0xFB, 0x3E, 0x3F,
1095 0xFC, 0xE0, 0xF8, 0x3E, 0xCF, 0xF3,
1096 0xFC, 0x3F, 0x1F, 0x1F, 0x3C, 0x7E,
1097 0x76, 0xF3, 0xE3, 0x81, 0x01, 0x00,
1098 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1099 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1100 0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F,
1101 0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00,
1102 0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F,
1103 0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00,
1104 0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20,
1105 0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00,
1106 0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F,
1107 0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00,
1108 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1109 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1110 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1111 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1112 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1113 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1114 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1115 0x00, 0x00, 0x20, 0x30, 0x18, 0x1E,
1116 0x0F, 0x03, 0x01, 0x00, 0x00, 0x00,
1117 0x01, 0x03, 0x03, 0x01, 0x00, 0x00,
1118 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1119 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1120 0x00, 0x03, 0x07, 0x00, 0x00, 0x00,
1121 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1122 0x00, 0x01, 0xE1, 0x79, 0x3E, 0x1F,
1123 0x07, 0x01, 0x00, 0x00, 0x00, 0x00,
1124 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
1125 0x01, 0x00, 0x00, 0x01, 0x01, 0x01,
1126 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1127 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
1128 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1129 0x00, 0x00, 0x00, 0x01, 0x01, 0x03,
1130 0x02, 0x06, 0x04, 0x08, 0x18, 0x10,
1131 0x30, 0x20, 0x60, 0x00, 0x00, 0x00,
1132 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1133 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1134 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1135 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1136 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1137 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1138 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1139 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1140 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1141 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1142 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1143 0x00, 0x1C, 0x1C, 0x3E, 0x7F, 0x7F,
1144 0x00, 0x14, 0x08, 0x14, 0x00, 0x00,
1145 0x00, 0x1C, 0x1C, 0x3E, 0x7F, 0x7F,
1146 0x00, 0x22, 0x1C, 0x41, 0x3E, 0x00,
1147 0x00, 0x00, 0x00, 0x30, 0x18, 0x0C,
1148 0x06, 0x0C, 0x18, 0x30, 0x00, 0x00,
1149 0x00, 0x00, 0x06, 0x06, 0x06, 0x0C,
1150 0x18, 0x30, 0x66, 0x66, 0x66, 0x00,
1151 0x00, 0x00, 0x00, 0x08, 0x0C, 0x7E,
1152 0x7F, 0x7E, 0x0C, 0x08, 0x00, 0x00,
1153 0x00, 0x00, 0x77, 0x77, 0x77, 0x00,
1154 0x77, 0x77, 0x77, 0x00, 0x00, 0x00,
1155 0x00, 0x00, 0xE7, 0xA5, 0xFF, 0x24,
1156 0x24, 0xFF, 0xA5, 0xE7, 0x00, 0x00,
1157 0x00, 0x00, 0x1C, 0x22, 0xC9, 0xD1,
1158 0xC9, 0x22, 0x1C, 0x00, 0x00, 0x00,
1159 0x00, 0x10, 0x02, 0x38, 0xFC, 0xED,
1160 0xFC, 0x38, 0x02, 0x10, 0x00, 0x00,
1161 0x00, 0x00, 0x00, 0x3E, 0x4A, 0x4F,
1162 0x4A, 0x3E, 0x00, 0x00, 0x00, 0x00,
1163 0x00, 0x00, 0x40, 0x60, 0x6A, 0x64,
1164 0x6A, 0x60, 0x40, 0x00, 0x00, 0x00,
1165 0x00, 0x04, 0x42, 0x69, 0x65, 0x65,
1166 0x65, 0x69, 0x42, 0x04, 0x00, 0x00,
1167 0x00, 0x00, 0x1C, 0x14, 0x1C, 0x08,
1168 0x18, 0x08, 0x18, 0x00, 0x00, 0x00,
1169 0x00, 0x70, 0xC8, 0xEE, 0xF9, 0x70,
1170 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1171 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1172 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1173 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1174 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
1175#else
1176 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x80 1050 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x80
1177 0x40, 0x40, 0x40, 0xF0, 0xF8, 0xF8, 1051 0x40, 0x40, 0x40, 0xF0, 0xF8, 0xF8,
1178 0xFF, 0x38, 0xFF, 0xF8, 0xF8, 0x3F, 1052 0xFF, 0x38, 0xFF, 0xF8, 0xF8, 0x3F,
@@ -1302,5 +1176,7 @@ static const unsigned char font[] PROGMEM = {
1302 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 1176 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1303 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 1177 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1304 1178
1305#endif 1179# endif
1306 }; 1180 };
1181// clang-format on
1182#endif
diff --git a/users/drashna/drashna_transport.c b/users/drashna/drashna_transport.c
deleted file mode 100644
index 9df11c9bd..000000000
--- a/users/drashna/drashna_transport.c
+++ /dev/null
@@ -1,603 +0,0 @@
1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include <string.h>
18#include <stddef.h>
19
20#include "matrix.h"
21#include QMK_KEYBOARD_H
22
23#define ROWS_PER_HAND (MATRIX_ROWS / 2)
24#define SYNC_TIMER_OFFSET 2
25
26#ifdef RGBLIGHT_ENABLE
27# include "rgblight.h"
28#endif
29
30#ifdef BACKLIGHT_ENABLE
31# include "backlight.h"
32#endif
33
34#ifdef ENCODER_ENABLE
35# include "encoder.h"
36static pin_t encoders_pad[] = ENCODERS_PAD_A;
37# define NUMBER_OF_ENCODERS (sizeof(encoders_pad) / sizeof(pin_t))
38#endif
39
40#ifdef POINTING_DEVICE_ENABLE
41static uint16_t device_cpi = 0;
42static int8_t split_mouse_x = 0, split_mouse_y = 0;
43#endif
44
45#ifdef OLED_DRIVER_ENABLE
46# include "oled_driver.h"
47#endif
48
49#if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
50# include "led_matrix.h"
51#endif
52#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
53# include "rgb_matrix.h"
54#endif
55
56#if defined(USE_I2C)
57
58# include "i2c_master.h"
59# include "i2c_slave.h"
60
61typedef struct _I2C_slave_buffer_t {
62# ifndef DISABLE_SYNC_TIMER
63 uint32_t sync_timer;
64# endif
65# ifdef SPLIT_TRANSPORT_MIRROR
66 matrix_row_t mmatrix[ROWS_PER_HAND];
67# endif
68 matrix_row_t smatrix[ROWS_PER_HAND];
69# ifdef SPLIT_MODS_ENABLE
70 uint8_t real_mods;
71 uint8_t weak_mods;
72# ifndef NO_ACTION_ONESHOT
73 uint8_t oneshot_mods;
74# endif
75# endif
76# ifdef BACKLIGHT_ENABLE
77 uint8_t backlight_level;
78# endif
79# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
80 rgblight_syncinfo_t rgblight_sync;
81# endif
82# ifdef ENCODER_ENABLE
83 uint8_t encoder_state[NUMBER_OF_ENCODERS];
84# endif
85# ifdef WPM_ENABLE
86 uint8_t current_wpm;
87# endif
88# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
89 led_eeconfig_t led_matrix;
90 bool led_suspend_state;
91# endif
92# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
93 rgb_config_t rgb_matrix;
94 bool rgb_suspend_state;
95# endif
96 int8_t mouse_x;
97 int8_t mouse_y;
98 uint16_t device_cpi;
99 bool oled_on;
100 layer_state_t t_layer_state;
101 layer_state_t t_default_layer_state;
102} __attribute__((packed)) I2C_slave_buffer_t;
103
104static I2C_slave_buffer_t *const i2c_buffer = (I2C_slave_buffer_t *)i2c_slave_reg;
105
106# define I2C_BACKLIGHT_START offsetof(I2C_slave_buffer_t, backlight_level)
107# define I2C_RGB_START offsetof(I2C_slave_buffer_t, rgblight_sync)
108# define I2C_KEYMAP_MASTER_START offsetof(I2C_slave_buffer_t, mmatrix)
109# define I2C_KEYMAP_SLAVE_START offsetof(I2C_slave_buffer_t, smatrix)
110# define I2C_SYNC_TIME_START offsetof(I2C_slave_buffer_t, sync_timer)
111# define I2C_REAL_MODS_START offsetof(I2C_slave_buffer_t, real_mods)
112# define I2C_WEAK_MODS_START offsetof(I2C_slave_buffer_t, weak_mods)
113# define I2C_ONESHOT_MODS_START offsetof(I2C_slave_buffer_t, oneshot_mods)
114# define I2C_ENCODER_START offsetof(I2C_slave_buffer_t, encoder_state)
115# define I2C_WPM_START offsetof(I2C_slave_buffer_t, current_wpm)
116# define I2C_MOUSE_X_START offsetof(I2C_slave_buffer_t, mouse_x)
117# define I2C_MOUSE_Y_START offsetof(I2C_slave_buffer_t, mouse_y)
118# define I2C_MOUSE_DPI_START offsetof(I2C_slave_buffer_t, device_cpi)
119# define I2C_OLED_ON_START offsetof(I2C_slave_buffer_t, oled_on)
120# define I2C_LAYER_STATE_START offsetof(I2C_slave_buffer_t, t_layer_state)
121# define I2C_DEFAULT_LAYER_STATE_START offsetof(I2C_slave_buffer_t, t_default_layer_state)
122# define I2C_LED_MATRIX_START offsetof(I2C_slave_buffer_t, led_matrix)
123# define I2C_LED_SUSPEND_START offsetof(I2C_slave_buffer_t, led_suspend_state)
124# define I2C_RGB_MATRIX_START offsetof(I2C_slave_buffer_t, rgb_matrix)
125# define I2C_RGB_SUSPEND_START offsetof(I2C_slave_buffer_t, rgb_suspend_state)
126
127# define TIMEOUT 100
128
129# ifndef SLAVE_I2C_ADDRESS
130# define SLAVE_I2C_ADDRESS 0x32
131# endif
132
133// Get rows from other half over i2c
134bool transport_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
135 i2c_readReg(SLAVE_I2C_ADDRESS, I2C_KEYMAP_SLAVE_START, (void *)slave_matrix, sizeof(i2c_buffer->smatrix), TIMEOUT);
136# ifdef SPLIT_TRANSPORT_MIRROR
137 i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_KEYMAP_MASTER_START, (void *)master_matrix, sizeof(i2c_buffer->mmatrix), TIMEOUT);
138# endif
139 // write backlight info
140# ifdef BACKLIGHT_ENABLE
141 uint8_t level = is_backlight_enabled() ? get_backlight_level() : 0;
142 if (level != i2c_buffer->backlight_level) {
143 if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_BACKLIGHT_START, (void *)&level, sizeof(level), TIMEOUT) >= 0) {
144 i2c_buffer->backlight_level = level;
145 }
146 }
147# endif
148
149# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
150 if (rgblight_get_change_flags()) {
151 rgblight_syncinfo_t rgblight_sync;
152 rgblight_get_syncinfo(&rgblight_sync);
153 if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_RGB_START, (void *)&rgblight_sync, sizeof(rgblight_sync), TIMEOUT) >= 0) {
154 rgblight_clear_change_flags();
155 }
156 }
157# endif
158
159# ifdef ENCODER_ENABLE
160 i2c_readReg(SLAVE_I2C_ADDRESS, I2C_ENCODER_START, (void *)i2c_buffer->encoder_state, sizeof(i2c_buffer->encoder_state), TIMEOUT);
161 encoder_update_raw(i2c_buffer->encoder_state);
162# endif
163
164# ifdef WPM_ENABLE
165 uint8_t current_wpm = get_current_wpm();
166 if (current_wpm != i2c_buffer->current_wpm) {
167 if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_WPM_START, (void *)&current_wpm, sizeof(current_wpm), TIMEOUT) >= 0) {
168 i2c_buffer->current_wpm = current_wpm;
169 }
170 }
171# endif
172
173# ifdef POINTING_DEVICE_ENABLE
174 if (is_keyboard_left()) {
175 report_mouse_t temp_report = pointing_device_get_report();
176 i2c_readReg(SLAVE_I2C_ADDRESS, I2C_MOUSE_X_START, (void *)&i2c_buffer->mouse_x, sizeof(i2c_buffer->mouse_x), TIMEOUT);
177 temp_report.x = i2c_buffer->mouse_x;
178 i2c_readReg(SLAVE_I2C_ADDRESS, I2C_MOUSE_Y_START, (void *)&i2c_buffer->mouse_y, sizeof(i2c_buffer->mouse_y), TIMEOUT);
179 temp_report.y = i2c_buffer->mouse_y;
180 pointing_device_set_report(temp_report);
181
182 if (device_cpi != i2c_buffer->device_cpi) {
183 if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_MOUSE_DPI_START, (void *)&device_cpi, sizeof(device_cpi), TIMEOUT) >= 0) {
184 i2c_buffer->device_cpi = device_cpi
185 }
186 }
187 }
188# endif
189
190# ifdef SPLIT_MODS_ENABLE
191 uint8_t real_mods = get_mods();
192 if (real_mods != i2c_buffer->real_mods) {
193 if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_REAL_MODS_START, (void *)&real_mods, sizeof(real_mods), TIMEOUT) >= 0) {
194 i2c_buffer->real_mods = real_mods;
195 }
196 }
197
198 uint8_t weak_mods = get_weak_mods();
199 if (weak_mods != i2c_buffer->weak_mods) {
200 if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_WEAK_MODS_START, (void *)&weak_mods, sizeof(weak_mods), TIMEOUT) >= 0) {
201 i2c_buffer->weak_mods = weak_mods;
202 }
203 }
204
205# ifndef NO_ACTION_ONESHOT
206 uint8_t oneshot_mods = get_oneshot_mods();
207 if (oneshot_mods != i2c_buffer->oneshot_mods) {
208 if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_ONESHOT_MODS_START, (void *)&oneshot_mods, sizeof(oneshot_mods), TIMEOUT) >= 0) {
209 i2c_buffer->oneshot_mods = oneshot_mods;
210 }
211 }
212# endif
213# endif
214
215 if (layer_state != i2c_buffer->t_layer_state) {
216 if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_LAYER_STATE_START, (void *)&layer_state, sizeof(layer_state), TIMEOUT) >= 0) {
217 i2c_buffer->t_layer_state = layer_state;
218 }
219 }
220
221 if (default_layer_state != i2c_buffer->t_default_layer_state) {
222 if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_DEFAULT_LAYER_STATE_START, (void *)&default_layer_state, sizeof(default_layer_state), TIMEOUT) >= 0) {
223 i2c_buffer->t_default_layer_state = default_layer_state;
224 }
225 }
226
227# ifdef OLED_DRIVER_ENABLE
228 bool is_oled_on = is_oled_on();
229 if (is_oled_on != i2c_buffer->oled_on) {
230 if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_LAYER_STATE_START, (void *)&is_oled_on, sizeof(is_oled_on), TIMEOUT) >= 0) {
231 i2c_buffer->oled_on = is_oled_on;
232 }
233 }
234# endif
235
236# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
237 i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_LED_MATRIX_START, (void *)led_matrix_eeconfig, sizeof(i2c_buffer->led_matrix), TIMEOUT);
238 bool suspend_state = led_matrix_get_suspend_state();
239 i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_LED_SUSPEND_START, (void *)suspend_state, sizeof(i2c_buffer->led_suspend_state), TIMEOUT);
240# endif
241# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
242 i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_RGB_MATRIX_START, (void *)rgb_matrix_config, sizeof(i2c_buffer->rgb_matrix), TIMEOUT);
243 bool suspend_state = rgb_matrix_get_suspend_state();
244 i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_RGB_SUSPEND_START, (void *)suspend_state, sizeof(i2c_buffer->rgb_suspend_state), TIMEOUT);
245# endif
246
247# ifndef DISABLE_SYNC_TIMER
248 i2c_buffer->sync_timer = sync_timer_read32() + SYNC_TIMER_OFFSET;
249 i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_SYNC_TIME_START, (void *)&i2c_buffer->sync_timer, sizeof(i2c_buffer->sync_timer), TIMEOUT);
250# endif
251
252 return true;
253}
254
255void transport_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
256# ifndef DISABLE_SYNC_TIMER
257 sync_timer_update(i2c_buffer->sync_timer);
258# endif
259 // Copy matrix to I2C buffer
260 memcpy((void *)i2c_buffer->smatrix, (void *)slave_matrix, sizeof(i2c_buffer->smatrix));
261# ifdef SPLIT_TRANSPORT_MIRROR
262 memcpy((void *)master_matrix, (void *)i2c_buffer->mmatrix, sizeof(i2c_buffer->mmatrix));
263# endif
264
265// Read Backlight Info
266# ifdef BACKLIGHT_ENABLE
267 backlight_set(i2c_buffer->backlight_level);
268# endif
269
270# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
271 // Update the RGB with the new data
272 if (i2c_buffer->rgblight_sync.status.change_flags != 0) {
273 rgblight_update_sync(&i2c_buffer->rgblight_sync, false);
274 i2c_buffer->rgblight_sync.status.change_flags = 0;
275 }
276# endif
277
278# ifdef ENCODER_ENABLE
279 encoder_state_raw(i2c_buffer->encoder_state);
280# endif
281
282# ifdef WPM_ENABLE
283 set_current_wpm(i2c_buffer->current_wpm);
284# endif
285
286# ifdef POINTING_DEVICE_ENABLE
287 if (!is_keyboard_left()) {
288 static uint16_t cpi;
289 if (cpi != i2c_buffer->device_cpi) {
290 cpi = i2c_buffer->device_cpi;
291 pmw_set_cpi(cpi);
292 }
293 i2c_buffer->mouse_x = split_mouse_x;
294 i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_MOUSE_X_START, (void *)&i2c_buffer->mouse_x, sizeof(i2c_buffer->mouse_x), TIMEOUT);
295 i2c_buffer->mouse_y = split_mouse_y;
296 i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_MOUSE_Y_START, (void *)&i2c_buffer->mouse_y, sizeof(i2c_buffer->mouse_y), TIMEOUT);
297 }
298
299# endif
300
301# ifdef SPLIT_MODS_ENABLE
302 set_mods(i2c_buffer->real_mods);
303 set_weak_mods(i2c_buffer->weak_mods);
304# ifndef NO_ACTION_ONESHOT
305 set_oneshot_mods(i2c_buffer->oneshot_mods);
306# endif
307# endif
308
309 if (layer_state != i2c_buffer->t_layer_state) {
310 layer_state = i2c_buffer->t_layer_state;
311 }
312 if (default_layer_state != i2c_buffer->t_default_layer_state) {
313 default_layer_state = i2c_buffer->t_default_layer_state;
314 }
315
316# ifdef OLED_DRIVER_ENABLE
317 if (i2c_buffer->oled_on) {
318 oled_on();
319 } else {
320 oled_off();
321 }
322# endif
323
324# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
325 memcpy((void *)i2c_buffer->led_matrix, (void *)led_matrix_eeconfig, sizeof(i2c_buffer->led_matrix));
326 led_matrix_set_suspend_state(i2c_buffer->led_suspend_state);
327# endif
328# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
329 memcpy((void *)i2c_buffer->rgb_matrix, (void *)rgb_matrix_config, sizeof(i2c_buffer->rgb_matrix));
330 rgb_matrix_set_suspend_state(i2c_buffer->rgb_suspend_state);
331# endif
332}
333
334void transport_master_init(void) { i2c_init(); }
335
336void transport_slave_init(void) { i2c_slave_init(SLAVE_I2C_ADDRESS); }
337
338#else // USE_SERIAL
339
340# include "serial.h"
341
342typedef struct _Serial_s2m_buffer_t {
343 // TODO: if MATRIX_COLS > 8 change to uint8_t packed_matrix[] for pack/unpack
344 matrix_row_t smatrix[ROWS_PER_HAND];
345# ifdef ENCODER_ENABLE
346 uint8_t encoder_state[NUMBER_OF_ENCODERS];
347# endif
348 int8_t mouse_x;
349 int8_t mouse_y;
350} __attribute__((packed)) Serial_s2m_buffer_t;
351
352typedef struct _Serial_m2s_buffer_t {
353# ifdef SPLIT_MODS_ENABLE
354 uint8_t real_mods;
355 uint8_t weak_mods;
356# ifndef NO_ACTION_ONESHOT
357 uint8_t oneshot_mods;
358# endif
359# endif
360# ifndef DISABLE_SYNC_TIMER
361 uint32_t sync_timer;
362# endif
363# ifdef SPLIT_TRANSPORT_MIRROR
364 matrix_row_t mmatrix[ROWS_PER_HAND];
365# endif
366# ifdef BACKLIGHT_ENABLE
367 uint8_t backlight_level;
368# endif
369# ifdef WPM_ENABLE
370 uint8_t current_wpm;
371# endif
372 uint16_t device_cpi;
373 bool oled_on;
374 layer_state_t t_layer_state;
375 layer_state_t t_default_layer_state;
376# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
377 led_eeconfig_t led_matrix;
378 bool led_suspend_state;
379# endif
380# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
381 rgb_config_t rgb_matrix;
382 bool rgb_suspend_state;
383# endif
384} __attribute__((packed)) Serial_m2s_buffer_t;
385
386# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
387// When MCUs on both sides drive their respective RGB LED chains,
388// it is necessary to synchronize, so it is necessary to communicate RGB
389// information. In that case, define RGBLIGHT_SPLIT with info on the number
390// of LEDs on each half.
391//
392// Otherwise, if the master side MCU drives both sides RGB LED chains,
393// there is no need to communicate.
394
395typedef struct _Serial_rgblight_t {
396 rgblight_syncinfo_t rgblight_sync;
397} Serial_rgblight_t;
398
399volatile Serial_rgblight_t serial_rgblight = {};
400uint8_t volatile status_rgblight = 0;
401# endif
402
403volatile Serial_s2m_buffer_t serial_s2m_buffer = {};
404volatile Serial_m2s_buffer_t serial_m2s_buffer = {};
405uint8_t volatile status0 = 0;
406
407enum serial_transaction_id {
408 GET_SLAVE_MATRIX = 0,
409# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
410 PUT_RGBLIGHT,
411# endif
412};
413
414SSTD_t transactions[] = {
415 [GET_SLAVE_MATRIX] =
416 {
417 (uint8_t *)&status0,
418 sizeof(serial_m2s_buffer),
419 (uint8_t *)&serial_m2s_buffer,
420 sizeof(serial_s2m_buffer),
421 (uint8_t *)&serial_s2m_buffer,
422 },
423# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
424 [PUT_RGBLIGHT] =
425 {
426 (uint8_t *)&status_rgblight, sizeof(serial_rgblight), (uint8_t *)&serial_rgblight, 0, NULL // no slave to master transfer
427 },
428# endif
429};
430
431void transport_master_init(void) { soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); }
432
433void transport_slave_init(void) { soft_serial_target_init(transactions, TID_LIMIT(transactions)); }
434
435# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
436
437// rgblight synchronization information communication.
438
439void transport_rgblight_master(void) {
440 if (rgblight_get_change_flags()) {
441 rgblight_get_syncinfo((rgblight_syncinfo_t *)&serial_rgblight.rgblight_sync);
442 if (soft_serial_transaction(PUT_RGBLIGHT) == TRANSACTION_END) {
443 rgblight_clear_change_flags();
444 }
445 }
446}
447
448void transport_rgblight_slave(void) {
449 if (status_rgblight == TRANSACTION_ACCEPTED) {
450 rgblight_update_sync((rgblight_syncinfo_t *)&serial_rgblight.rgblight_sync, false);
451 status_rgblight = TRANSACTION_END;
452 }
453}
454
455# else
456# define transport_rgblight_master()
457# define transport_rgblight_slave()
458# endif
459
460bool transport_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
461# ifndef SERIAL_USE_MULTI_TRANSACTION
462 if (soft_serial_transaction() != TRANSACTION_END) {
463 return false;
464 }
465# else
466 transport_rgblight_master();
467 if (soft_serial_transaction(GET_SLAVE_MATRIX) != TRANSACTION_END) {
468 return false;
469 }
470# endif
471
472 // TODO: if MATRIX_COLS > 8 change to unpack()
473 for (int i = 0; i < ROWS_PER_HAND; ++i) {
474 slave_matrix[i] = serial_s2m_buffer.smatrix[i];
475# ifdef SPLIT_TRANSPORT_MIRROR
476 serial_m2s_buffer.mmatrix[i] = master_matrix[i];
477# endif
478 }
479
480# ifdef BACKLIGHT_ENABLE
481 // Write backlight level for slave to read
482 serial_m2s_buffer.backlight_level = is_backlight_enabled() ? get_backlight_level() : 0;
483# endif
484
485# ifdef ENCODER_ENABLE
486 encoder_update_raw((uint8_t *)serial_s2m_buffer.encoder_state);
487# endif
488
489# ifdef WPM_ENABLE
490 // Write wpm to slave
491 serial_m2s_buffer.current_wpm = get_current_wpm();
492# endif
493
494# ifdef SPLIT_MODS_ENABLE
495 serial_m2s_buffer.real_mods = get_mods();
496 serial_m2s_buffer.weak_mods = get_weak_mods();
497# ifndef NO_ACTION_ONESHOT
498 serial_m2s_buffer.oneshot_mods = get_oneshot_mods();
499# endif
500# endif
501
502# ifdef POINTING_DEVICE_ENABLE
503 if (is_keyboard_left()) {
504 report_mouse_t temp_report = pointing_device_get_report();
505 temp_report.x = serial_s2m_buffer.mouse_x;
506 temp_report.y = serial_s2m_buffer.mouse_y;
507 pointing_device_set_report(temp_report);
508 serial_m2s_buffer.device_cpi = device_cpi;
509 }
510# endif
511
512 serial_m2s_buffer.t_layer_state = layer_state;
513 serial_m2s_buffer.t_default_layer_state = default_layer_state;
514# ifdef OLED_DRIVER_ENABLE
515 serial_m2s_buffer.oled_on = is_oled_on();
516# endif
517
518# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
519 serial_m2s_buffer.led_matrix = led_matrix_eeconfig;
520 serial_m2s_buffer.led_suspend_state = led_matrix_get_suspend_state();
521# endif
522# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
523 serial_m2s_buffer.rgb_matrix = rgb_matrix_config;
524 serial_m2s_buffer.rgb_suspend_state = rgb_matrix_get_suspend_state();
525# endif
526
527# ifndef DISABLE_SYNC_TIMER
528 serial_m2s_buffer.sync_timer = sync_timer_read32() + SYNC_TIMER_OFFSET;
529# endif
530 return true;
531}
532
533void transport_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
534 transport_rgblight_slave();
535# ifndef DISABLE_SYNC_TIMER
536 sync_timer_update(serial_m2s_buffer.sync_timer);
537# endif
538
539 // TODO: if MATRIX_COLS > 8 change to pack()
540 for (int i = 0; i < ROWS_PER_HAND; ++i) {
541 serial_s2m_buffer.smatrix[i] = slave_matrix[i];
542# ifdef SPLIT_TRANSPORT_MIRROR
543 master_matrix[i] = serial_m2s_buffer.mmatrix[i];
544# endif
545 }
546
547# ifdef BACKLIGHT_ENABLE
548 backlight_set(serial_m2s_buffer.backlight_level);
549# endif
550
551# ifdef ENCODER_ENABLE
552 encoder_state_raw((uint8_t *)serial_s2m_buffer.encoder_state);
553# endif
554
555# ifdef WPM_ENABLE
556 set_current_wpm(serial_m2s_buffer.current_wpm);
557# endif
558
559# ifdef SPLIT_MODS_ENABLE
560 set_mods(serial_m2s_buffer.real_mods);
561 set_weak_mods(serial_m2s_buffer.weak_mods);
562# ifndef NO_ACTION_ONESHOT
563 set_oneshot_mods(serial_m2s_buffer.oneshot_mods);
564# endif
565# endif
566
567# ifdef POINTING_DEVICE_ENABLE
568 if (!is_keyboard_left()) {
569 static uint16_t cpi;
570 if (cpi != serial_m2s_buffer.device_cpi) {
571 cpi = serial_m2s_buffer.device_cpi;
572 pmw_set_cpi(cpi);
573 }
574 serial_s2m_buffer.mouse_x = split_mouse_x;
575 serial_s2m_buffer.mouse_y = split_mouse_y;
576 }
577# endif
578
579 if (layer_state != serial_m2s_buffer.t_layer_state) {
580 layer_state = serial_m2s_buffer.t_layer_state;
581 }
582 if (default_layer_state != serial_m2s_buffer.t_default_layer_state) {
583 default_layer_state = serial_m2s_buffer.t_default_layer_state;
584 }
585# ifdef OLED_DRIVER_ENABLE
586 if (serial_m2s_buffer.oled_on) {
587 oled_on();
588 } else {
589 oled_off();
590 }
591# endif
592
593# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
594 led_matrix_eeconfig = serial_m2s_buffer.led_matrix;
595 led_matrix_set_suspend_state(serial_m2s_buffer.led_suspend_state);
596# endif
597# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
598 rgb_matrix_config = serial_m2s_buffer.rgb_matrix;
599 rgb_matrix_set_suspend_state(serial_m2s_buffer.rgb_suspend_state);
600# endif
601}
602
603#endif
diff --git a/users/drashna/oled_stuff.c b/users/drashna/oled_stuff.c
index 98e467d93..103b1fc7a 100644
--- a/users/drashna/oled_stuff.c
+++ b/users/drashna/oled_stuff.c
@@ -25,7 +25,7 @@
25#endif 25#endif
26 26
27uint32_t oled_timer = 0; 27uint32_t oled_timer = 0;
28static char keylog_str[KEYLOGGER_LENGTH + 1] = {"\n"}; 28static char keylog_str[KEYLOGGER_LENGTH + 1] = {0};
29static uint16_t log_timer = 0; 29static uint16_t log_timer = 0;
30 30
31// clang-format off 31// clang-format off
@@ -57,12 +57,12 @@ void add_keylog(uint16_t keycode) {
57 keycode = 0; 57 keycode = 0;
58 } 58 }
59 59
60 for (uint8_t i = (KEYLOGGER_LENGTH - 1); i > 0; --i) { 60 for (uint8_t i = 1; i < KEYLOGGER_LENGTH; i++) {
61 keylog_str[i] = keylog_str[i - 1]; 61 keylog_str[i - 1] = keylog_str[i];
62 } 62 }
63 63
64 if (keycode < (sizeof(code_to_name) / sizeof(char))) { 64 if (keycode < (sizeof(code_to_name) / sizeof(char))) {
65 keylog_str[0] = pgm_read_byte(&code_to_name[keycode]); 65 keylog_str[(KEYLOGGER_LENGTH - 1)] = pgm_read_byte(&code_to_name[keycode]);
66 } 66 }
67 67
68 log_timer = timer_read(); 68 log_timer = timer_read();
@@ -95,27 +95,15 @@ void render_default_layer_state(void) {
95 case _QWERTY: 95 case _QWERTY:
96 oled_write_P(PSTR(OLED_RENDER_LAYOUT_QWERTY), false); 96 oled_write_P(PSTR(OLED_RENDER_LAYOUT_QWERTY), false);
97 break; 97 break;
98 case _COLEMAK_DH:
99 oled_write_P(PSTR(OLED_RENDER_LAYOUT_COLEMAK_DH), false);
100 break;
98 case _COLEMAK: 101 case _COLEMAK:
99 oled_write_P(PSTR(OLED_RENDER_LAYOUT_COLEMAK), false); 102 oled_write_P(PSTR(OLED_RENDER_LAYOUT_COLEMAK), false);
100 break; 103 break;
101 case _DVORAK: 104 case _DVORAK:
102 oled_write_P(PSTR(OLED_RENDER_LAYOUT_DVORAK), false); 105 oled_write_P(PSTR(OLED_RENDER_LAYOUT_DVORAK), false);
103 break; 106 break;
104 case _WORKMAN:
105 oled_write_P(PSTR(OLED_RENDER_LAYOUT_WORKMAN), false);
106 break;
107 case _NORMAN:
108 oled_write_P(PSTR(OLED_RENDER_LAYOUT_NORMAN), false);
109 break;
110 case _MALTRON:
111 oled_write_P(PSTR(OLED_RENDER_LAYOUT_MALTRON), false);
112 break;
113 case _EUCALYN:
114 oled_write_P(PSTR(OLED_RENDER_LAYOUT_EUCALYN), false);
115 break;
116 case _CARPLAX:
117 oled_write_P(PSTR(OLED_RENDER_LAYOUT_CARPLAX), false);
118 break;
119 } 107 }
120#ifdef OLED_DISPLAY_128X64 108#ifdef OLED_DISPLAY_128X64
121 oled_advance_page(true); 109 oled_advance_page(true);
@@ -153,18 +141,16 @@ void render_keylock_status(uint8_t led_usb_state) {
153 oled_write_P(PSTR(OLED_RENDER_LOCK_CAPS), led_usb_state & (1 << USB_LED_CAPS_LOCK)); 141 oled_write_P(PSTR(OLED_RENDER_LOCK_CAPS), led_usb_state & (1 << USB_LED_CAPS_LOCK));
154 oled_write_P(PSTR(" "), false); 142 oled_write_P(PSTR(" "), false);
155 oled_write_P(PSTR(OLED_RENDER_LOCK_SCLK), led_usb_state & (1 << USB_LED_SCROLL_LOCK)); 143 oled_write_P(PSTR(OLED_RENDER_LOCK_SCLK), led_usb_state & (1 << USB_LED_SCROLL_LOCK));
156#ifndef OLED_DISPLAY_128X64
157 oled_advance_page(true);
158#endif
159} 144}
145
160void render_matrix_scan_rate(void) { 146void render_matrix_scan_rate(void) {
161#ifdef DEBUG_MATRIX_SCAN_RATE 147#ifdef DEBUG_MATRIX_SCAN_RATE
162 char matrix_rate[5]; 148 char matrix_rate[5];
163 uint16_t n = get_matrix_scan_rate(); 149 uint16_t n = get_matrix_scan_rate();
164 matrix_rate[4] = '\0'; 150 matrix_rate[4] = '\0';
165 matrix_rate[3] = '0' + n % 10; 151 matrix_rate[3] = '0' + n % 10;
166 matrix_rate[2] = ( n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' '; 152 matrix_rate[2] = (n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' ';
167 matrix_rate[1] = n / 10 ? '0' + n / 10 : ' '; 153 matrix_rate[1] = n / 10 ? '0' + n / 10 : ' ';
168 matrix_rate[0] = ' '; 154 matrix_rate[0] = ' ';
169 oled_write_P(PSTR("MS:"), false); 155 oled_write_P(PSTR("MS:"), false);
170 oled_write(matrix_rate, false); 156 oled_write(matrix_rate, false);
@@ -284,6 +270,10 @@ void render_user_status(void) {
284 oled_write_P(rgb_layer_status[userspace_config.rgb_layer_change], false); 270 oled_write_P(rgb_layer_status[userspace_config.rgb_layer_change], false);
285 static const char PROGMEM nukem_good[2][3] = {{0xF8, 0xF9, 0}, {0xF6, 0xF7, 0}}; 271 static const char PROGMEM nukem_good[2][3] = {{0xF8, 0xF9, 0}, {0xF6, 0xF7, 0}};
286 oled_write_P(nukem_good[0], userspace_config.nuke_switch); 272 oled_write_P(nukem_good[0], userspace_config.nuke_switch);
273#if defined(UNICODE_ENABLE)
274 static const char PROGMEM uc_mod_status[5][3] = {{0xEA, 0xEB, 0}, {0xEC, 0xED, 0}};
275 oled_write_P(uc_mod_status[get_unicode_input_mode() == UC_MAC], false);
276#endif
287#if defined(OLED_DISPLAY_128X64) 277#if defined(OLED_DISPLAY_128X64)
288 oled_advance_page(true); 278 oled_advance_page(true);
289#endif 279#endif
@@ -306,34 +296,33 @@ void render_wpm(void) {
306 char wpm_counter[4]; 296 char wpm_counter[4];
307 wpm_counter[3] = '\0'; 297 wpm_counter[3] = '\0';
308 wpm_counter[2] = '0' + n % 10; 298 wpm_counter[2] = '0' + n % 10;
309 wpm_counter[1] = ( n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' '; 299 wpm_counter[1] = (n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' ';
310 wpm_counter[0] = n / 10 ? '0' + n / 10 : ' '; 300 wpm_counter[0] = n / 10 ? '0' + n / 10 : ' ';
311# else 301# else
312 char wpm_counter[6]; 302 char wpm_counter[6];
313 wpm_counter[5] = '\0'; 303 wpm_counter[5] = '\0';
314 wpm_counter[4] = '0' + n % 10; 304 wpm_counter[4] = '0' + n % 10;
315 wpm_counter[3] = ( n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' '; 305 wpm_counter[3] = (n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' ';
316 wpm_counter[2] = n / 10 ? '0' + n / 10 : ' '; 306 wpm_counter[2] = n / 10 ? '0' + n / 10 : ' ';
317 wpm_counter[1] = ' '; 307 wpm_counter[1] = ' ';
318 wpm_counter[0] = ' '; 308 wpm_counter[0] = ' ';
319 # endif 309# endif
320 oled_write_P(PSTR(OLED_RENDER_WPM_COUNTER), false); 310 oled_write_P(PSTR(OLED_RENDER_WPM_COUNTER), false);
321 oled_write(wpm_counter, false); 311 oled_write(wpm_counter, false);
322#endif 312#endif
323} 313}
324 314
325#ifdef KEYBOARD_handwired_dactyl_manuform_5x6_right_trackball 315#if defined(KEYBOARD_handwired_tractyl_manuform_5x6_right)
326extern keyboard_config_t keyboard_config;
327extern uint16_t dpi_array[];
328 316
317extern kb_runtime_config_t kb_state;
329void render_pointing_dpi_status(void) { 318void render_pointing_dpi_status(void) {
330 char dpi_status[6]; 319 char dpi_status[6];
331 uint16_t n = dpi_array[keyboard_config.dpi_config]; 320 uint16_t n = kb_state.device_cpi;
332 dpi_status[5] = '\0'; 321 dpi_status[5] = '\0';
333 dpi_status[4] = '0' + n % 10; 322 dpi_status[4] = '0' + n % 10;
334 dpi_status[3] = ( n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' '; 323 dpi_status[3] = (n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' ';
335 dpi_status[2] = ( n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' '; 324 dpi_status[2] = (n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' ';
336 dpi_status[1] = n / 10 ? '0' + n / 10 : ' '; 325 dpi_status[1] = n / 10 ? '0' + n / 10 : ' ';
337 dpi_status[0] = ' '; 326 dpi_status[0] = ' ';
338 oled_write_P(PSTR(" DPI: "), false); 327 oled_write_P(PSTR(" DPI: "), false);
339 oled_write(dpi_status, false); 328 oled_write(dpi_status, false);
@@ -348,8 +337,10 @@ void render_status_secondary(void) {
348 render_default_layer_state(); 337 render_default_layer_state();
349 render_layer_state(); 338 render_layer_state();
350 render_mod_status(get_mods() | get_oneshot_mods()); 339 render_mod_status(get_mods() | get_oneshot_mods());
351 // render_keylogger_status(); 340#if !defined(OLED_DISPLAY_128X64) && defined(WPM_ENABLE)
352 render_keylock_status(host_keyboard_leds()); 341 render_wpm();
342#endif
343 // render_keylock_status(host_keyboard_leds());
353} 344}
354 345
355void render_status_main(void) { 346void render_status_main(void) {
@@ -357,10 +348,10 @@ void render_status_main(void) {
357 oled_driver_render_logo(); 348 oled_driver_render_logo();
358# ifdef DEBUG_MATRIX_SCAN_RATE 349# ifdef DEBUG_MATRIX_SCAN_RATE
359 render_matrix_scan_rate(); 350 render_matrix_scan_rate();
360# else 351# elif defined(WPM_ENABLE)
361 render_wpm(); 352 render_wpm();
362# endif 353# endif
363# ifdef KEYBOARD_handwired_dactyl_manuform_5x6_right_trackball 354# if defined(KEYBOARD_handwired_tractyl_manuform_5x6_right)
364 render_pointing_dpi_status(); 355 render_pointing_dpi_status();
365# endif 356# endif
366 oled_write_P(PSTR("\n"), false); 357 oled_write_P(PSTR("\n"), false);
@@ -372,7 +363,16 @@ void render_status_main(void) {
372 render_bootmagic_status(); 363 render_bootmagic_status();
373 render_user_status(); 364 render_user_status();
374 365
375 render_keylogger_status(); 366 // render_keylogger_status();
367}
368
369__attribute__((weak)) oled_rotation_t oled_init_keymap(oled_rotation_t rotation) { return rotation; }
370
371oled_rotation_t oled_init_user(oled_rotation_t rotation) {
372 for (uint8_t i = 0; i < (KEYLOGGER_LENGTH - 1); i++) {
373 add_keylog(0);
374 }
375 return oled_init_keymap(rotation);
376} 376}
377 377
378void oled_task_user(void) { 378void oled_task_user(void) {
@@ -385,8 +385,15 @@ void oled_task_user(void) {
385 } else { 385 } else {
386 oled_on(); 386 oled_on();
387 } 387 }
388 }
389 if (is_keyboard_left()) {
388 render_status_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) 390 render_status_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc)
389 } else { 391 } else {
390 render_status_secondary(); 392 render_status_secondary();
391 } 393 }
394 if (is_keyboard_master()) {
395 render_keylogger_status();
396 } else {
397 render_keylock_status(host_keyboard_leds());
398 }
392} 399}
diff --git a/users/drashna/oled_stuff.h b/users/drashna/oled_stuff.h
index 1f4440bd4..bba3f39cb 100644
--- a/users/drashna/oled_stuff.h
+++ b/users/drashna/oled_stuff.h
@@ -19,97 +19,100 @@
19#include "quantum.h" 19#include "quantum.h"
20#include "oled_driver.h" 20#include "oled_driver.h"
21 21
22void oled_driver_render_logo(void); 22void oled_driver_render_logo(void);
23bool process_record_user_oled(uint16_t keycode, keyrecord_t *record); 23bool process_record_user_oled(uint16_t keycode, keyrecord_t *record);
24oled_rotation_t oled_init_keymap(oled_rotation_t rotation);
24extern uint32_t oled_timer; 25extern uint32_t oled_timer;
25 26
26#ifdef OLED_DISPLAY_128X64 27#ifdef OLED_DISPLAY_128X64
27# define OLED_RENDER_KEYLOGGER "Keylogger: " 28# define OLED_RENDER_KEYLOGGER "Keylogger: "
28 29
29# define OLED_RENDER_LAYOUT_NAME "Layout: " 30# define OLED_RENDER_LAYOUT_NAME "Layout: "
30# define OLED_RENDER_LAYOUT_QWERTY "Qwerty" 31# define OLED_RENDER_LAYOUT_QWERTY "Qwerty"
31# define OLED_RENDER_LAYOUT_COLEMAK "Colemak" 32# define OLED_RENDER_LAYOUT_COLEMAK_DH "Colemak-DH"
32# define OLED_RENDER_LAYOUT_DVORAK "Dvorak" 33# define OLED_RENDER_LAYOUT_COLEMAK "Colemak"
33# define OLED_RENDER_LAYOUT_WORKMAN "Workman" 34# define OLED_RENDER_LAYOUT_DVORAK "Dvorak"
34# define OLED_RENDER_LAYOUT_NORMAN "Norman" 35# define OLED_RENDER_LAYOUT_WORKMAN "Workman"
35# define OLED_RENDER_LAYOUT_MALTRON "Matron" 36# define OLED_RENDER_LAYOUT_NORMAN "Norman"
36# define OLED_RENDER_LAYOUT_EUCALYN "Eucalyn" 37# define OLED_RENDER_LAYOUT_MALTRON "Matron"
37# define OLED_RENDER_LAYOUT_CARPLAX "Carplax" 38# define OLED_RENDER_LAYOUT_EUCALYN "Eucalyn"
38 39# define OLED_RENDER_LAYOUT_CARPLAX "Carplax"
39# define OLED_RENDER_LAYER_NAME "Layer:" 40
40# define OLED_RENDER_LAYER_LOWER "Lower" 41# define OLED_RENDER_LAYER_NAME "Layer:"
41# define OLED_RENDER_LAYER_RAISE "Raise" 42# define OLED_RENDER_LAYER_LOWER "Lower"
42# define OLED_RENDER_LAYER_ADJUST "Adjust" 43# define OLED_RENDER_LAYER_RAISE "Raise"
43# define OLED_RENDER_LAYER_MODS "Mods" 44# define OLED_RENDER_LAYER_ADJUST "Adjust"
44 45# define OLED_RENDER_LAYER_MODS "Mods"
45# define OLED_RENDER_LOCK_NAME "Lock: " 46
46# define OLED_RENDER_LOCK_NUML "NUML" 47# define OLED_RENDER_LOCK_NAME "Lock: "
47# define OLED_RENDER_LOCK_CAPS "CAPS" 48# define OLED_RENDER_LOCK_NUML "NUML"
48# define OLED_RENDER_LOCK_SCLK "SCLK" 49# define OLED_RENDER_LOCK_CAPS "CAPS"
49 50# define OLED_RENDER_LOCK_SCLK "SCLK"
50# define OLED_RENDER_MODS_NAME "Mods:" 51
51# define OLED_RENDER_MODS_SFT "Sft" 52# define OLED_RENDER_MODS_NAME "Mods:"
52# define OLED_RENDER_MODS_CTL "Ctl" 53# define OLED_RENDER_MODS_SFT "Sft"
53# define OLED_RENDER_MODS_ALT "Alt" 54# define OLED_RENDER_MODS_CTL "Ctl"
54# define OLED_RENDER_MODS_GUI "GUI" 55# define OLED_RENDER_MODS_ALT "Alt"
55 56# define OLED_RENDER_MODS_GUI "GUI"
56# define OLED_RENDER_BOOTMAGIC_NAME "Boot " 57
57# define OLED_RENDER_BOOTMAGIC_NKRO "NKRO" 58# define OLED_RENDER_BOOTMAGIC_NAME "Boot "
58# define OLED_RENDER_BOOTMAGIC_NOGUI "nGUI" 59# define OLED_RENDER_BOOTMAGIC_NKRO "NKRO"
59# define OLED_RENDER_BOOTMAGIC_GRV "GRV" 60# define OLED_RENDER_BOOTMAGIC_NOGUI "nGUI"
61# define OLED_RENDER_BOOTMAGIC_GRV "GRV"
60# define OLED_RENDER_BOOTMAGIC_ONESHOT "1SHT" 62# define OLED_RENDER_BOOTMAGIC_ONESHOT "1SHT"
61# define OLED_RENDER_BOOTMAGIC_SWAP "SWAP" 63# define OLED_RENDER_BOOTMAGIC_SWAP "SWAP"
62# define OLED_RENDER_BOOTMAGIC_CAPS "CAPS" 64# define OLED_RENDER_BOOTMAGIC_CAPS "CAPS"
63 65
64# define OLED_RENDER_USER_NAME "USER:" 66# define OLED_RENDER_USER_NAME "USER:"
65# define OLED_RENDER_USER_ANIM "Anim" 67# define OLED_RENDER_USER_ANIM "Anim"
66# define OLED_RENDER_USER_LAYR "Layr" 68# define OLED_RENDER_USER_LAYR "Layr"
67# define OLED_RENDER_USER_NUKE "Nuke" 69# define OLED_RENDER_USER_NUKE "Nuke"
68 70
69# define OLED_RENDER_WPM_COUNTER "WPM: " 71# define OLED_RENDER_WPM_COUNTER "WPM: "
70#else 72#else
71# define OLED_RENDER_KEYLOGGER "KLogr" 73# define OLED_RENDER_KEYLOGGER "KLogr"
72 74
73# define OLED_RENDER_LAYOUT_NAME "Lyout" 75# define OLED_RENDER_LAYOUT_NAME "Lyout"
74# define OLED_RENDER_LAYOUT_QWERTY " QRTY" 76# define OLED_RENDER_LAYOUT_QWERTY " QRTY"
75# define OLED_RENDER_LAYOUT_COLEMAK " COLE" 77# define OLED_RENDER_LAYOUT_COLEMAK_DH " cmDH"
76# define OLED_RENDER_LAYOUT_DVORAK " DVRK" 78# define OLED_RENDER_LAYOUT_COLEMAK " COLE"
77# define OLED_RENDER_LAYOUT_WORKMAN " WKMN" 79# define OLED_RENDER_LAYOUT_DVORAK " DVRK"
78# define OLED_RENDER_LAYOUT_NORMAN " NORM" 80# define OLED_RENDER_LAYOUT_WORKMAN " WKMN"
79# define OLED_RENDER_LAYOUT_MALTRON " MLTN" 81# define OLED_RENDER_LAYOUT_NORMAN " NORM"
80# define OLED_RENDER_LAYOUT_EUCALYN " ECLN" 82# define OLED_RENDER_LAYOUT_MALTRON " MLTN"
81# define OLED_RENDER_LAYOUT_CARPLAX " CRPX" 83# define OLED_RENDER_LAYOUT_EUCALYN " ECLN"
82 84# define OLED_RENDER_LAYOUT_CARPLAX " CRPX"
83# define OLED_RENDER_LAYER_NAME "LAYER" 85
84# define OLED_RENDER_LAYER_LOWER "Lower" 86# define OLED_RENDER_LAYER_NAME "LAYER"
85# define OLED_RENDER_LAYER_RAISE "Raise" 87# define OLED_RENDER_LAYER_LOWER "Lower"
86# define OLED_RENDER_LAYER_ADJUST "Adjst" 88# define OLED_RENDER_LAYER_RAISE "Raise"
87# define OLED_RENDER_LAYER_MODS " Mods" 89# define OLED_RENDER_LAYER_ADJUST "Adjst"
88 90# define OLED_RENDER_LAYER_MODS " Mods"
89# define OLED_RENDER_LOCK_NAME "Lock:" 91
90# define OLED_RENDER_LOCK_NUML "NumL" 92# define OLED_RENDER_LOCK_NAME "Lock:"
91# define OLED_RENDER_LOCK_CAPS "CapL" 93# define OLED_RENDER_LOCK_NUML "NumL"
92# define OLED_RENDER_LOCK_SCLK "ScrL" 94# define OLED_RENDER_LOCK_CAPS "CapL"
93 95# define OLED_RENDER_LOCK_SCLK "ScrL"
94# define OLED_RENDER_MODS_NAME "Mods: " 96
95# define OLED_RENDER_MODS_SFT "Shft" 97# define OLED_RENDER_MODS_NAME "Mods: "
96# define OLED_RENDER_MODS_CTL "Ctrl" 98# define OLED_RENDER_MODS_SFT "Shft"
97# define OLED_RENDER_MODS_ALT "Alt\n" 99# define OLED_RENDER_MODS_CTL "Ctrl"
98# define OLED_RENDER_MODS_GUI "GUI\n" 100# define OLED_RENDER_MODS_ALT "Alt\n"
99 101# define OLED_RENDER_MODS_GUI "GUI\n"
100# define OLED_RENDER_BOOTMAGIC_NAME "BTMGK" 102
101# define OLED_RENDER_BOOTMAGIC_NKRO "NKRO" 103# define OLED_RENDER_BOOTMAGIC_NAME "BTMGK"
102# define OLED_RENDER_BOOTMAGIC_NOGUI "nGUI" 104# define OLED_RENDER_BOOTMAGIC_NKRO "NKRO"
103# define OLED_RENDER_BOOTMAGIC_GRV "GRV" 105# define OLED_RENDER_BOOTMAGIC_NOGUI "nGUI"
106# define OLED_RENDER_BOOTMAGIC_GRV "GRV"
104# define OLED_RENDER_BOOTMAGIC_ONESHOT "1SHT" 107# define OLED_RENDER_BOOTMAGIC_ONESHOT "1SHT"
105# define OLED_RENDER_BOOTMAGIC_SWAP "SWAP" 108# define OLED_RENDER_BOOTMAGIC_SWAP "SWAP"
106# define OLED_RENDER_BOOTMAGIC_CAPS "CAPS" 109# define OLED_RENDER_BOOTMAGIC_CAPS "CAPS"
107 110
108# define OLED_RENDER_USER_NAME "USER:" 111# define OLED_RENDER_USER_NAME "USER:"
109# define OLED_RENDER_USER_ANIM "Anim" 112# define OLED_RENDER_USER_ANIM "Anim"
110# define OLED_RENDER_USER_LAYR "Layr" 113# define OLED_RENDER_USER_LAYR "Layr"
111# define OLED_RENDER_USER_NUKE "Nuke" 114# define OLED_RENDER_USER_NUKE "Nuke"
112 115
113# define OLED_RENDER_WPM_COUNTER "WPM: " 116# define OLED_RENDER_WPM_COUNTER "WPM: "
114 117
115#endif 118#endif
diff --git a/users/drashna/pimoroni_trackball.c b/users/drashna/pimoroni_trackball.c
deleted file mode 100644
index a6ca6c996..000000000
--- a/users/drashna/pimoroni_trackball.c
+++ /dev/null
@@ -1,151 +0,0 @@
1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include "pimoroni_trackball.h"
18#include "i2c_master.h"
19
20static uint8_t scrolling = 0;
21static int16_t x_offset = 0;
22static int16_t y_offset = 0;
23static int16_t h_offset = 0;
24static int16_t v_offset = 0;
25static float precisionSpeed = 1;
26
27#ifndef I2C_TIMEOUT
28# define I2C_TIMEOUT 100
29#endif
30#ifndef MOUSE_DEBOUNCE
31# define MOUSE_DEBOUNCE 5
32#endif
33
34void trackball_set_rgbw(uint8_t red, uint8_t green, uint8_t blue, uint8_t white) {
35 uint8_t data[] = {0x00, red, green, blue, white};
36 i2c_transmit(TRACKBALL_ADDRESS << 1, data, sizeof(data), I2C_TIMEOUT);
37}
38
39int16_t mouse_offset(uint8_t positive, uint8_t negative, int16_t scale) {
40 int16_t offset = (int16_t)positive - (int16_t)negative;
41 int16_t magnitude = (int16_t)(scale * offset * offset * precisionSpeed);
42 return offset < 0 ? -magnitude : magnitude;
43}
44
45void update_member(int8_t* member, int16_t* offset) {
46 if (*offset > 127) {
47 *member = 127;
48 *offset -= 127;
49 } else if (*offset < -127) {
50 *member = -127;
51 *offset += 127;
52 } else {
53 *member = *offset;
54 *offset = 0;
55 }
56}
57
58__attribute__((weak)) void trackball_check_click(bool pressed, report_mouse_t* mouse) {
59 if (pressed) {
60 mouse->buttons |= MOUSE_BTN1;
61 } else {
62 mouse->buttons &= ~MOUSE_BTN1;
63 }
64}
65
66void trackball_register_button(bool pressed, enum mouse_buttons button) {
67 report_mouse_t currentReport = pointing_device_get_report();
68 if (pressed) {
69 currentReport.buttons |= button;
70 } else {
71 currentReport.buttons &= ~button;
72 }
73 pointing_device_set_report(currentReport);
74}
75
76float trackball_get_precision(void) { return precisionSpeed; }
77void trackball_set_precision(float precision) { precisionSpeed = precision; }
78bool trackball_is_scrolling(void) { return scrolling; }
79void trackball_set_scrolling(bool scroll) { scrolling = scroll; }
80
81bool has_report_changed (report_mouse_t first, report_mouse_t second) {
82 return !(
83 (!first.buttons && first.buttons == second.buttons) &&
84 (!first.x && first.x == second.x) &&
85 (!first.y && first.y == second.y) &&
86 (!first.h && first.h == second.h) &&
87 (!first.v && first.v == second.v) );
88}
89
90
91__attribute__((weak)) void pointing_device_init(void) { trackball_set_rgbw(0x00, 0x00, 0x00, 0x4F); }
92
93void pointing_device_task(void) {
94 static bool debounce;
95 static uint16_t debounce_timer;
96 uint8_t state[5] = {};
97 if (i2c_readReg(TRACKBALL_ADDRESS << 1, 0x04, state, 5, I2C_TIMEOUT) == I2C_STATUS_SUCCESS) {
98 if (!state[4] && !debounce) {
99 if (scrolling) {
100#ifdef PIMORONI_TRACKBALL_INVERT_X
101 h_offset += mouse_offset(state[2], state[3], 1);
102#else
103 h_offset -= mouse_offset(state[2], state[3], 1);
104#endif
105#ifdef PIMORONI_TRACKBALL_INVERT_Y
106 v_offset += mouse_offset(state[1], state[0], 1);
107#else
108 v_offset -= mouse_offset(state[1], state[0], 1);
109#endif
110 } else {
111#ifdef PIMORONI_TRACKBALL_INVERT_X
112 x_offset -= mouse_offset(state[2], state[3], 5);
113#else
114 x_offset += mouse_offset(state[2], state[3], 5);
115#endif
116#ifdef PIMORONI_TRACKBALL_INVERT_Y
117 y_offset -= mouse_offset(state[1], state[0], 5);
118#else
119 y_offset += mouse_offset(state[1], state[0], 5);
120#endif
121 }
122 } else {
123 if (state[4]) {
124 debounce = true;
125 debounce_timer = timer_read();
126 }
127 }
128 }
129
130 if (timer_elapsed(debounce_timer) > MOUSE_DEBOUNCE) debounce = false;
131
132 report_mouse_t mouse = pointing_device_get_report();
133
134 trackball_check_click(state[4] & (1 << 7), &mouse);
135
136#ifndef PIMORONI_TRACKBALL_ROTATE
137 update_member(&mouse.x, &x_offset);
138 update_member(&mouse.y, &y_offset);
139 update_member(&mouse.h, &h_offset);
140 update_member(&mouse.v, &v_offset);
141#else
142 update_member(&mouse.x, &y_offset);
143 update_member(&mouse.y, &x_offset);
144 update_member(&mouse.h, &v_offset);
145 update_member(&mouse.v, &h_offset);
146#endif
147 pointing_device_set_report(mouse);
148 if (has_report_changed(mouse, pointing_device_get_report())) {
149 pointing_device_send();
150 }
151}
diff --git a/users/drashna/process_records.c b/users/drashna/process_records.c
index ef901226e..1e6ecc1d6 100644
--- a/users/drashna/process_records.c
+++ b/users/drashna/process_records.c
@@ -46,15 +46,20 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
46 } 46 }
47 47
48 switch (keycode) { 48 switch (keycode) {
49 case KC_QWERTY ... KC_WORKMAN: 49 case FIRST_DEFAULT_LAYER_KEYCODE ... LAST_DEFAULT_LAYER_KEYCODE:
50 if (record->event.pressed) { 50 if (record->event.pressed) {
51 uint8_t mods = mod_config(get_mods() | get_oneshot_mods()); 51 uint8_t mods = mod_config(get_mods() | get_oneshot_mods());
52 if (!mods) { 52 if (!mods) {
53 set_single_persistent_default_layer(keycode - KC_QWERTY); 53 set_single_persistent_default_layer(keycode - FIRST_DEFAULT_LAYER_KEYCODE);
54#if LAST_DEFAULT_LAYER_KEYCODE > (FIRST_DEFAULT_LAYER_KEYCODE + 3)
54 } else if (mods & MOD_MASK_SHIFT) { 55 } else if (mods & MOD_MASK_SHIFT) {
55 set_single_persistent_default_layer(keycode - KC_QWERTY + 4); 56 set_single_persistent_default_layer(keycode - FIRST_DEFAULT_LAYER_KEYCODE + 4);
57# if LAST_DEFAULT_LAYER_KEYCODE > (FIRST_DEFAULT_LAYER_KEYCODE + 7)
58
56 } else if (mods & MOD_MASK_CTRL) { 59 } else if (mods & MOD_MASK_CTRL) {
57 set_single_persistent_default_layer(keycode - KC_QWERTY + 8); 60 set_single_persistent_default_layer(keycode - FIRST_DEFAULT_LAYER_KEYCODE + 8);
61# endif
62#endif
58 } 63 }
59 } 64 }
60 break; 65 break;
@@ -79,15 +84,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
79#endif 84#endif
80 } 85 }
81 send_string_with_delay_P(PSTR("-kb " QMK_KEYBOARD " -km " QMK_KEYMAP), TAP_CODE_DELAY); 86 send_string_with_delay_P(PSTR("-kb " QMK_KEYBOARD " -km " QMK_KEYMAP), TAP_CODE_DELAY);
82#ifdef RGB_MATRIX_SPLIT_RIGHT 87#ifdef CONVERT_TO_PROTON_C
83 send_string_with_delay_P(PSTR(" RGB_MATRIX_SPLIT_RIGHT=yes"), TAP_CODE_DELAY); 88 send_string_with_delay_P(PSTR(" -e CTPC=yes"), TAP_CODE_DELAY);
84# ifndef OLED_DRIVER_ENABLE
85 send_string_with_delay_P(PSTR(" OLED_DRIVER_ENABLE=no"), TAP_CODE_DELAY);
86# endif
87#endif 89#endif
88 send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), TAP_CODE_DELAY); 90 send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), TAP_CODE_DELAY);
89 } 91 }
90
91 break; 92 break;
92 93
93 case VRSN: // Prints firmware version 94 case VRSN: // Prints firmware version
diff --git a/users/drashna/process_records.h b/users/drashna/process_records.h
index f60e6d7eb..460d41d4d 100644
--- a/users/drashna/process_records.h
+++ b/users/drashna/process_records.h
@@ -17,58 +17,77 @@
17#pragma once 17#pragma once
18#include "drashna.h" 18#include "drashna.h"
19 19
20#if defined(KEYBOARD_handwired_dactyl_manuform_5x6_right_trackball) 20#if defined(KEYBOARD_handwired_tractyl_manuform_5x6_right)
21# define PLACEHOLDER_SAFE_RANGE KEYMAP_SAFE_RANGE 21# define PLACEHOLDER_SAFE_RANGE KEYMAP_SAFE_RANGE
22#else 22#else
23# define PLACEHOLDER_SAFE_RANGE SAFE_RANGE 23# define PLACEHOLDER_SAFE_RANGE SAFE_RANGE
24#endif 24#endif
25 25
26enum userspace_custom_keycodes { 26enum userspace_custom_keycodes {
27 VRSN = PLACEHOLDER_SAFE_RANGE, // Prints QMK Firmware and board info 27 VRSN = PLACEHOLDER_SAFE_RANGE, // Prints QMK Firmware and board info
28 KC_QWERTY, // Sets default layer to QWERTY 28 KC_QWERTY, // Sets default layer to QWERTY
29 KC_COLEMAK, // Sets default layer to COLEMAK 29 FIRST_DEFAULT_LAYER_KEYCODE = KC_QWERTY, // Sets default layer to QWERTY
30 KC_DVORAK, // Sets default layer to DVORAK 30 KC_COLEMAK_DH, // Sets default layer to COLEMAK
31 KC_WORKMAN, // Sets default layer to WORKMAN 31 KC_COLEMAK, // Sets default layer to COLEMAK
32 KC_DIABLO_CLEAR, // Clears all Diablo Timers 32 KC_DVORAK, // Sets default layer to DVORAK
33 KC_MAKE, // Run keyboard's customized make command 33 LAST_DEFAULT_LAYER_KEYCODE = KC_DVORAK, // Sets default layer to WORKMAN
34 KC_RGB_T, // Toggles RGB Layer Indication mode 34 KC_DIABLO_CLEAR, // Clears all Diablo Timers
35 RGB_IDL, // RGB Idling animations 35 KC_MAKE, // Run keyboard's customized make command
36 KC_SECRET_1, // test1 36 KC_RGB_T, // Toggles RGB Layer Indication mode
37 KC_SECRET_2, // test2 37 RGB_IDL, // RGB Idling animations
38 KC_SECRET_3, // test3 38 KC_SECRET_1, // test1
39 KC_SECRET_4, // test4 39 KC_SECRET_2, // test2
40 KC_SECRET_5, // test5 40 KC_SECRET_3, // test3
41 KC_CCCV, // Hold to copy, tap to paste 41 KC_SECRET_4, // test4
42 KC_NUKE, // NUCLEAR LAUNCH DETECTED!!! 42 KC_SECRET_5, // test5
43 UC_FLIP, // (ಠ痊ಠ)┻━┻ 43 KC_CCCV, // Hold to copy, tap to paste
44 UC_TABL, // ┬─┬ノ( º _ ºノ) 44 KC_NUKE, // NUCLEAR LAUNCH DETECTED!!!
45 UC_SHRG, // ¯\_(ツ)_/¯ 45 UC_FLIP, // (ಠ痊ಠ)┻━┻
46 UC_DISA, // ಠ_ಠ 46 UC_TABL, // ┬─┬ノ( º _ ºノ)
47 NEW_SAFE_RANGE // use "NEWPLACEHOLDER for keymap specific codes 47 UC_SHRG, // ¯\_(ツ)_/¯
48 UC_DISA, // ಠ_ಠ
49 NEW_SAFE_RANGE // use "NEWPLACEHOLDER for keymap specific codes
48}; 50};
49 51
50bool process_record_secrets(uint16_t keycode, keyrecord_t *record); 52bool process_record_secrets(uint16_t keycode, keyrecord_t *record);
51bool process_record_keymap(uint16_t keycode, keyrecord_t *record); 53bool process_record_keymap(uint16_t keycode, keyrecord_t *record);
52 54
53#define LOWER MO(_LOWER) 55#define LOWER MO(_LOWER)
54#define RAISE MO(_RAISE) 56#define RAISE MO(_RAISE)
55#define ADJUST MO(_ADJUST) 57#define ADJUST MO(_ADJUST)
56#define TG_MODS OS_TOGG 58#define TG_MODS OS_TOGG
57#define TG_GAME TG(_GAMEPAD) 59#define TG_GAME TG(_GAMEPAD)
58#define TG_DBLO TG(_DIABLO) 60#define TG_DBLO TG(_DIABLO)
59#define OS_LWR OSL(_LOWER) 61#define OS_LWR OSL(_LOWER)
60#define OS_RSE OSL(_RAISE) 62#define OS_RSE OSL(_RAISE)
61 63
62#define KC_SEC1 KC_SECRET_1 64#define KC_SEC1 KC_SECRET_1
63#define KC_SEC2 KC_SECRET_2 65#define KC_SEC2 KC_SECRET_2
64#define KC_SEC3 KC_SECRET_3 66#define KC_SEC3 KC_SECRET_3
65#define KC_SEC4 KC_SECRET_4 67#define KC_SEC4 KC_SECRET_4
66#define KC_SEC5 KC_SECRET_5 68#define KC_SEC5 KC_SECRET_5
67 69
68#define QWERTY KC_QWERTY 70#define QWERTY KC_QWERTY
69#define DVORAK KC_DVORAK 71#define DVORAK KC_DVORAK
70#define COLEMAK KC_COLEMAK 72#define COLEMAK KC_COLEMAK
71#define WORKMAN KC_WORKMAN 73#define COLEMAKDH KC_COLEMAK_DH
74
75#define DEFLYR1 FIRST_DEFAULT_LAYER_KEYCODE
76#define DEFLYR2 (FIRST_DEFAULT_LAYER_KEYCODE + 1)
77#define DEFLYR3 (FIRST_DEFAULT_LAYER_KEYCODE + 2)
78#define DEFLYR4 (FIRST_DEFAULT_LAYER_KEYCODE + 3)
79#if LAST_DEFAULT_LAYER_KEYCODE > (FIRST_DEFAULT_LAYER_KEYCODE + 3)
80# define DEFLYR5 (FIRST_DEFAULT_LAYER_KEYCODE + 4)
81# define DEFLYR6 (FIRST_DEFAULT_LAYER_KEYCODE + 5)
82# define DEFLYR7 (FIRST_DEFAULT_LAYER_KEYCODE + 6)
83# define DEFLYR8 (FIRST_DEFAULT_LAYER_KEYCODE + 7)
84# if LAST_DEFAULT_LAYER_KEYCODE > (FIRST_DEFAULT_LAYER_KEYCODE + 7)
85# define DEFLYR9 (FIRST_DEFAULT_LAYER_KEYCODE + 8)
86# define DEFLYR10 (FIRST_DEFAULT_LAYER_KEYCODE + 9)
87# define DEFLYR11 (FIRST_DEFAULT_LAYER_KEYCODE + 10)
88# define DEFLYR12 (FIRST_DEFAULT_LAYER_KEYCODE + 11)
89# endif
90#endif
72 91
73#define KC_RESET RESET 92#define KC_RESET RESET
74#define KC_RST KC_RESET 93#define KC_RST KC_RESET
diff --git a/users/drashna/rgb_matrix_stuff.c b/users/drashna/rgb_matrix_stuff.c
index 9e9e1e427..5adbd8ab1 100644
--- a/users/drashna/rgb_matrix_stuff.c
+++ b/users/drashna/rgb_matrix_stuff.c
@@ -34,27 +34,27 @@ void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode
34 34
35 switch (mode) { 35 switch (mode) {
36 case 1: // breathing 36 case 1: // breathing
37 { 37 {
38 uint16_t time = scale16by8(g_rgb_timer, speed / 8); 38 uint16_t time = scale16by8(g_rgb_timer, speed / 8);
39 hsv.v = scale8(abs8(sin8(time) - 128) * 2, hsv.v); 39 hsv.v = scale8(abs8(sin8(time) - 128) * 2, hsv.v);
40 RGB rgb = hsv_to_rgb(hsv); 40 RGB rgb = hsv_to_rgb(hsv);
41 for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) { 41 for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) {
42 if (HAS_FLAGS(g_led_config.flags[i], led_type)) { 42 if (HAS_FLAGS(g_led_config.flags[i], led_type)) {
43 RGB_MATRIX_INDICATOR_SET_COLOR(i, rgb.r, rgb.g, rgb.b); 43 RGB_MATRIX_INDICATOR_SET_COLOR(i, rgb.r, rgb.g, rgb.b);
44 }
44 } 45 }
46 break;
45 } 47 }
46 break;
47 }
48 default: // Solid Color 48 default: // Solid Color
49 { 49 {
50 RGB rgb = hsv_to_rgb(hsv); 50 RGB rgb = hsv_to_rgb(hsv);
51 for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) { 51 for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) {
52 if (HAS_FLAGS(g_led_config.flags[i], led_type)) { 52 if (HAS_FLAGS(g_led_config.flags[i], led_type)) {
53 RGB_MATRIX_INDICATOR_SET_COLOR(i, rgb.r, rgb.g, rgb.b); 53 RGB_MATRIX_INDICATOR_SET_COLOR(i, rgb.r, rgb.g, rgb.b);
54 }
54 } 55 }
56 break;
55 } 57 }
56 break;
57 }
58 } 58 }
59} 59}
60 60
diff --git a/users/drashna/rgb_stuff.c b/users/drashna/rgb_stuff.c
index 6723ad4bf..8a0866539 100644
--- a/users/drashna/rgb_stuff.c
+++ b/users/drashna/rgb_stuff.c
@@ -178,9 +178,13 @@ layer_state_t layer_state_set_rgb_light(layer_state_t state) {
178# ifdef RGBLIGHT_ENABLE 178# ifdef RGBLIGHT_ENABLE
179 if (userspace_config.rgb_layer_change) { 179 if (userspace_config.rgb_layer_change) {
180 switch (get_highest_layer(state | default_layer_state)) { 180 switch (get_highest_layer(state | default_layer_state)) {
181 case _MACROS: // mouse 181 case _MOUSE: // mouse
182 if (!layer_state_cmp(state, _GAMEPAD) && !layer_state_cmp(state, _DIABLO)) { 182 if (!layer_state_cmp(state, _GAMEPAD) && !layer_state_cmp(state, _DIABLO)) {
183# if defined(RGBLIGHT_EFFECT_TWINKLE)
184 rgblight_set_hsv_and_mode(HSV_CHARTREUSE, RGBLIGHT_MODE_TWINKLE + 5);
185# else
183 rgblight_set_hsv_and_mode(HSV_CHARTREUSE, RGBLIGHT_MODE_BREATHING + 3); 186 rgblight_set_hsv_and_mode(HSV_CHARTREUSE, RGBLIGHT_MODE_BREATHING + 3);
187# endif
184 } 188 }
185 break; 189 break;
186 case _MEDIA: 190 case _MEDIA:
@@ -201,29 +205,17 @@ layer_state_t layer_state_set_rgb_light(layer_state_t state) {
201 case _ADJUST: 205 case _ADJUST:
202 rgblight_set_hsv_and_mode(HSV_RED, RGBLIGHT_MODE_KNIGHT + 2); 206 rgblight_set_hsv_and_mode(HSV_RED, RGBLIGHT_MODE_KNIGHT + 2);
203 break; 207 break;
204 case _COLEMAK: 208 case _DEFAULT_LAYER_1:
205 rgblight_set_hsv_and_mode(HSV_MAGENTA, RGBLIGHT_MODE_STATIC_LIGHT); 209 rgblight_set_hsv_and_mode(DEFAULT_LAYER_1_HSV, RGBLIGHT_MODE_STATIC_LIGHT);
206 break; 210 break;
207 case _DVORAK: 211 case _DEFAULT_LAYER_2:
208 rgblight_set_hsv_and_mode(HSV_SPRINGGREEN, RGBLIGHT_MODE_STATIC_LIGHT); 212 rgblight_set_hsv_and_mode(DEFAULT_LAYER_2_HSV, RGBLIGHT_MODE_STATIC_LIGHT);
209 break; 213 break;
210 case _WORKMAN: 214 case _DEFAULT_LAYER_3:
211 rgblight_set_hsv_and_mode(HSV_GOLDENROD, RGBLIGHT_MODE_STATIC_LIGHT); 215 rgblight_set_hsv_and_mode(DEFAULT_LAYER_3_HSV, RGBLIGHT_MODE_STATIC_LIGHT);
212 break; 216 break;
213 case _NORMAN: 217 case _DEFAULT_LAYER_4:
214 rgblight_set_hsv_and_mode(HSV_CORAL, RGBLIGHT_MODE_STATIC_LIGHT); 218 rgblight_set_hsv_and_mode(DEFAULT_LAYER_4_HSV, RGBLIGHT_MODE_STATIC_LIGHT);
215 break;
216 case _MALTRON:
217 rgblight_set_hsv_and_mode(HSV_YELLOW, RGBLIGHT_MODE_STATIC_LIGHT);
218 break;
219 case _EUCALYN:
220 rgblight_set_hsv_and_mode(HSV_PINK, RGBLIGHT_MODE_STATIC_LIGHT);
221 break;
222 case _CARPLAX:
223 rgblight_set_hsv_and_mode(HSV_BLUE, RGBLIGHT_MODE_STATIC_LIGHT);
224 break;
225 default:
226 rgblight_set_hsv_and_mode(HSV_CYAN, RGBLIGHT_MODE_STATIC_LIGHT);
227 break; 219 break;
228 } 220 }
229 } 221 }
diff --git a/users/drashna/rules.mk b/users/drashna/rules.mk
index b79051508..b93ab1ee6 100644
--- a/users/drashna/rules.mk
+++ b/users/drashna/rules.mk
@@ -2,7 +2,9 @@ SRC += drashna.c \
2 process_records.c 2 process_records.c
3 3
4ifneq ($(PLATFORM),CHIBIOS) 4ifneq ($(PLATFORM),CHIBIOS)
5 LTO_ENABLE = yes 5 ifneq ($(strip $(LTO_SUPPORTED)), no)
6 LTO_ENABLE = yes
7 endif
6endif 8endif
7SPACE_CADET_ENABLE = no 9SPACE_CADET_ENABLE = no
8GRAVE_ESC_ENABLE = no 10GRAVE_ESC_ENABLE = no
@@ -68,40 +70,19 @@ CUSTOM_OLED_DRIVER ?= yes
68ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes) 70ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes)
69 ifeq ($(strip $(CUSTOM_OLED_DRIVER)), yes) 71 ifeq ($(strip $(CUSTOM_OLED_DRIVER)), yes)
70 SRC += oled_stuff.c 72 SRC += oled_stuff.c
73 OPT_DEFS += -DCUSTOM_OLED_DRIVER_CODE
71 endif 74 endif
72endif 75endif
73 76
74ifeq ($(strip $(PIMORONI_TRACKBALL_ENABLE)), yes) 77ifeq ($(strip $(PIMORONI_TRACKBALL_ENABLE)), yes)
75 POINTING_DEVICE_ENABLE := yes 78 POINTING_DEVICE_ENABLE := yes
76 OPT_DEFS += -DPIMORONI_TRACKBALL_ENABLE 79 OPT_DEFS += -DPIMORONI_TRACKBALL_ENABLE
77 SRC += pimoroni_trackball.c 80 SRC += drivers/sensors/pimoroni_trackball.c
78 QUANTUM_LIB_SRC += i2c_master.c 81 QUANTUM_LIB_SRC += i2c_master.c
79endif 82endif
80 83
81CUSTOM_SPLIT_TRANSPORT ?= yes
82ifeq ($(strip $(SPLIT_KEYBOARD)), yes) 84ifeq ($(strip $(SPLIT_KEYBOARD)), yes)
83 ifneq ($(strip $(SPLIT_TRANSPORT)), custom) 85 QUANTUM_LIB_SRC += transport_sync.c
84 ifeq ($(strip $(CUSTOM_SPLIT_TRANSPORT)), yes)
85 SPLIT_TRANSPORT = custom
86 QUANTUM_LIB_SRC += drashna_transport.c
87 OPT_DEFS += -DDRASHNA_CUSTOM_TRANSPORT
88 # Unused functions are pruned away, which is why we can add multiple drivers here without bloat.
89 ifeq ($(PLATFORM),AVR)
90 ifneq ($(NO_I2C),yes)
91 QUANTUM_LIB_SRC += i2c_master.c \
92 i2c_slave.c
93 endif
94 endif
95
96 SERIAL_DRIVER ?= bitbang
97 OPT_DEFS += -DSERIAL_DRIVER_$(strip $(shell echo $(SERIAL_DRIVER) | tr '[:lower:]' '[:upper:]'))
98 ifeq ($(strip $(SERIAL_DRIVER)), bitbang)
99 QUANTUM_LIB_SRC += serial.c
100 else
101 QUANTUM_LIB_SRC += serial_$(strip $(SERIAL_DRIVER)).c
102 endif
103 endif
104 endif
105endif 86endif
106 87
107# DEBUG_MATRIX_SCAN_RATE_ENABLE = api 88# DEBUG_MATRIX_SCAN_RATE_ENABLE = api
diff --git a/users/drashna/tap_dances.h b/users/drashna/tap_dances.h
index 7f73f2803..81e462ce2 100644
--- a/users/drashna/tap_dances.h
+++ b/users/drashna/tap_dances.h
@@ -35,12 +35,10 @@ extern diablo_timer_t diablo_timer[];
35void run_diablo_macro_check(void); 35void run_diablo_macro_check(void);
36 36
37#ifdef TAP_DANCE_ENABLE 37#ifdef TAP_DANCE_ENABLE
38// clang-format off
39enum { 38enum {
40 TD_D3_1 = 0, 39 TD_D3_1 = 0,
41 TD_D3_2, 40 TD_D3_2,
42 TD_D3_3, 41 TD_D3_3,
43 TD_D3_4 42 TD_D3_4,
44}; 43};
45// clang-format on
46#endif // TAP_DANCE_ENABLE 44#endif // TAP_DANCE_ENABLE
diff --git a/users/drashna/transport_sync.c b/users/drashna/transport_sync.c
new file mode 100644
index 000000000..c3ef2eff5
--- /dev/null
+++ b/users/drashna/transport_sync.c
@@ -0,0 +1,188 @@
1#ifdef SPLIT_TRANSACTION_IDS_USER
2# include "transport_sync.h"
3# include "transactions.h"
4# include <string.h>
5
6# ifdef UNICODE_ENABLE
7extern unicode_config_t unicode_config;
8# endif
9# ifdef AUDIO_ENABLE
10# include "audio.h"
11# endif
12# if defined(POINTING_DEVICE_ENABLE) && defined(KEYBOARD_handwired_tractyl_manuform)
13extern bool tap_toggling;
14# endif
15# ifdef SWAP_HANDS_ENABLE
16extern bool swap_hands;
17# endif
18extern userspace_config_t userspace_config;
19
20typedef struct {
21 bool oled_on;
22 bool audio_enable;
23 bool audio_clicky_enable;
24 bool tap_toggling;
25 bool unicode_mode;
26 bool swap_hands;
27 uint8_t reserved :2;
28} user_runtime_config_t;
29
30uint16_t transport_keymap_config = 0;
31uint32_t transport_userspace_config = 0;
32
33user_runtime_config_t user_state;
34
35void user_state_sync(uint8_t initiator2target_buffer_size, const void* initiator2target_buffer, uint8_t target2initiator_buffer_size, void* target2initiator_buffer) {
36 if (initiator2target_buffer_size == sizeof(user_state)) {
37 memcpy(&user_state, initiator2target_buffer, initiator2target_buffer_size);
38 }
39}
40void user_keymap_sync(uint8_t initiator2target_buffer_size, const void* initiator2target_buffer, uint8_t target2initiator_buffer_size, void* target2initiator_buffer) {
41 if (initiator2target_buffer_size == sizeof(transport_keymap_config)) {
42 memcpy(&transport_keymap_config, initiator2target_buffer, initiator2target_buffer_size);
43 }
44}
45void user_config_sync(uint8_t initiator2target_buffer_size, const void* initiator2target_buffer, uint8_t target2initiator_buffer_size, void* target2initiator_buffer) {
46 if (initiator2target_buffer_size == sizeof(transport_userspace_config)) {
47 memcpy(&transport_userspace_config, initiator2target_buffer, initiator2target_buffer_size);
48 }
49}
50
51void keyboard_post_init_transport_sync(void) {
52 // Register keyboard state sync split transaction
53 transaction_register_rpc(RPC_ID_USER_STATE_SYNC, user_state_sync);
54 transaction_register_rpc(RPC_ID_USER_KEYMAP_SYNC, user_keymap_sync);
55 transaction_register_rpc(RPC_ID_USER_CONFIG_SYNC, user_config_sync);
56}
57
58void user_transport_update(void) {
59 if (is_keyboard_master()) {
60# ifdef OLED_DRIVER_ENABLE
61 user_state.oled_on = is_oled_on();
62# endif
63
64 transport_keymap_config = keymap_config.raw;
65 transport_userspace_config = userspace_config.raw;
66# ifdef AUDIO_ENABLE
67 user_state.audio_enable = is_audio_on();
68 user_state.audio_clicky_enable = is_clicky_on();
69# endif
70# if defined(POINTING_DEVICE_ENABLE) && defined(KEYBOARD_handwired_tractyl_manuform)
71 user_state.tap_toggling = tap_toggling;
72# endif
73# ifdef SWAP_HANDS_ENABLE
74 user_state.swap_hands = swap_hands;
75# endif
76
77 } else {
78# ifdef OLED_DRIVER_ENABLE
79 if (user_state.oled_on) {
80 oled_on();
81 } else {
82 oled_off();
83 }
84# endif
85 keymap_config.raw = transport_keymap_config;
86 userspace_config.raw = transport_userspace_config;
87# ifdef UNICODE_ENABLE
88 unicode_config.input_mode = user_state.unicode_mode;
89# endif
90# ifdef AUDIO_ENABLE
91 if (user_state.audio_enable != is_audio_on()) {
92 if (user_state.audio_enable) {
93 audio_on();
94 } else {
95 audio_off();
96 }
97 }
98 if (user_state.audio_clicky_enable != is_clicky_on()) {
99 if (user_state.audio_clicky_enable) {
100 clicky_on();
101 } else {
102 clicky_off();
103 }
104 }
105# endif
106# if defined(POINTING_DEVICE_ENABLE) && defined(KEYBOARD_handwired_tractyl_manuform)
107 tap_toggling = user_state.tap_toggling;
108# endif
109# ifdef SWAP_HANDS_ENABLE
110 swap_hands = user_state.swap_hands;
111# endif
112 }
113}
114
115void user_transport_sync(void) {
116 if (is_keyboard_master()) {
117 // Keep track of the last state, so that we can tell if we need to propagate to slave
118 static user_runtime_config_t last_user_state;
119 static uint16_t last_keymap = 0;
120 static uint32_t last_config = 0;
121 static uint32_t last_sync[3];
122 bool needs_sync = false;
123
124 // Check if the state values are different
125 if (memcmp(&user_state, &last_user_state, sizeof(user_state))) {
126 needs_sync = true;
127 memcpy(&last_user_state, &user_state, sizeof(user_state));
128 }
129 // Send to slave every 500ms regardless of state change
130 if (timer_elapsed32(last_sync[0]) > 250) {
131 needs_sync = true;
132 }
133
134 // Perform the sync if requested
135 if (needs_sync) {
136 if (transaction_rpc_send(RPC_ID_USER_STATE_SYNC, sizeof(user_state), &user_state)) {
137 last_sync[0] = timer_read32();
138 }
139 needs_sync = false;
140 }
141
142 // Check if the state values are different
143 if (memcmp(&transport_keymap_config, &last_keymap, sizeof(transport_keymap_config))) {
144 needs_sync = true;
145 memcpy(&last_keymap, &transport_keymap_config, sizeof(transport_keymap_config));
146 }
147
148 // Send to slave every 500ms regardless of state change
149 if (timer_elapsed32(last_sync[1]) > 250) {
150 needs_sync = true;
151 }
152
153 // Perform the sync if requested
154 if (needs_sync) {
155 if (transaction_rpc_send(RPC_ID_USER_KEYMAP_SYNC, sizeof(transport_keymap_config), &transport_keymap_config)) {
156 last_sync[1] = timer_read32();
157 }
158 needs_sync = false;
159 }
160
161 // Check if the state values are different
162 if (memcmp(&user_state, &last_config, sizeof(transport_userspace_config))) {
163 needs_sync = true;
164 memcpy(&last_config, &user_state, sizeof(transport_userspace_config));
165 }
166
167 // Send to slave every 500ms regardless of state change
168 if (timer_elapsed32(last_sync[2]) > 250) {
169 needs_sync = true;
170 }
171
172 // Perform the sync if requested
173 if (needs_sync) {
174 if (transaction_rpc_send(RPC_ID_USER_CONFIG_SYNC, sizeof(transport_userspace_config), &transport_userspace_config)) {
175 last_sync[2] = timer_read32();
176 }
177 }
178 }
179}
180
181void housekeeping_task_user(void) {
182 // Update kb_state so we can send to slave
183 user_transport_update();
184
185 // Data sync from master to slave
186 user_transport_sync();
187}
188#endif
diff --git a/users/drashna/pimoroni_trackball.h b/users/drashna/transport_sync.h
index a30fb0bb8..e2b3eae76 100644
--- a/users/drashna/pimoroni_trackball.h
+++ b/users/drashna/transport_sync.h
@@ -1,3 +1,4 @@
1
1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com> 2/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
2 * 3 *
3 * This program is free software: you can redistribute it and/or modify 4 * This program is free software: you can redistribute it and/or modify
@@ -16,20 +17,6 @@
16 17
17#pragma once 18#pragma once
18 19
19#include "quantum.h" 20#include "drashna.h"
20#include "pointing_device.h"
21
22#ifndef TRACKBALL_ADDRESS
23# define TRACKBALL_ADDRESS 0x0A
24#endif
25#define TRACKBALL_WRITE ((TRACKBALL_ADDRESS << 1) | I2C_WRITE)
26#define TRACKBALL_READ ((TRACKBALL_ADDRESS << 1) | I2C_READ)
27
28void trackball_set_rgbw(uint8_t red, uint8_t green, uint8_t blue, uint8_t white);
29void trackball_check_click(bool pressed, report_mouse_t *mouse);
30void trackball_register_button(bool pressed, enum mouse_buttons button);
31 21
32float trackball_get_precision(void); 22void keyboard_post_init_transport_sync(void);
33void trackball_set_precision(float precision);
34bool trackball_is_scrolling(void);
35void trackball_set_scrolling(bool scroll);
diff --git a/users/drashna/wrappers.h b/users/drashna/wrappers.h
index be8162dfa..8ac252926 100644
--- a/users/drashna/wrappers.h
+++ b/users/drashna/wrappers.h
@@ -60,120 +60,120 @@ NOTE: These are all the same length. If you do a search/replace
60#define ______________COLEMAK_MOD_DH_R3____________ KC_K, KC_H, KC_COMM, KC_DOT, KC_SLASH 60#define ______________COLEMAK_MOD_DH_R3____________ KC_K, KC_H, KC_COMM, KC_DOT, KC_SLASH
61 61
62 62
63#define _________________DVORAK_L1_________________ KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y 63#define _________________DVORAK_L1_________________ KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y
64#define _________________DVORAK_L2_________________ KC_A, KC_O, KC_E, KC_U, KC_I 64#define _________________DVORAK_L2_________________ KC_A, KC_O, KC_E, KC_U, KC_I
65#define _________________DVORAK_L3_________________ KC_SCLN, KC_Q, KC_J, KC_K, KC_X 65#define _________________DVORAK_L3_________________ KC_SCLN, KC_Q, KC_J, KC_K, KC_X
66 66
67#define _________________DVORAK_R1_________________ KC_F, KC_G, KC_C, KC_R, KC_L 67#define _________________DVORAK_R1_________________ KC_F, KC_G, KC_C, KC_R, KC_L
68#define _________________DVORAK_R2_________________ KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH 68#define _________________DVORAK_R2_________________ KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH
69#define _________________DVORAK_R3_________________ KC_B, KC_M, KC_W, KC_V, KC_Z 69#define _________________DVORAK_R3_________________ KC_B, KC_M, KC_W, KC_V, KC_Z
70 70
71 71
72#define ________________DVORAK_AU_L1_______________ KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y 72#define ________________DVORAK_AU_L1_______________ KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y
73#define ________________DVORAK_AU_L2_______________ KC_O, KC_A, KC_E, KC_I, KC_U 73#define ________________DVORAK_AU_L2_______________ KC_O, KC_A, KC_E, KC_I, KC_U
74#define ________________DVORAK_AU_L3_______________ KC_SCLN, KC_Q, KC_J, KC_K, KC_X 74#define ________________DVORAK_AU_L3_______________ KC_SCLN, KC_Q, KC_J, KC_K, KC_X
75 75
76#define ________________DVORAK_AU_R1_______________ KC_F, KC_G, KC_C, KC_R, KC_L 76#define ________________DVORAK_AU_R1_______________ KC_F, KC_G, KC_C, KC_R, KC_L
77#define ________________DVORAK_AU_R2_______________ KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH 77#define ________________DVORAK_AU_R2_______________ KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH
78#define ________________DVORAK_AU_R3_______________ KC_B, KC_M, KC_W, KC_V, KC_Z 78#define ________________DVORAK_AU_R3_______________ KC_B, KC_M, KC_W, KC_V, KC_Z
79 79
80#define _________________WORKMAN_L1________________ KC_Q, KC_D, KC_R, KC_W, KC_B 80#define _________________WORKMAN_L1________________ KC_Q, KC_D, KC_R, KC_W, KC_B
81#define _________________WORKMAN_L2________________ KC_A, KC_S, KC_H, KC_T, KC_G 81#define _________________WORKMAN_L2________________ KC_A, KC_S, KC_H, KC_T, KC_G
82#define _________________WORKMAN_L3________________ KC_Z, KC_X, KC_M, KC_C, KC_V 82#define _________________WORKMAN_L3________________ KC_Z, KC_X, KC_M, KC_C, KC_V
83 83
84#define _________________WORKMAN_R1________________ KC_J, KC_F, KC_U, KC_P, KC_SCLN 84#define _________________WORKMAN_R1________________ KC_J, KC_F, KC_U, KC_P, KC_SCLN
85#define _________________WORKMAN_R2________________ KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOT 85#define _________________WORKMAN_R2________________ KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOT
86#define _________________WORKMAN_R3________________ KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH 86#define _________________WORKMAN_R3________________ KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH
87 87
88 88
89#define _________________NORMAN_L1_________________ KC_Q, KC_W, KC_D, KC_F, KC_K 89#define _________________NORMAN_L1_________________ KC_Q, KC_W, KC_D, KC_F, KC_K
90#define _________________NORMAN_L2_________________ KC_A, KC_S, KC_E, KC_T, KC_G 90#define _________________NORMAN_L2_________________ KC_A, KC_S, KC_E, KC_T, KC_G
91#define _________________NORMAN_L3_________________ KC_Z, KC_X, KC_C, KC_V, KC_B 91#define _________________NORMAN_L3_________________ KC_Z, KC_X, KC_C, KC_V, KC_B
92 92
93#define _________________NORMAN_R1_________________ KC_J, KC_U, KC_R, KC_L, KC_SCLN 93#define _________________NORMAN_R1_________________ KC_J, KC_U, KC_R, KC_L, KC_SCLN
94#define _________________NORMAN_R2_________________ KC_Y, KC_N, KC_I, KC_O, KC_U, KC_QUOT 94#define _________________NORMAN_R2_________________ KC_Y, KC_N, KC_I, KC_O, KC_U, KC_QUOT
95#define _________________NORMAN_R3_________________ KC_P, KC_M, KC_COMM, KC_DOT, KC_SLSH 95#define _________________NORMAN_R3_________________ KC_P, KC_M, KC_COMM, KC_DOT, KC_SLSH
96 96
97 97
98#define _________________MALTRON_L1________________ KC_Q, KC_P, KC_Y, KC_C, KC_B 98#define _________________MALTRON_L1________________ KC_Q, KC_P, KC_Y, KC_C, KC_B
99#define _________________MALTRON_L2________________ KC_A, KC_N, KC_I, KC_S, KC_F 99#define _________________MALTRON_L2________________ KC_A, KC_N, KC_I, KC_S, KC_F
100#define _________________MALTRON_L3________________ KC_SCLN, KC_SLSH, KC_J, KC_G, KC_COMM 100#define _________________MALTRON_L3________________ KC_SCLN, KC_SLSH, KC_J, KC_G, KC_COMM
101 101
102#define _________________MALTRON_R1________________ KC_V, KC_M, KC_U, KC_Z, KC_L 102#define _________________MALTRON_R1________________ KC_V, KC_M, KC_U, KC_Z, KC_L
103#define _________________MALTRON_R2________________ KC_D, KC_T, KC_D, KC_O, KC_R, KC_QUOT 103#define _________________MALTRON_R2________________ KC_D, KC_T, KC_D, KC_O, KC_R, KC_QUOT
104#define _________________MALTRON_R3________________ KC_DOT, KC_W, KC_K, KC_MINS, KC_X 104#define _________________MALTRON_R3________________ KC_DOT, KC_W, KC_K, KC_MINS, KC_X
105 105
106 106
107#define _________________EUCALYN_L1________________ KC_Q, KC_W, KC_COMM, KC_DOT, KC_SCLN 107#define _________________EUCALYN_L1________________ KC_Q, KC_W, KC_COMM, KC_DOT, KC_SCLN
108#define _________________EUCALYN_L2________________ KC_A, KC_O, KC_E, KC_I, KC_U 108#define _________________EUCALYN_L2________________ KC_A, KC_O, KC_E, KC_I, KC_U
109#define _________________EUCALYN_L3________________ KC_Z, KC_X, KC_C, KC_V, KC_F 109#define _________________EUCALYN_L3________________ KC_Z, KC_X, KC_C, KC_V, KC_F
110 110
111#define _________________EUCALYN_R1________________ KC_M, KC_R, KC_D, KC_Y, KC_P 111#define _________________EUCALYN_R1________________ KC_M, KC_R, KC_D, KC_Y, KC_P
112#define _________________EUCALYN_R2________________ KC_G, KC_T, KC_K, KC_S, KC_N, KC_QUOT 112#define _________________EUCALYN_R2________________ KC_G, KC_T, KC_K, KC_S, KC_N, KC_QUOT
113#define _________________EUCALYN_R3________________ KC_B, KC_H, KC_J, KC_L, KC_SLSH 113#define _________________EUCALYN_R3________________ KC_B, KC_H, KC_J, KC_L, KC_SLSH
114 114
115// Qwerty-like 115// Qwerty-like
116#define _____________CARPLAX_QFMLWY_L1_____________ KC_Q, KC_F, KC_M, KC_L, KC_W 116#define _____________CARPLAX_QFMLWY_L1_____________ KC_Q, KC_F, KC_M, KC_L, KC_W
117#define _____________CARPLAX_QFMLWY_L2_____________ KC_D, KC_S, KC_T, KC_N, KC_R 117#define _____________CARPLAX_QFMLWY_L2_____________ KC_D, KC_S, KC_T, KC_N, KC_R
118#define _____________CARPLAX_QFMLWY_L3_____________ KC_Z, KC_V, KC_G, KC_C, KC_X 118#define _____________CARPLAX_QFMLWY_L3_____________ KC_Z, KC_V, KC_G, KC_C, KC_X
119 119
120#define _____________CARPLAX_QFMLWY_R1_____________ KC_Y, KC_U, KC_O, KC_B, KC_J 120#define _____________CARPLAX_QFMLWY_R1_____________ KC_Y, KC_U, KC_O, KC_B, KC_J
121#define _____________CARPLAX_QFMLWY_R2_____________ KC_I, KC_A, KC_E, KC_H, KC_SCLN, KC_QUOT 121#define _____________CARPLAX_QFMLWY_R2_____________ KC_I, KC_A, KC_E, KC_H, KC_SCLN, KC_QUOT
122#define _____________CARPLAX_QFMLWY_R3_____________ KC_P, KC_K, KC_COMM, KC_DOT, KC_SLSH 122#define _____________CARPLAX_QFMLWY_R3_____________ KC_P, KC_K, KC_COMM, KC_DOT, KC_SLSH
123 123
124// Colemak like 124// Colemak like
125#define _____________CARPLAX_QGMLWB_L1_____________ KC_Q, KC_G, KC_M, KC_L, KC_W 125#define _____________CARPLAX_QGMLWB_L1_____________ KC_Q, KC_G, KC_M, KC_L, KC_W
126#define _____________CARPLAX_QGMLWB_L2_____________ KC_D, KC_S, KC_T, KC_N, KC_R 126#define _____________CARPLAX_QGMLWB_L2_____________ KC_D, KC_S, KC_T, KC_N, KC_R
127#define _____________CARPLAX_QGMLWB_L3_____________ KC_Z, KC_X, KC_C, KC_F, KC_J 127#define _____________CARPLAX_QGMLWB_L3_____________ KC_Z, KC_X, KC_C, KC_F, KC_J
128 128
129#define _____________CARPLAX_QGMLWB_R1_____________ KC_B, KC_Y, KC_U, KC_V, KC_SCLN 129#define _____________CARPLAX_QGMLWB_R1_____________ KC_B, KC_Y, KC_U, KC_V, KC_SCLN
130#define _____________CARPLAX_QGMLWB_R2_____________ KC_I, KC_A, KC_E, KC_O, KC_H, KC_QUOT 130#define _____________CARPLAX_QGMLWB_R2_____________ KC_I, KC_A, KC_E, KC_O, KC_H, KC_QUOT
131#define _____________CARPLAX_QGMLWB_R3_____________ KC_K, KC_P, KC_COMM, KC_DOT, KC_SLSH 131#define _____________CARPLAX_QGMLWB_R3_____________ KC_K, KC_P, KC_COMM, KC_DOT, KC_SLSH
132 132
133// colemak like, zxcv fixed 133// colemak like, zxcv fixed
134#define _____________CARPLAX_QGMLWY_L1_____________ KC_Q, KC_G, KC_M, KC_L, KC_W 134#define _____________CARPLAX_QGMLWY_L1_____________ KC_Q, KC_G, KC_M, KC_L, KC_W
135#define _____________CARPLAX_QGMLWY_L2_____________ KC_D, KC_S, KC_T, KC_N, KC_R 135#define _____________CARPLAX_QGMLWY_L2_____________ KC_D, KC_S, KC_T, KC_N, KC_R
136#define _____________CARPLAX_QGMLWY_L3_____________ KC_Z, KC_X, KC_C, KC_V, KC_J 136#define _____________CARPLAX_QGMLWY_L3_____________ KC_Z, KC_X, KC_C, KC_V, KC_J
137 137
138#define _____________CARPLAX_QGMLWY_R1_____________ KC_Y, KC_F, KC_U, KC_B, KC_SCLN 138#define _____________CARPLAX_QGMLWY_R1_____________ KC_Y, KC_F, KC_U, KC_B, KC_SCLN
139#define _____________CARPLAX_QGMLWY_R2_____________ KC_I, KC_A, KC_E, KC_O, KC_H, KC_QUOT 139#define _____________CARPLAX_QGMLWY_R2_____________ KC_I, KC_A, KC_E, KC_O, KC_H, KC_QUOT
140#define _____________CARPLAX_QGMLWY_R3_____________ KC_K, KC_P, KC_COMM, KC_DOT, KC_SLSH 140#define _____________CARPLAX_QGMLWY_R3_____________ KC_K, KC_P, KC_COMM, KC_DOT, KC_SLSH
141 141
142// teeheehee 142// teeheehee
143#define _____________CARPLAX_TNWCLR_L1_____________ KC_T, KC_N, KC_W, KC_C, KC_L 143#define _____________CARPLAX_TNWCLR_L1_____________ KC_T, KC_N, KC_W, KC_C, KC_L
144#define _____________CARPLAX_TNWCLR_L2_____________ KC_S, KC_K, KC_J, KC_X, KC_G 144#define _____________CARPLAX_TNWCLR_L2_____________ KC_S, KC_K, KC_J, KC_X, KC_G
145#define _____________CARPLAX_TNWCLR_L3_____________ KC_E, KC_O, KC_D, KC_I, KC_A 145#define _____________CARPLAX_TNWCLR_L3_____________ KC_E, KC_O, KC_D, KC_I, KC_A
146 146
147#define _____________CARPLAX_TNWCLR_R1_____________ KC_R, KC_B, KC_F, KC_M, KC_H 147#define _____________CARPLAX_TNWCLR_R1_____________ KC_R, KC_B, KC_F, KC_M, KC_H
148#define _____________CARPLAX_TNWCLR_R2_____________ KC_P, KC_Q, KC_Z, KC_V, KC_SCLN, KC_QUOT 148#define _____________CARPLAX_TNWCLR_R2_____________ KC_P, KC_Q, KC_Z, KC_V, KC_SCLN, KC_QUOT
149#define _____________CARPLAX_TNWCLR_R3_____________ KC_U, KC_Y, KC_COMM, KC_DOT, KC_SLSH 149#define _____________CARPLAX_TNWCLR_R3_____________ KC_U, KC_Y, KC_COMM, KC_DOT, KC_SLSH
150 150
151 151
152#define _________________WHITE_R1__________________ KC_V, KC_Y, KC_D, KC_COMM, KC_QUOT 152#define _________________WHITE_R1__________________ KC_V, KC_Y, KC_D, KC_COMM, KC_QUOT
153#define _________________WHITE_R2__________________ KC_A, KC_T, KC_H, KC_E, KC_B 153#define _________________WHITE_R2__________________ KC_A, KC_T, KC_H, KC_E, KC_B
154#define _________________WHITE_R3__________________ KC_P, KC_K, KC_G, KC_W, KC_Q 154#define _________________WHITE_R3__________________ KC_P, KC_K, KC_G, KC_W, KC_Q
155 155
156#define _________________WHITE_L1__________________ KC_INT1, KC_J, KC_M, KC_L, KC_U 156#define _________________WHITE_L1__________________ KC_INT1, KC_J, KC_M, KC_L, KC_U
157#define _________________WHITE_L2__________________ KC_MINS, KC_C, KC_S, KC_N, KC_O, KC_I 157#define _________________WHITE_L2__________________ KC_MINS, KC_C, KC_S, KC_N, KC_O, KC_I
158#define _________________WHITE_L3__________________ KC_X, KC_R, KC_F, KC_DOT, KC_Z 158#define _________________WHITE_L3__________________ KC_X, KC_R, KC_F, KC_DOT, KC_Z
159 159
160 160
161#define _________________HALMAK_L1_________________ KC_W, KC_L, KC_R, KC_B, KC_Z 161#define _________________HALMAK_L1_________________ KC_W, KC_L, KC_R, KC_B, KC_Z
162#define _________________HALMAK_L2_________________ KC_S, KC_H, KC_N, KC_T, KC_COMM 162#define _________________HALMAK_L2_________________ KC_S, KC_H, KC_N, KC_T, KC_COMM
163#define _________________HALMAK_L3_________________ KC_F, KC_M, KC_V, KC_V, KC_SLASH 163#define _________________HALMAK_L3_________________ KC_F, KC_M, KC_V, KC_V, KC_SLASH
164 164
165#define _________________HALMAK_R1_________________ KC_SCLN, KC_Q, KC_U, KC_D, KC_J 165#define _________________HALMAK_R1_________________ KC_SCLN, KC_Q, KC_U, KC_D, KC_J
166#define _________________HALMAK_R2_________________ KC_DOT, KC_A, KC_E, KC_O, KC_I, KC_QUOTE 166#define _________________HALMAK_R2_________________ KC_DOT, KC_A, KC_E, KC_O, KC_I, KC_QUOTE
167#define _________________HALMAK_R3_________________ KC_G, KC_P, KC_X, KC_K, KC_Y 167#define _________________HALMAK_R3_________________ KC_G, KC_P, KC_X, KC_K, KC_Y
168 168
169 169
170#define _________________HALMAK_L1_________________ KC_W, KC_L, KC_R, KC_B, KC_Z 170#define _________________HALMAK_L1_________________ KC_W, KC_L, KC_R, KC_B, KC_Z
171#define _________________HALMAK_L2_________________ KC_S, KC_H, KC_N, KC_T, KC_COMM 171#define _________________HALMAK_L2_________________ KC_S, KC_H, KC_N, KC_T, KC_COMM
172#define _________________HALMAK_L3_________________ KC_F, KC_M, KC_V, KC_V, KC_SLASH 172#define _________________HALMAK_L3_________________ KC_F, KC_M, KC_V, KC_V, KC_SLASH
173 173
174#define _________________HALMAK_R1_________________ KC_SCLN, KC_Q, KC_U, KC_D, KC_J 174#define _________________HALMAK_R1_________________ KC_SCLN, KC_Q, KC_U, KC_D, KC_J
175#define _________________HALMAK_R2_________________ KC_DOT, KC_A, KC_E, KC_O, KC_I, KC_QUOTE 175#define _________________HALMAK_R2_________________ KC_DOT, KC_A, KC_E, KC_O, KC_I, KC_QUOTE
176#define _________________HALMAK_R3_________________ KC_G, KC_P, KC_X, KC_K, KC_Y 176#define _________________HALMAK_R3_________________ KC_G, KC_P, KC_X, KC_K, KC_Y
177 177
178 178
179#define ________________NUMBER_LEFT________________ KC_1, KC_2, KC_3, KC_4, KC_5 179#define ________________NUMBER_LEFT________________ KC_1, KC_2, KC_3, KC_4, KC_5
@@ -181,35 +181,35 @@ NOTE: These are all the same length. If you do a search/replace
181#define _________________FUNC_LEFT_________________ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5 181#define _________________FUNC_LEFT_________________ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5
182#define _________________FUNC_RIGHT________________ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 182#define _________________FUNC_RIGHT________________ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10
183 183
184#define ___________________BLANK___________________ _______, _______, _______, _______, _______ 184#define ___________________BLANK___________________ _______, _______, _______, _______, _______
185 185
186 186
187#define _________________LOWER_L1__________________ KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC 187#define _________________LOWER_L1__________________ KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC
188#define _________________LOWER_L2__________________ _________________FUNC_LEFT_________________ 188#define _________________LOWER_L2__________________ _________________FUNC_LEFT_________________
189#define _________________LOWER_L3__________________ _________________FUNC_RIGHT________________ 189#define _________________LOWER_L3__________________ _________________FUNC_RIGHT________________
190 190
191#define _________________LOWER_R1__________________ KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN 191#define _________________LOWER_R1__________________ KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN
192#define _________________LOWER_R2__________________ _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR 192#define _________________LOWER_R2__________________ _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR
193#define _________________LOWER_R3__________________ _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END 193#define _________________LOWER_R3__________________ _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END
194 194
195 195
196 196
197#define _________________RAISE_L1__________________ ________________NUMBER_LEFT________________ 197#define _________________RAISE_L1__________________ ________________NUMBER_LEFT________________
198#define _________________RAISE_L2__________________ ___________________BLANK___________________ 198#define _________________RAISE_L2__________________ ___________________BLANK___________________
199#define _________________RAISE_L3__________________ ___________________BLANK___________________ 199#define _________________RAISE_L3__________________ ___________________BLANK___________________
200 200
201#define _________________RAISE_R1__________________ ________________NUMBER_RIGHT_______________ 201#define _________________RAISE_R1__________________ ________________NUMBER_RIGHT_______________
202#define _________________RAISE_R2__________________ _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC 202#define _________________RAISE_R2__________________ _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC
203#define _________________RAISE_R3__________________ _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT 203#define _________________RAISE_R3__________________ _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
204 204
205 205
206 206
207#define _________________ADJUST_L1_________________ RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_TOG 207#define _________________ADJUST_L1_________________ RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_TOG
208#define _________________ADJUST_L2_________________ MU_TOG , CK_TOGG, AU_ON, AU_OFF, CG_NORM 208#define _________________ADJUST_L2_________________ MU_TOG , CK_TOGG, AU_ON, AU_OFF, CG_NORM
209#define _________________ADJUST_L3_________________ RGB_RMOD,RGB_HUD,RGB_SAD, RGB_VAD, KC_RGB_T 209#define _________________ADJUST_L3_________________ RGB_RMOD,RGB_HUD,RGB_SAD, RGB_VAD, KC_RGB_T
210 210
211#define _________________ADJUST_R1_________________ KC_SEC1, KC_SEC2, KC_SEC3, KC_SEC4, KC_SEC5 211#define _________________ADJUST_R1_________________ KC_SEC1, KC_SEC2, KC_SEC3, KC_SEC4, KC_SEC5
212#define _________________ADJUST_R2_________________ CG_SWAP, QWERTY, COLEMAK, DVORAK, WORKMAN 212#define _________________ADJUST_R2_________________ CG_SWAP, DEFLYR1, DEFLYR2, DEFLYR3, DEFLYR4
213#define _________________ADJUST_R3_________________ MG_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT 213#define _________________ADJUST_R3_________________ MG_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT
214 214
215// clang-format on 215// clang-format on
diff --git a/users/dshields/rules.mk b/users/dshields/rules.mk
index 462649289..00e18521b 100644
--- a/users/dshields/rules.mk
+++ b/users/dshields/rules.mk
@@ -5,7 +5,6 @@ COMMAND_ENABLE = no # Commands for debug and configuration
5CONSOLE_ENABLE = no # Console for debug(+400) 5CONSOLE_ENABLE = no # Console for debug(+400)
6EXTRAKEY_ENABLE = no 6EXTRAKEY_ENABLE = no
7SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend 7SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
8API_SYSEX_ENABLE = no
9SPACE_CADET_ENABLE = no 8SPACE_CADET_ENABLE = no
10LEADER_ENABLE = no 9LEADER_ENABLE = no
11DYNAMIC_MACRO_ENABLE = yes 10DYNAMIC_MACRO_ENABLE = yes
diff --git a/users/edvorakjp/edvorakjp.c b/users/edvorakjp/edvorakjp.c
index d0cd106ff..c44d8bb44 100644
--- a/users/edvorakjp/edvorakjp.c
+++ b/users/edvorakjp/edvorakjp.c
@@ -7,7 +7,7 @@ void matrix_init_user(void) {
7 7
8__attribute__((weak)) void matrix_init_keymap() {} 8__attribute__((weak)) void matrix_init_keymap() {}
9 9
10uint32_t layer_state_set_user(uint32_t state) { 10layer_state_t layer_state_set_user(layer_state_t state) {
11 state = update_tri_layer_state(state, L_EDVORAKJP_LOWER, L_EDVORAKJP_RAISE, L_EDVORAKJP_ADJUST); 11 state = update_tri_layer_state(state, L_EDVORAKJP_LOWER, L_EDVORAKJP_RAISE, L_EDVORAKJP_ADJUST);
12 return layer_state_set_keymap(state); 12 return layer_state_set_keymap(state);
13} 13}
diff --git a/users/edvorakjp/edvorakjp.h b/users/edvorakjp/edvorakjp.h
index 5f20762c6..93cd9851b 100644
--- a/users/edvorakjp/edvorakjp.h
+++ b/users/edvorakjp/edvorakjp.h
@@ -67,7 +67,7 @@ enum tap_dance_code {
67// base 67// base
68void matrix_init_user(void); 68void matrix_init_user(void);
69void matrix_init_keymap(void); 69void matrix_init_keymap(void);
70uint32_t layer_state_set_user(uint32_t state); 70layer_state_t layer_state_set_user(layer_state_t state);
71uint32_t layer_state_set_keymap(uint32_t state); 71uint32_t layer_state_set_keymap(uint32_t state);
72bool process_record_user(uint16_t keycode, keyrecord_t *record); 72bool process_record_user(uint16_t keycode, keyrecord_t *record);
73bool process_record_keymap(uint16_t keycode, keyrecord_t *record); 73bool process_record_keymap(uint16_t keycode, keyrecord_t *record);
diff --git a/users/ericgebhart/base_layers.h b/users/ericgebhart/base_layers.h
index caf081057..fd88a40ae 100644
--- a/users/ericgebhart/base_layers.h
+++ b/users/ericgebhart/base_layers.h
@@ -87,7 +87,7 @@
87 87
88// the bottom rows for keyboards on bepo. 88// the bottom rows for keyboards on bepo.
89// bepo on bepo - not enough space to go around.... 89// bepo on bepo - not enough space to go around....
90#define ___BOTTOM_LEFT_BP___ LCTL(BP_C), BP_ECRC, LCTL(BP_V), KC_LEFT, KC_RIGHT 90#define ___BOTTOM_LEFT_BP___ LCTL(BP_C), BP_ECIR, LCTL(BP_V), KC_LEFT, KC_RIGHT
91#define ___BOTTOM_RIGHT_BP___ KC_UP, KC_DOWN, DB_BACKSLASH, BP_CCED, BP_PERC 91#define ___BOTTOM_RIGHT_BP___ KC_UP, KC_DOWN, DB_BACKSLASH, BP_CCED, BP_PERC
92 92
93// for dvorak on bepo 93// for dvorak on bepo
diff --git a/users/ericgebhart/core_keys.h b/users/ericgebhart/core_keys.h
index 035f74001..a71d90574 100644
--- a/users/ericgebhart/core_keys.h
+++ b/users/ericgebhart/core_keys.h
@@ -231,7 +231,7 @@ enum {
231#define BP_SFT_T_E SFT_T(BP_E) 231#define BP_SFT_T_E SFT_T(BP_E)
232#define BP_SFT_T_M SFT_T(BP_M) 232#define BP_SFT_T_M SFT_T(BP_M)
233 233
234#define BP_SFT_T_ECRC SFT_T(BP_ECRC) 234#define BP_SFT_T_ECRC SFT_T(BP_ECIR)
235#define BP_SFT_T_CCED SFT_T(BP_CCED) 235#define BP_SFT_T_CCED SFT_T(BP_CCED)
236#define BP_LT_SYMB_COMM LT(SYMB,BP_COMM) 236#define BP_LT_SYMB_COMM LT(SYMB,BP_COMM)
237 237
diff --git a/users/ericgebhart/core_keysets.h b/users/ericgebhart/core_keysets.h
index ffe02192f..5baf02ccf 100644
--- a/users/ericgebhart/core_keysets.h
+++ b/users/ericgebhart/core_keysets.h
@@ -111,33 +111,33 @@
111 111
112// Bepo on fr-bepo software layer 112// Bepo on fr-bepo software layer
113// for bepo on bepo 113// for bepo on bepo
114/* BP_DLR, BP_DQOT, BP_LGIL, BP_RGIL, BP_LPRN, BP_RPRN, KC_DEL, */ 114/* BP_DLR, BP_DQUO, BP_LDAQ, BP_RDAQ, BP_LPRN, BP_RPRN, KC_DEL, */
115#define ___SYMBOL_BEPO_L___ /* BP_DLR */ BP_DQOT, BP_LGIL, BP_RGIL, BP_LPRN, BP_RPRN 115#define ___SYMBOL_BEPO_L___ /* BP_DLR */ BP_DQUO, BP_LDAQ, BP_RDAQ, BP_LPRN, BP_RPRN
116/* KC_DEL, BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR, BP_EQL, */ 116/* KC_DEL, BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR, BP_EQL, */
117#define ___SYMBOL_BEPO_R___ BP_AT, BP_PLUS, BP_MINS, BP_SLASH, BP_ASTR /* BP_EQL, BP_PERC */ 117#define ___SYMBOL_BEPO_R___ BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR /* BP_EQL, BP_PERC */
118 118
119#define ___BEPO_FR_L1___ BP_B, BP_ECUT, BP_P, BP_O, BP_EGRV 119#define ___BEPO_FR_L1___ BP_B, BP_EACU, BP_P, BP_O, BP_EGRV
120#define ___BEPO_FR_L2___ BP_SFT_T_A, BP_LT_KP_U, BP_LT_SYMB_I, BP_LT_MDIA_E, BP_COMM 120#define ___BEPO_FR_L2___ BP_SFT_T_A, BP_LT_KP_U, BP_LT_SYMB_I, BP_LT_MDIA_E, BP_COMM
121#define ___BEPO_FR_L3___ /*BP_ECRC*/ BP_AGRV, BP_Y, BP_X, BP_DOT, BP_K 121#define ___BEPO_FR_L3___ /*BP_ECIR*/ BP_AGRV, BP_Y, BP_X, BP_DOT, BP_K
122 122
123#define ___BEPO_FR_R1___ /* BP_DCRC,*/ BP_V, BP_D, BP_L, BP_J, BP_Z 123#define ___BEPO_FR_R1___ /* BP_DCIR,*/ BP_V, BP_D, BP_L, BP_J, BP_Z
124#define ___BEPO_FR_R2___ /* BP_C, */ BP_T, BP_LT_SYMB_S, BP_LT_MDIA_R, BP_LT_KP_N, BP_SFT_T_M //BP_CCED 124#define ___BEPO_FR_R2___ /* BP_C, */ BP_T, BP_LT_SYMB_S, BP_LT_MDIA_R, BP_LT_KP_N, BP_SFT_T_M //BP_CCED
125#define ___BEPO_FR_R3___ BP_APOS, BP_Q, BP_G, BP_H, BP_F //BP_SFT_T_W 125#define ___BEPO_FR_R3___ BP_QUOT, BP_Q, BP_G, BP_H, BP_F //BP_SFT_T_W
126 126
127/* BP_DLR, BP_DQOT, BP_LGIL, BP_RGIL, BP_LPRN, BP_RPRN, KC_DEL, */ 127/* BP_DLR, BP_DQUO, BP_LDAQ, BP_RDAQ, BP_LPRN, BP_RPRN, KC_DEL, */
128/* KC_TAB, BP_B, BP_ECUT, BP_P, BP_O, BP_EGRV, KC_BSPC, */ 128/* KC_TAB, BP_B, BP_EACU, BP_P, BP_O, BP_EGRV, KC_BSPC, */
129/* KC_LSFT, BP_A, BP_U, BP_I, BP_E, BP_COMM, */ 129/* KC_LSFT, BP_A, BP_U, BP_I, BP_E, BP_COMM, */
130/* KC_LCTRL, BP_AGRV, BP_Y, BP_X, BP_DOT, BP_K, KC_ENT, */ 130/* KC_LCTRL, BP_AGRV, BP_Y, BP_X, BP_DOT, BP_K, KC_ENT, */
131/* ESC_FN, BP_ECRC, KC_LGUI, KC_LALT, SPC_RALT, */ 131/* ESC_FN, BP_ECIR, KC_LGUI, KC_LALT, SPC_RALT, */
132/* TT(SWAP), KC_MNXT, */ 132/* TT(SWAP), KC_MNXT, */
133/* KC_MPLY, */ 133/* KC_MPLY, */
134/* TT(FN), TT(NUMS), KC_MPRV, */ 134/* TT(FN), TT(NUMS), KC_MPRV, */
135 135
136/* /\* right hand *\/ */ 136/* /\* right hand *\/ */
137/* KC_DEL, BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR, BP_EQL, */ 137/* KC_DEL, BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR, BP_EQL, */
138/* KC_BSPC, BP_DCRC, BP_V, BP_D, BP_L, BP_J, BP_Z, */ 138/* KC_BSPC, BP_DCIR, BP_V, BP_D, BP_L, BP_J, BP_Z, */
139/* BP_C, BP_T, BP_S, BP_R, BP_N, M_RSFT, */ 139/* BP_C, BP_T, BP_S, BP_R, BP_N, M_RSFT, */
140/* KC_ENT, BP_APOS, BP_Q, BP_G, BP_H, BP_F, W_RCTL, */ 140/* KC_ENT, BP_QUOT, BP_Q, BP_G, BP_H, BP_F, W_RCTL, */
141 141
142 142
143/*******************************************************************/ 143/*******************************************************************/
@@ -183,7 +183,7 @@
183#define ___KEYPAD_4_ALT___ KC_P0, KC_DOT, KC_PENT, KC_PENT 183#define ___KEYPAD_4_ALT___ KC_P0, KC_DOT, KC_PENT, KC_PENT
184 184
185// For Bepo 185// For Bepo
186#define ___KEYPAD_1_BP___ DB_7, DB_8, DB_9, BP_SLASH 186#define ___KEYPAD_1_BP___ DB_7, DB_8, DB_9, BP_SLSH
187#define ___KEYPAD_2_BP___ DB_4, DB_5, DB_6, BP_ASTR 187#define ___KEYPAD_2_BP___ DB_4, DB_5, DB_6, BP_ASTR
188#define ___KEYPAD_3_BP___ DB_1, DB_2, DB_3, DB_MINUS 188#define ___KEYPAD_3_BP___ DB_1, DB_2, DB_3, DB_MINUS
189#define ___KEYPAD_4_BP___ DB_0, DB_DOT, DB_EQL, BP_PLUS 189#define ___KEYPAD_4_BP___ DB_0, DB_DOT, DB_EQL, BP_PLUS
@@ -225,9 +225,9 @@
225 225
226// SYMBOLS FOR BEPO 226// SYMBOLS FOR BEPO
227// The top row. Bepo has symbols not numbers. Numbers are the shifted values. 227// The top row. Bepo has symbols not numbers. Numbers are the shifted values.
228#define ___SYMBOL_BEPO_L___ /* BP_DLR */ BP_DQOT, BP_LGIL, BP_RGIL, BP_LPRN, BP_RPRN 228#define ___SYMBOL_BEPO_L___ /* BP_DLR */ BP_DQUO, BP_LDAQ, BP_RDAQ, BP_LPRN, BP_RPRN
229/* KC_DEL, BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR, BP_EQL, */ 229/* KC_DEL, BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR, BP_EQL, */
230#define ___SYMBOL_BEPO_R___ BP_AT, BP_PLUS, BP_MINS, BP_SLASH, BP_ASTR /* BP_EQL, BP_PERC */ 230#define ___SYMBOL_BEPO_R___ BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR /* BP_EQL, BP_PERC */
231 231
232// An arrangement for the left hand with a focus on the ()[]{}s. 232// An arrangement for the left hand with a focus on the ()[]{}s.
233#define ___SYMBOLS_1_BP___ KC_EXLM, BP_AT, DB_LCBR, DB_RCBR, DB_PIPE 233#define ___SYMBOLS_1_BP___ KC_EXLM, BP_AT, DB_LCBR, DB_RCBR, DB_PIPE
@@ -237,7 +237,7 @@
237// A larger 6 column arrangement for the left hand, A merge of dvorak and the above. 237// A larger 6 column arrangement for the left hand, A merge of dvorak and the above.
238#define ___SYMBOLS6_1_BP___ DB_GRV, DB_LESS, DB_GRTR, DB_LCBR, DB_RCBR, DB_HASH 238#define ___SYMBOLS6_1_BP___ DB_GRV, DB_LESS, DB_GRTR, DB_LCBR, DB_RCBR, DB_HASH
239#define ___SYMBOLS6_2_BP___ KC_AMPR, BP_AT, BP_ASTR, DB_LPRN, DB_RPRN, BP_PERC 239#define ___SYMBOLS6_2_BP___ KC_AMPR, BP_AT, BP_ASTR, DB_LPRN, DB_RPRN, BP_PERC
240#define ___SYMBOLS6_3_BP___ BP_DLR, BP_DQOT, DB_QUOT, DB_LBRC, DB_RBRC, KC_COLON 240#define ___SYMBOLS6_3_BP___ BP_DLR, BP_DQUO, DB_QUOT, DB_LBRC, DB_RBRC, KC_COLON
241#define ___SYMBOLS6_4_BP___ ___2___, DB_TILD, DB_DOT, KC_EXLM, DB_SCOLON 241#define ___SYMBOLS6_4_BP___ ___2___, DB_TILD, DB_DOT, KC_EXLM, DB_SCOLON
242 242
243#define ___SYMBOLS5_4_BP___ ___, DB_TILD, DB_DOT, KC_EXLM, DB_SCOLON 243#define ___SYMBOLS5_4_BP___ ___, DB_TILD, DB_DOT, KC_EXLM, DB_SCOLON
@@ -248,9 +248,9 @@
248#define ___SYMPAD_1_BP___ DB_GRV, BP_AMPR, BP_ASTR, DB_LCBR, BP_PLUS, DB_PIPE 248#define ___SYMPAD_1_BP___ DB_GRV, BP_AMPR, BP_ASTR, DB_LCBR, BP_PLUS, DB_PIPE
249#define ___SYMPAD_2_BP___ DB_TILD, BP_DLR, BP_PERC, DB_CIRC, BP_ASTR, DB_GRV 249#define ___SYMPAD_2_BP___ DB_TILD, BP_DLR, BP_PERC, DB_CIRC, BP_ASTR, DB_GRV
250#define ___SYMPAD_3_BP___ ___, BP_EXLM, BP_AT, DB_HASH, BP_MINS, BP_SLSH 250#define ___SYMPAD_3_BP___ ___, BP_EXLM, BP_AT, DB_HASH, BP_MINS, BP_SLSH
251#define ___SYMPAD_4_BP___ ___, DB_RCBR, DB_DOT, BP_EQL, BP_MINUS, DB_BACKSLASH 251#define ___SYMPAD_4_BP___ ___, DB_RCBR, DB_DOT, BP_EQL, BP_MINS, DB_BACKSLASH
252 252
253#define ___5_SYMPAD_4_BP___ DB_RCBR, DB_DOT, BP_EQL, BP_MINUS, DB_BACKSLASH 253#define ___5_SYMPAD_4_BP___ DB_RCBR, DB_DOT, BP_EQL, BP_MINS, DB_BACKSLASH
254 254
255// Parts are parts. 255// Parts are parts.
256// MOUSE, ARROW and MEDIA KEY SETS 256// MOUSE, ARROW and MEDIA KEY SETS
diff --git a/users/ericgebhart/ericgebhart.c b/users/ericgebhart/ericgebhart.c
index abb87899b..d34563865 100644
--- a/users/ericgebhart/ericgebhart.c
+++ b/users/ericgebhart/ericgebhart.c
@@ -86,25 +86,25 @@ static void switch_default_layer(uint8_t layer) {
86// reasnably sized array without difficulties. The macro is for the constant declarations 86// reasnably sized array without difficulties. The macro is for the constant declarations
87// the function is for when we use it. 87// the function is for when we use it.
88const uint8_t key_translations[][2][2] = { 88const uint8_t key_translations[][2][2] = {
89 [GR(DB_1)] = {{BP_DQOT, MOD_LSFT}, {BP_DCRC, MOD_LSFT}}, 89 [GR(DB_1)] = {{BP_DQUO, MOD_LSFT}, {BP_DCIR, MOD_LSFT}},
90 [GR(DB_2)] = {{BP_LGIL, MOD_LSFT}, {BP_AT, MOD_NONE}}, 90 [GR(DB_2)] = {{BP_LDAQ, MOD_LSFT}, {BP_AT, MOD_NONE}},
91 [GR(DB_3)] = {{BP_RGIL, MOD_LSFT}, {BP_DLR, MOD_LSFT}}, 91 [GR(DB_3)] = {{BP_RDAQ, MOD_LSFT}, {BP_DLR, MOD_LSFT}},
92 [GR(DB_4)] = {{BP_LPRN, MOD_LSFT}, {BP_DLR, MOD_NONE}}, 92 [GR(DB_4)] = {{BP_LPRN, MOD_LSFT}, {BP_DLR, MOD_NONE}},
93 [GR(DB_5)] = {{BP_RPRN, MOD_LSFT}, {BP_PERC, MOD_NONE}}, 93 [GR(DB_5)] = {{BP_RPRN, MOD_LSFT}, {BP_PERC, MOD_NONE}},
94 [GR(DB_6)] = {{BP_AT, MOD_LSFT}, {BP_AT, MOD_BIT(KC_RALT)}}, 94 [GR(DB_6)] = {{BP_AT, MOD_LSFT}, {BP_AT, MOD_BIT(KC_RALT)}},
95 [GR(DB_7)] = {{BP_PLUS, MOD_LSFT}, {BP_P, MOD_BIT(KC_RALT)}}, 95 [GR(DB_7)] = {{BP_PLUS, MOD_LSFT}, {BP_P, MOD_BIT(KC_RALT)}},
96 [GR(DB_8)] = {{BP_MINS, MOD_LSFT}, {BP_ASTR, MOD_NONE}}, 96 [GR(DB_8)] = {{BP_MINS, MOD_LSFT}, {BP_ASTR, MOD_NONE}},
97 [GR(DB_9)] = {{BP_SLASH, MOD_LSFT}, {BP_LPRN, MOD_NONE}}, 97 [GR(DB_9)] = {{BP_SLSH, MOD_LSFT}, {BP_LPRN, MOD_NONE}},
98 [GR(DB_0)] = {{BP_ASTR, MOD_LSFT}, {BP_RPRN, MOD_NONE}}, 98 [GR(DB_0)] = {{BP_ASTR, MOD_LSFT}, {BP_RPRN, MOD_NONE}},
99 [GR(DB_GRV)] = {{BP_PERC, MOD_LSFT}, {BP_K, MOD_BIT(KC_RALT)}}, 99 [GR(DB_GRV)] = {{BP_PERC, MOD_LSFT}, {BP_K, MOD_BIT(KC_RALT)}},
100 [GR(DB_SCOLON)] = {{BP_COMM, MOD_LSFT}, {BP_DOT, MOD_LSFT}}, 100 [GR(DB_SCOLON)] = {{BP_COMM, MOD_LSFT}, {BP_DOT, MOD_LSFT}},
101 [GR(DB_SLASH)] = {{BP_SLASH, MOD_NONE}, {BP_APOS, MOD_LSFT}}, 101 [GR(DB_SLASH)] = {{BP_SLSH, MOD_NONE}, {BP_QUOT, MOD_LSFT}},
102 [GR(DB_BACKSLASH)] = {{BP_AGRV, MOD_BIT(KC_RALT)}, {BP_B, MOD_BIT(KC_RALT)}}, 102 [GR(DB_BACKSLASH)] = {{BP_AGRV, MOD_BIT(KC_RALT)}, {BP_B, MOD_BIT(KC_RALT)}},
103 [GR(DB_EQL)] = {{BP_EQL, MOD_NONE}, {BP_PLUS, MOD_NONE}}, 103 [GR(DB_EQL)] = {{BP_EQL, MOD_NONE}, {BP_PLUS, MOD_NONE}},
104 [GR(DB_COMM)] = {{BP_COMMA, MOD_NONE}, {BP_LGIL, MOD_BIT(KC_RALT)}}, 104 [GR(DB_COMM)] = {{BP_COMM, MOD_NONE}, {BP_LDAQ, MOD_BIT(KC_RALT)}},
105 [GR(DB_DOT)] = {{BP_DOT, MOD_NONE}, {BP_RGIL, MOD_BIT(KC_RALT)}}, 105 [GR(DB_DOT)] = {{BP_DOT, MOD_NONE}, {BP_RDAQ, MOD_BIT(KC_RALT)}},
106 [GR(DB_QUOT)] = {{BP_APOS, MOD_NONE}, {BP_DQOT, MOD_NONE}}, 106 [GR(DB_QUOT)] = {{BP_QUOT, MOD_NONE}, {BP_DQUO, MOD_NONE}},
107 [GR(DB_MINUS)] = {{BP_MINUS, MOD_NONE}, {KC_SPC, MOD_BIT(KC_RALT)}}, 107 [GR(DB_MINUS)] = {{BP_MINS, MOD_NONE}, {KC_SPC, MOD_BIT(KC_RALT)}},
108 [GR(DB_LPRN)] = {{BP_LPRN, MOD_NONE}, {BP_LPRN, MOD_BIT(KC_RALT)}}, 108 [GR(DB_LPRN)] = {{BP_LPRN, MOD_NONE}, {BP_LPRN, MOD_BIT(KC_RALT)}},
109 [GR(DB_RPRN)] = {{BP_RPRN, MOD_NONE}, {BP_RPRN, MOD_BIT(KC_RALT)}}, 109 [GR(DB_RPRN)] = {{BP_RPRN, MOD_NONE}, {BP_RPRN, MOD_BIT(KC_RALT)}},
110 [GR(DB_LBRC)] = {{BP_Y, MOD_BIT(KC_RALT)}, {BP_LPRN, MOD_BIT(KC_RALT)}}, 110 [GR(DB_LBRC)] = {{BP_Y, MOD_BIT(KC_RALT)}, {BP_LPRN, MOD_BIT(KC_RALT)}},
@@ -116,8 +116,8 @@ const uint8_t key_translations[][2][2] = {
116 [GR(DB_PIPE)] = {{BP_B, MOD_BIT(KC_RALT)}, {BP_B, MOD_BIT(KC_RALT)}}, 116 [GR(DB_PIPE)] = {{BP_B, MOD_BIT(KC_RALT)}, {BP_B, MOD_BIT(KC_RALT)}},
117 [GR(DB_TILD)] = {{BP_K, MOD_BIT(KC_RALT)}, {BP_K, MOD_BIT(KC_RALT)}}, 117 [GR(DB_TILD)] = {{BP_K, MOD_BIT(KC_RALT)}, {BP_K, MOD_BIT(KC_RALT)}},
118 [GR(DB_CIRC)] = {{BP_AT, MOD_BIT(KC_RALT)}, {BP_AT, MOD_BIT(KC_RALT)}}, 118 [GR(DB_CIRC)] = {{BP_AT, MOD_BIT(KC_RALT)}, {BP_AT, MOD_BIT(KC_RALT)}},
119 [GR(DB_LESS)] = {{BP_LGIL, MOD_BIT(KC_RALT)}, {BP_LGIL, MOD_BIT(KC_RALT)}}, 119 [GR(DB_LESS)] = {{BP_LDAQ, MOD_BIT(KC_RALT)}, {BP_LDAQ, MOD_BIT(KC_RALT)}},
120 [GR(DB_GRTR)] = {{BP_RGIL, MOD_BIT(KC_RALT)}, {BP_RGIL, MOD_BIT(KC_RALT)}}, 120 [GR(DB_GRTR)] = {{BP_RDAQ, MOD_BIT(KC_RALT)}, {BP_RDAQ, MOD_BIT(KC_RALT)}},
121}; 121};
122 122
123 123
diff --git a/users/ericgebhart/rules.mk b/users/ericgebhart/rules.mk
index 70017a595..698f6131e 100755
--- a/users/ericgebhart/rules.mk
+++ b/users/ericgebhart/rules.mk
@@ -9,7 +9,6 @@ KEY_LOCK_ENABLE = yes # Enable the KC_LOCK key
9TAP_DANCE_ENABLE = yes # Enable the tap dance feature. 9TAP_DANCE_ENABLE = yes # Enable the tap dance feature.
10CONSOLE_ENABLE = no # Console for debug 10CONSOLE_ENABLE = no # Console for debug
11 11
12BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration 12BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
13UNICODE_ENABLE = no 13UNICODE_ENABLE = no
14SLEEP_LED_ENABLE = no 14SLEEP_LED_ENABLE = no
15API_SYSEX_ENABLE = no
diff --git a/users/gordon/rules.mk b/users/gordon/rules.mk
index 06e671a63..c282f0028 100644
--- a/users/gordon/rules.mk
+++ b/users/gordon/rules.mk
@@ -1,4 +1,3 @@
1TAP_DANCE_ENABLE = yes 1TAP_DANCE_ENABLE = yes
2SRC += gordon.c 2SRC += gordon.c
3 3
4# BOOTMAGIC_ENABLE = full
diff --git a/users/issmirnov/rules.mk b/users/issmirnov/rules.mk
index 93ec21b01..d96083f7d 100644
--- a/users/issmirnov/rules.mk
+++ b/users/issmirnov/rules.mk
@@ -19,7 +19,7 @@ NKRO_ENABLE = no # note: also needs FORCE_NKRO in config.h
19# Disable unused features to save on space 19# Disable unused features to save on space
20# https://thomasbaart.nl/2018/12/01/reducing-firmware-size-in-qmk/ 20# https://thomasbaart.nl/2018/12/01/reducing-firmware-size-in-qmk/
21MOUSEKEY_ENABLE = no # 2000 bytes 21MOUSEKEY_ENABLE = no # 2000 bytes
22BOOTMAGIC_ENABLE = no 22BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
23COMMAND_ENABLE = no # https://beta.docs.qmk.fm/features/feature_command 23COMMAND_ENABLE = no # https://beta.docs.qmk.fm/features/feature_command
24UNICODE_ENABLE = no # Unicode 24UNICODE_ENABLE = no # Unicode
25SWAP_HANDS_ENABLE = no # Allow swapping hands of keyboard 25SWAP_HANDS_ENABLE = no # Allow swapping hands of keyboard
diff --git a/users/jdelkins/rules.mk b/users/jdelkins/rules.mk
index 76d391d70..075aab7d3 100644
--- a/users/jdelkins/rules.mk
+++ b/users/jdelkins/rules.mk
@@ -12,4 +12,4 @@ users/jdelkins/secrets.h: users/jdelkins/secrets.h.gpg
12 gpg -d $< >$@ 12 gpg -d $< >$@
13endif 13endif
14 14
15BOOTMAGIC_ENABLE = no 15BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
diff --git a/users/konstantin/konstantin.c b/users/konstantin/konstantin.c
index 72aca9fb8..3fdf5a4ca 100644
--- a/users/konstantin/konstantin.c
+++ b/users/konstantin/konstantin.c
@@ -97,7 +97,7 @@ uint32_t layer_state_set_keymap(uint32_t state) {
97 return state; 97 return state;
98} 98}
99 99
100uint32_t layer_state_set_user(uint32_t state) { 100layer_state_t layer_state_set_user(layer_state_t state) {
101 state = layer_state_set_keymap(state); 101 state = layer_state_set_keymap(state);
102 102
103#ifdef LAYER_NUMPAD 103#ifdef LAYER_NUMPAD
diff --git a/users/kuchosauronad0/kuchosauronad0.c b/users/kuchosauronad0/kuchosauronad0.c
index 6c38d0f10..a8f17b08e 100644
--- a/users/kuchosauronad0/kuchosauronad0.c
+++ b/users/kuchosauronad0/kuchosauronad0.c
@@ -1,5 +1,5 @@
1/* 1/*
2Copyright 2019 Andre Poley <andre.poley@mailbox.org> 2Copyright 2019 Andre Poley <andre.poley@mailbox.org>
3 3
4This program is free software: you can redistribute it and/or modify 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 5it under the terms of the GNU General Public License as published by
@@ -123,7 +123,7 @@ uint32_t layer_state_set_keymap (uint32_t state) {
123 123
124// on layer change, no matter where the change was initiated 124// on layer change, no matter where the change was initiated
125// Then runs keymap's layer change check 125// Then runs keymap's layer change check
126uint32_t layer_state_set_user(uint32_t state) { 126layer_state_t layer_state_set_user(layer_state_t state) {
127 state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); 127 state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST);
128#ifdef RGBLIGHT_ENABLE 128#ifdef RGBLIGHT_ENABLE
129 state = layer_state_set_rgb(state); 129 state = layer_state_set_rgb(state);
diff --git a/users/losinggeneration/rules.mk b/users/losinggeneration/rules.mk
index 295367fbc..41d6f9167 100644
--- a/users/losinggeneration/rules.mk
+++ b/users/losinggeneration/rules.mk
@@ -2,7 +2,6 @@
2# Only enable things here that are generic to all keyboards. A yes or no here 2# Only enable things here that are generic to all keyboards. A yes or no here
3# will override keyboard/keymap specific values 3# will override keyboard/keymap specific values
4# 4#
5#BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
6#COMMAND_ENABLE = no # Commands for debug and configuration 5#COMMAND_ENABLE = no # Commands for debug and configuration
7#CONSOLE_ENABLE = no # Console for debug(+400) 6#CONSOLE_ENABLE = no # Console for debug(+400)
8EXTRAKEY_ENABLE = yes # Audio control and System control(+450) 7EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
diff --git a/users/miles2go/keymaps/handwired/ms_sculpt_mobile/rules.mk b/users/miles2go/keymaps/handwired/ms_sculpt_mobile/rules.mk
index 7eb39e108..41273a9a6 100644
--- a/users/miles2go/keymaps/handwired/ms_sculpt_mobile/rules.mk
+++ b/users/miles2go/keymaps/handwired/ms_sculpt_mobile/rules.mk
@@ -2,7 +2,7 @@
2# change to "no" to disable the options, or define them in the Makefile in 2# change to "no" to disable the options, or define them in the Makefile in
3# the appropriate keymap folder that will get included automatically 3# the appropriate keymap folder that will get included automatically
4# 4#
5BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration 5BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
6MOUSEKEY_ENABLE = yes # Mouse keys 6MOUSEKEY_ENABLE = yes # Mouse keys
7EXTRAKEY_ENABLE = yes # Audio control and System control 7EXTRAKEY_ENABLE = yes # Audio control and System control
8CONSOLE_ENABLE = no # Console for debug 8CONSOLE_ENABLE = no # Console for debug
diff --git a/users/mtdjr/mtdjr.c b/users/mtdjr/mtdjr.c
index c31b077b4..9c6c26bc8 100644
--- a/users/mtdjr/mtdjr.c
+++ b/users/mtdjr/mtdjr.c
@@ -136,7 +136,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
136 return true; 136 return true;
137}; 137};
138 138
139uint32_t layer_state_set_user(uint32_t state) { 139layer_state_t layer_state_set_user(layer_state_t state) {
140 switch (biton32(state)) { 140 switch (biton32(state)) {
141 case _RAISE: 141 case _RAISE:
142 #ifdef RGBLIGHT_ENABLE 142 #ifdef RGBLIGHT_ENABLE
diff --git a/users/ninjonas/rules.mk b/users/ninjonas/rules.mk
index a5cd0fdd9..7ff8f24b9 100644
--- a/users/ninjonas/rules.mk
+++ b/users/ninjonas/rules.mk
@@ -1,4 +1,4 @@
1BOOTMAGIC_ENABLE = no # Disable Boot Magic (https://beta.docs.qmk.fm/features/feature_bootmagic) 1BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
2MOUSEKEY_ENABLE = yes # Mouse keys(+4700) 2MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
3EXTRAKEY_ENABLE = yes # Audio control and System control(+450) 3EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
4TAP_DANCE_ENABLE = yes # Enable Tap Dance. 4TAP_DANCE_ENABLE = yes # Enable Tap Dance.
diff --git a/users/pvinis/pvinis.c b/users/pvinis/pvinis.c
index 31c3023e8..71f9210ae 100644
--- a/users/pvinis/pvinis.c
+++ b/users/pvinis/pvinis.c
@@ -10,7 +10,7 @@ float song_test[][2] = SONG(QWERTY_SOUND);
10#endif 10#endif
11 11
12// SYMBOL + SYSCTL = KBCTL 12// SYMBOL + SYSCTL = KBCTL
13uint32_t layer_state_set_user(uint32_t state) { 13layer_state_t layer_state_set_user(layer_state_t state) {
14 uint32_t intermediate_state = update_tri_layer_state(state, LR_SYMBOL, LR_SYSCTL, LR_KBCTL); 14 uint32_t intermediate_state = update_tri_layer_state(state, LR_SYMBOL, LR_SYSCTL, LR_KBCTL);
15 intermediate_state = layer_state_set_user_keymap(intermediate_state); 15 intermediate_state = layer_state_set_user_keymap(intermediate_state);
16 return intermediate_state; 16 return intermediate_state;
diff --git a/users/ridingqwerty/rules.mk b/users/ridingqwerty/rules.mk
index 153e5ff90..93b88068e 100644
--- a/users/ridingqwerty/rules.mk
+++ b/users/ridingqwerty/rules.mk
@@ -1,7 +1,7 @@
1SRC += ridingqwerty.c \ 1SRC += ridingqwerty.c \
2 process_records.c 2 process_records.c
3 3
4BOOTMAGIC_ENABLE = lite 4BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite
5CONSOLE_ENABLE = no 5CONSOLE_ENABLE = no
6COMMAND_ENABLE = no 6COMMAND_ENABLE = no
7UNICODE_ENABLE = no # "yes" in Atreus default keymap, blocking UNICODEMAP_ENABLE 7UNICODE_ENABLE = no # "yes" in Atreus default keymap, blocking UNICODEMAP_ENABLE
diff --git a/users/romus/romus.c b/users/romus/romus.c
index 35b524f94..f707bb884 100644
--- a/users/romus/romus.c
+++ b/users/romus/romus.c
@@ -72,7 +72,7 @@ __attribute__ ((weak)) void led_set_keymap(uint8_t usb_led) { }
72// Set RGBLIGHT state depending on layer 72// Set RGBLIGHT state depending on layer
73void rgblight_change( uint8_t this_layer ) { 73void rgblight_change( uint8_t this_layer ) {
74 // Enable RGB light; will not work without this 74 // Enable RGB light; will not work without this
75 //rgblight_enable_noeeprom(); 75 //rgblight_enable_noeeprom();
76 // Change RGB light 76 // Change RGB light
77 switch ( this_layer ) { 77 switch ( this_layer ) {
78 case _DV: 78 case _DV:
@@ -83,21 +83,21 @@ void rgblight_change( uint8_t this_layer ) {
83 // Do yellow for alternate 83 // Do yellow for alternate
84 rgblight_enable_noeeprom(); 84 rgblight_enable_noeeprom();
85 rgblight_sethsv_noeeprom( 60,255,255); 85 rgblight_sethsv_noeeprom( 60,255,255);
86 86
87 87
88 break; 88 break;
89 case _GA: 89 case _GA:
90 // Do purple for game 90 // Do purple for game
91 rgblight_enable_noeeprom(); 91 rgblight_enable_noeeprom();
92 rgblight_sethsv_noeeprom(285,255,255); 92 rgblight_sethsv_noeeprom(285,255,255);
93 93
94 94
95 break; 95 break;
96 case _NU: 96 case _NU:
97 // Do azure for number 97 // Do azure for number
98 rgblight_enable_noeeprom(); 98 rgblight_enable_noeeprom();
99 rgblight_sethsv_noeeprom(186,200,255); 99 rgblight_sethsv_noeeprom(186,200,255);
100 100
101 101
102 break; 102 break;
103 case _SE: 103 case _SE:
@@ -105,27 +105,27 @@ void rgblight_change( uint8_t this_layer ) {
105 rgblight_enable_noeeprom(); 105 rgblight_enable_noeeprom();
106 106
107 rgblight_sethsv_noeeprom( 16,255,255); 107 rgblight_sethsv_noeeprom( 16,255,255);
108 108
109 break; 109 break;
110 case _MO: 110 case _MO:
111 // Do green for mouse 111 // Do green for mouse
112 rgblight_enable_noeeprom(); 112 rgblight_enable_noeeprom();
113 rgblight_sethsv_noeeprom(120,255,255); 113 rgblight_sethsv_noeeprom(120,255,255);
114 114
115 115
116 break; 116 break;
117 case _MU: 117 case _MU:
118 // Do orange for music 118 // Do orange for music
119 119
120 rgblight_enable_noeeprom(); 120 rgblight_enable_noeeprom();
121 rgblight_sethsv_noeeprom( 39,255,255); 121 rgblight_sethsv_noeeprom( 39,255,255);
122 122
123 break; 123 break;
124 default: 124 default:
125 // Something went wrong 125 // Something went wrong
126 rgblight_enable_noeeprom(); 126 rgblight_enable_noeeprom();
127 rgblight_sethsv_noeeprom( 0,255,255); 127 rgblight_sethsv_noeeprom( 0,255,255);
128 128
129 break; 129 break;
130 } 130 }
131} 131}
@@ -189,7 +189,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
189 } 189 }
190 return false; 190 return false;
191 break; 191 break;
192#endif 192#endif
193 193
194 // Lock functionality: These layers are locked if the LOCKED buttons are 194 // Lock functionality: These layers are locked if the LOCKED buttons are
195 // pressed. Otherwise, they are momentary toggles 195 // pressed. Otherwise, they are momentary toggles
@@ -225,7 +225,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
225 } 225 }
226 return false; 226 return false;
227 break; 227 break;
228 228
229 // Layer switches with sound 229 // Layer switches with sound
230 case K_GAMES: 230 case K_GAMES:
231 if (record->event.pressed) { 231 if (record->event.pressed) {
@@ -546,7 +546,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
546|*-----LAYER CHANGE-----*| 546|*-----LAYER CHANGE-----*|
547\*----------------------*/ 547\*----------------------*/
548 548
549uint32_t layer_state_set_user(uint32_t state) { 549layer_state_t layer_state_set_user(layer_state_t state) {
550 550
551 state = layer_state_set_keymap (state); 551 state = layer_state_set_keymap (state);
552#ifdef RGBLIGHT_ENABLE 552#ifdef RGBLIGHT_ENABLE
@@ -554,4 +554,4 @@ uint32_t layer_state_set_user(uint32_t state) {
554 rgblight_change( biton32(state) ); 554 rgblight_change( biton32(state) );
555#endif 555#endif
556 return state; 556 return state;
557} \ No newline at end of file 557}
diff --git a/users/romus/rules.mk b/users/romus/rules.mk
index 12bbabb02..32a5ab092 100644
--- a/users/romus/rules.mk
+++ b/users/romus/rules.mk
@@ -10,14 +10,12 @@ ifndef BLUETOOTH_ENABLE
10 BLUETOOTH_ENABLE = no # No bluetooth 10 BLUETOOTH_ENABLE = no # No bluetooth
11endif 11endif
12COMMAND_ENABLE = no # Some bootmagic thing i dont use 12COMMAND_ENABLE = no # Some bootmagic thing i dont use
13BOOTMAGIC_ENABLE = no # Access to EEPROM settings, not needed 13BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
14CONSOLE_ENABLE = no # Allows console output with a command 14CONSOLE_ENABLE = no # Allows console output with a command
15SLEEP_LED_ENABLE = no # Breathes LED's when computer is asleep. Untested. 15SLEEP_LED_ENABLE = no # Breathes LED's when computer is asleep. Untested.
16NKRO_ENABLE = no # Default is 6KRO which is plenty 16NKRO_ENABLE = no # Default is 6KRO which is plenty
17MIDI_ENABLE = no # Untested feature 17MIDI_ENABLE = no # Untested feature
18KEY_LOCK_ENABLE = no # Allows locking any key. Not used 18KEY_LOCK_ENABLE = no # Allows locking any key. Not used
19API_SYSEX_ENABLE = no # Allows OS to send signals.
20
21 19
22# Disabling this makes it compile, i dont know why 20# Disabling this makes it compile, i dont know why
23# VARIABLE_TRACE = no # Allows debugging variables 21# VARIABLE_TRACE = no # Allows debugging variables
diff --git a/users/sigul/sigul.c b/users/sigul/sigul.c
index 0995ca736..16bcd411d 100644
--- a/users/sigul/sigul.c
+++ b/users/sigul/sigul.c
@@ -40,13 +40,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
40 case IT_APDQ: 40 case IT_APDQ:
41 if (record->event.pressed){ 41 if (record->event.pressed){
42 if (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)){ 42 if (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)){
43 register_code16(IT_DQOT); 43 register_code16(IT_DQUO);
44 } else { 44 } else {
45 register_code16(IT_APOS); 45 register_code16(IT_QUOT);
46 } 46 }
47 } else { 47 } else {
48 unregister_code16(IT_DQOT); 48 unregister_code16(IT_DQUO);
49 unregister_code16(IT_APOS); 49 unregister_code16(IT_QUOT);
50 } 50 }
51 return false; 51 return false;
52 break; 52 break;
@@ -55,13 +55,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
55 if (record->event.pressed){ 55 if (record->event.pressed){
56 if (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)){ 56 if (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)){
57 unregister_code16(KC_LSFT); 57 unregister_code16(KC_LSFT);
58 register_code16(IT_LESS); 58 register_code16(IT_LABK);
59 register_code16(KC_LSFT); 59 register_code16(KC_LSFT);
60 } else { 60 } else {
61 register_code16(IT_COMM); 61 register_code16(IT_COMM);
62 } 62 }
63 } else { 63 } else {
64 unregister_code16(IT_LESS); 64 unregister_code16(IT_LABK);
65 unregister_code16(IT_COMM); 65 unregister_code16(IT_COMM);
66 } 66 }
67 return false; 67 return false;
@@ -70,12 +70,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
70 case IT_DTMR: 70 case IT_DTMR:
71 if (record->event.pressed){ 71 if (record->event.pressed){
72 if (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)){ 72 if (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)){
73 register_code16(IT_MORE); 73 register_code16(IT_RABK);
74 } else { 74 } else {
75 register_code16(IT_DOT); 75 register_code16(IT_DOT);
76 } 76 }
77 } else { 77 } else {
78 unregister_code16(IT_MORE); 78 unregister_code16(IT_RABK);
79 unregister_code16(IT_DOT); 79 unregister_code16(IT_DOT);
80 } 80 }
81 return false; 81 return false;
@@ -84,12 +84,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
84 case IT_SLQS: 84 case IT_SLQS:
85 if (record->event.pressed){ 85 if (record->event.pressed){
86 if (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)){ 86 if (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)){
87 register_code16(IT_QST); 87 register_code16(IT_QUES);
88 } else { 88 } else {
89 register_code16(IT_SLSH); 89 register_code16(IT_SLSH);
90 } 90 }
91 } else { 91 } else {
92 unregister_code16(IT_QST); 92 unregister_code16(IT_QUES);
93 unregister_code16(IT_SLSH); 93 unregister_code16(IT_SLSH);
94 } 94 }
95 return false; 95 return false;
diff --git a/users/sigul/sigul.h b/users/sigul/sigul.h
index 6adc67063..8f806017c 100644
--- a/users/sigul/sigul.h
+++ b/users/sigul/sigul.h
@@ -15,10 +15,10 @@ enum userspace_layers {
15enum userspace_custom_keycodes { 15enum userspace_custom_keycodes {
16 QWERTY = SAFE_RANGE, 16 QWERTY = SAFE_RANGE,
17 // custom keycodes for an Italian ANSI layout with accented vowels 17 // custom keycodes for an Italian ANSI layout with accented vowels
18 IT_CMLS, // IT_COMM and IT_LESS when combined with shift 18 IT_CMLS, // IT_COMM and IT_LABK when combined with shift
19 IT_DTMR, // IT_DOT and IT_MORE when combined with shift 19 IT_DTMR, // IT_DOT and IT_RABK when combined with shift
20 IT_SLQS, // IT_SLSH and IT_QST when combined with shift 20 IT_SLQS, // IT_SLSH and IT_QUES when combined with shift
21 IT_APDQ, // IT_APO and IT_DQOT when combined with shift 21 IT_APDQ, // IT_APO and IT_DQUO when combined with shift
22 IT_SCCL, // IT_SMCL and IT_COLN when combined with shift 22 IT_SCCL, // IT_SMCL and IT_COLN when combined with shift
23 SECRET0, 23 SECRET0,
24 SECRET1, 24 SECRET1,
diff --git a/users/spacebarracecar/spacebarracecar.c b/users/spacebarracecar/spacebarracecar.c
index bbd864aa9..3141b8758 100644
--- a/users/spacebarracecar/spacebarracecar.c
+++ b/users/spacebarracecar/spacebarracecar.c
@@ -178,11 +178,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
178 } 178 }
179 return false; 179 return false;
180 case CU_AE: 180 case CU_AE:
181 UML(DE_AE) 181 UML(DE_ADIA)
182 case CU_OE: 182 case CU_OE:
183 UML(DE_OE) 183 UML(DE_ODIA)
184 case CU_UE: 184 case CU_UE:
185 UML(DE_UE) 185 UML(DE_UDIA)
186 case CU_SS: 186 case CU_SS:
187 if(record->event.pressed) { 187 if(record->event.pressed) {
188 timer_timeout(); 188 timer_timeout();
@@ -291,9 +291,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
291 } 291 }
292 return false; 292 return false;
293 case CU_COMM: 293 case CU_COMM:
294 SHIFT_NO(DE_COMM, DE_LESS) 294 SHIFT_NO(DE_COMM, DE_LABK)
295 case CU_DOT: 295 case CU_DOT:
296 SHIFT_NORM(DE_DOT, DE_LESS) 296 SHIFT_NORM(DE_DOT, DE_LABK)
297 case CU_SLSH: 297 case CU_SLSH:
298 SHIFT_ALL(DE_7, DE_SS) 298 SHIFT_ALL(DE_7, DE_SS)
299 case CU_SCLN: 299 case CU_SCLN:
@@ -315,7 +315,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
315 case CU_RBRC: 315 case CU_RBRC:
316 SHIFT_ALGR(DE_9, DE_0) 316 SHIFT_ALGR(DE_9, DE_0)
317 case CU_BSLS: 317 case CU_BSLS:
318 SHIFT_ALGR(DE_SS, DE_LESS) 318 SHIFT_ALGR(DE_SS, DE_LABK)
319 case CU_Z: 319 case CU_Z:
320 CTRL(DE_Z, KC_Z) 320 CTRL(DE_Z, KC_Z)
321 case CU_Y: 321 case CU_Y:
diff --git a/users/spidey3/config.h b/users/spidey3/config.h
index 7062fde03..f5f5e07f0 100644
--- a/users/spidey3/config.h
+++ b/users/spidey3/config.h
@@ -1,7 +1,7 @@
1#pragma once 1#pragma once
2 2
3#define LED_DISABLE_WHEN_USB_SUSPENDED true 3#define LED_DISABLE_WHEN_USB_SUSPENDED
4#define RGB_DISABLE_WHEN_USB_SUSPENDED true 4#define RGB_DISABLE_WHEN_USB_SUSPENDED
5#define RGBLIGHT_LAYERS 5#define RGBLIGHT_LAYERS
6#define RGBLIGHT_MAX_LAYERS 17 6#define RGBLIGHT_MAX_LAYERS 17
7#define RGBLIGHT_LAYER_BLINK 7#define RGBLIGHT_LAYER_BLINK
diff --git a/users/spidey3/rules.mk b/users/spidey3/rules.mk
index bd378f545..69327038b 100644
--- a/users/spidey3/rules.mk
+++ b/users/spidey3/rules.mk
@@ -1,4 +1,4 @@
1BOOTMAGIC_ENABLE = lite 1BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite
2CONSOLE_ENABLE = yes # Console for debug 2CONSOLE_ENABLE = yes # Console for debug
3BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality 3BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
4LTO_ENABLE = yes 4LTO_ENABLE = yes
diff --git a/users/spotpuff/rules.mk b/users/spotpuff/rules.mk
index 279054837..7b4abdbc1 100644
--- a/users/spotpuff/rules.mk
+++ b/users/spotpuff/rules.mk
@@ -1 +1 @@
BOOTMAGIC_ENABLE = no BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
diff --git a/users/stanrc85/layer_rgb.c b/users/stanrc85/layer_rgb.c
index 58f17489a..6d57198f3 100644
--- a/users/stanrc85/layer_rgb.c
+++ b/users/stanrc85/layer_rgb.c
@@ -4,7 +4,7 @@ void matrix_init_user(void) {
4 rgblight_setrgb(0xFF, 0x00, 0x00); 4 rgblight_setrgb(0xFF, 0x00, 0x00);
5}; 5};
6 6
7uint32_t layer_state_set_user(uint32_t state) { 7layer_state_t layer_state_set_user(layer_state_t state) {
8 switch (biton32(state)) { 8 switch (biton32(state)) {
9 case 0: 9 case 0:
10 rgblight_setrgb (0xFF, 0x00, 0x00); 10 rgblight_setrgb (0xFF, 0x00, 0x00);
diff --git a/users/talljoe/rules.mk b/users/talljoe/rules.mk
index 42ffb411a..632e725b7 100644
--- a/users/talljoe/rules.mk
+++ b/users/talljoe/rules.mk
@@ -13,4 +13,4 @@ TAP_DANCE_ENABLE=yes
13CONSOLE_ENABLE=no 13CONSOLE_ENABLE=no
14COMMAND_ENABLE=no 14COMMAND_ENABLE=no
15DYNAMIC_KEYMAP_ENABLE=no 15DYNAMIC_KEYMAP_ENABLE=no
16BOOTMAGIC_ENABLE=full 16BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite
diff --git a/users/talljoe/talljoe.h b/users/talljoe/talljoe.h
index f151bde68..cdb01a974 100644
--- a/users/talljoe/talljoe.h
+++ b/users/talljoe/talljoe.h
@@ -92,6 +92,7 @@ enum layers {
92#define MLT_E LT(_NUM, KC_E) 92#define MLT_E LT(_NUM, KC_E)
93 93
94#ifndef SWAP_HANDS_ENABLE 94#ifndef SWAP_HANDS_ENABLE
95#undef SH_T
95#define SH_T 96#define SH_T
96#endif 97#endif
97 98
diff --git a/users/tominabox1/config.h b/users/tominabox1/config.h
index 2a8c1e943..004f58ab5 100644
--- a/users/tominabox1/config.h
+++ b/users/tominabox1/config.h
@@ -31,7 +31,7 @@
31// RGB_Matrix settings 31// RGB_Matrix settings
32#ifdef RGB_MATRIX_ENABLE 32#ifdef RGB_MATRIX_ENABLE
33 #define RGB_MATRIX_KEYPRESSES // reacts to keypresses 33 #define RGB_MATRIX_KEYPRESSES // reacts to keypresses
34 #define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended 34 #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
35 #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) 35 #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
36 #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. 36 #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash.
37 #define RGB_MATRIX_HUE_STEP 8 37 #define RGB_MATRIX_HUE_STEP 8
diff --git a/users/tominabox1/rules.mk b/users/tominabox1/rules.mk
index 22b6a858f..a7759f802 100644
--- a/users/tominabox1/rules.mk
+++ b/users/tominabox1/rules.mk
@@ -5,7 +5,7 @@
5CONSOLE_ENABLE = no 5CONSOLE_ENABLE = no
6TAP_DANCE_ENABLE = yes 6TAP_DANCE_ENABLE = yes
7NKRO_ENABLE = yes 7NKRO_ENABLE = yes
8BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration 8BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite
9 9
10ifeq ($(strip $(KEYBOARD)), crkbd/rev1) 10ifeq ($(strip $(KEYBOARD)), crkbd/rev1)
11RGB_MATRIX_ENABLE = yes 11RGB_MATRIX_ENABLE = yes
diff --git a/users/tominabox1/tominabox1.c b/users/tominabox1/tominabox1.c
index d2e9e1258..34fe3068a 100644
--- a/users/tominabox1/tominabox1.c
+++ b/users/tominabox1/tominabox1.c
@@ -126,7 +126,7 @@ layer_state_t layer_state_set_keymap (layer_state_t state) {
126 return state; 126 return state;
127} 127}
128 128
129uint32_t layer_state_set_user(uint32_t state) { 129layer_state_t layer_state_set_user(layer_state_t state) {
130 state = update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); 130 state = update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
131 switch (biton32(state)) { 131 switch (biton32(state)) {
132 case _LOWER: 132 case _LOWER:
diff --git a/users/turbomech/backupturbomech.c b/users/turbomech/backupturbomech.c
index 2815aa452..aaea05df9 100644
--- a/users/turbomech/backupturbomech.c
+++ b/users/turbomech/backupturbomech.c
@@ -296,7 +296,7 @@ case RGB_MODE_GRADIENT:
296 296
297} 297}
298 298
299uint32_t layer_state_set_user(uint32_t state) { 299layer_state_t layer_state_set_user(layer_state_t state) {
300#ifdef RGBLIGHT_ENABLE 300#ifdef RGBLIGHT_ENABLE
301 uint8_t default_layer = eeconfig_read_default_layer(); 301 uint8_t default_layer = eeconfig_read_default_layer();
302 if (rgb_layer_change) { 302 if (rgb_layer_change) {
diff --git a/users/xulkal/process_records.c b/users/xulkal/process_records.c
index b6a4e5cfa..47996110b 100644
--- a/users/xulkal/process_records.c
+++ b/users/xulkal/process_records.c
@@ -6,7 +6,7 @@
6#endif 6#endif
7 7
8#ifdef TRILAYER_ENABLED 8#ifdef TRILAYER_ENABLED
9uint32_t layer_state_set_user(uint32_t state) 9layer_state_t layer_state_set_user(layer_state_t state)
10{ 10{
11 return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); 11 return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
12} 12}
diff --git a/users/yanfali/rules.mk b/users/yanfali/rules.mk
index 467adceef..631dda4fb 100644
--- a/users/yanfali/rules.mk
+++ b/users/yanfali/rules.mk
@@ -1,4 +1,4 @@
1BOOTMAGIC_ENABLE = lite 1BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite
2DYNAMIC_KEYMAP_ENABLE = no 2DYNAMIC_KEYMAP_ENABLE = no
3LTO_ENABLE = yes 3LTO_ENABLE = yes
4AUDIO_ENABLE = no 4AUDIO_ENABLE = no