aboutsummaryrefslogtreecommitdiff
path: root/users
diff options
context:
space:
mode:
authorJames Young <18669334+noroadsleft@users.noreply.github.com>2021-05-29 14:38:50 -0700
committerGitHub <noreply@github.com>2021-05-29 14:38:50 -0700
commit1646c0f26cfa21a7023d404008e4d0aa4917193d (patch)
tree337ab0498a929285a234518fee34a4d9dcf51656 /users
parentf55e39e8a2246f6f96fd5d4a84a866e2615cde7b (diff)
downloadqmk_firmware-1646c0f26cfa21a7023d404008e4d0aa4917193d.tar.gz
qmk_firmware-1646c0f26cfa21a7023d404008e4d0aa4917193d.zip
2021 May 29 Breaking Changes Update (#13034)
* Add Per Key functionality for AutoShift (#11536) * LED Matrix: Reactive effect buffers & advanced indicators (#12588) * [Keyboard] kint36: switch to sym_eager_pk debouncing (#12626) * [Keyboard] kint2pp: reduce input latency by ≈10ms (#12625) * LED Matrix: Split (#12633) * [CI] Format code according to conventions (#12650) * feat: infinite timeout for leader key (#6580) * feat: implement leader_no_timeout logic * docs(leader_key): infinite leader timeout docs * Format code according to conventions (#12680) * Update ADC driver for STM32F1xx, STM32F3xx, STM32F4xx (#12403) * Fix default ADC_RESOLUTION for ADCv3 (and ADCv4) Recent ChibiOS update removed ADC_CFGR1_RES_10BIT from the ADCv3 headers (that macro should not have been there, because ADCv3 has CFGR instead of CFGR1). Fix the default value for ADC_RESOLUTION to use ADC_CFGR_RES_10BITS if it is defined (that name is used for ADCv3 and ADCv4). * Update ADC docs to match the actually used resolution ADC driver for ChibiOS actually uses the 10-bit resolution by default (probably to match AVR); fix the documentation accordingly. Also add both ADC_CFGR_RES_10BITS and ADC_CFGR1_RES_10BIT constants (these names differ according to the ADC implementation in the particular MCU). * Fix pinToMux() for B12 and B13 on STM32F3xx Testing on STM32F303CCT6 revealed that the ADC mux values for B12 and B13 pins were wrong. * Add support for all possible analog pins on STM32F1xx Added ADC mux values for pins A0...A7, B0, B1, C0...C5 on STM32F1xx (they are the same at least for STM32F103x8 and larger F103 devices, and also F102, F105, F107 families). Actually tested on STM32F103C8T6 (therefore pins C0...C5 were not tested). Pins F6...F10, which are present on STM32F103x[C-G] in 144-pin packages, cannot be supported at the moment, because those pins are connected only to ADC3, but the ChibiOS ADC driver for STM32F1xx supports only ADC1. * Add support for all possible analog pins on STM32F4xx Added ADC mux values for pins A0...A7, B0, B1, C0...C5 and optionally F3...F10 (if STM32_ADC_USE_ADC3 is enabled). These mux values are apparently the same for all F4xx devices, except some smaller devices may not have ADC3. Actually tested on STM32F401CCU6, STM32F401CEU6, STM32F411CEU6 (using various WeAct “Blackpill” boards); only pins A0...A7, B0, B1 were tested. Pins F3...F10 are inside `#if STM32_ADC_USE_ADC3` because some devices which don't have ADC3 also don't have the GPIOF port, therefore the code which refers to Fx pins does not compile. * Fix STM32F3xx ADC mux table in documentation The ADC driver documentation had some errors in the mux table for STM32F3xx. Fix this table to match the datasheet and the actual code (mux settings for B12 and B13 were also tested on a real STM32F303CCT6 chip). * Add STM32F1xx ADC pins to the documentation * Add STM32F4xx ADC pins to the documentation * Add initial support for tinyuf2 bootloader (when hosted on F411 blackpill) (#12600) * Add support for jumping to tinyuf2 bootloader. Adds blackpill UF2 example. * Update flashing.md * Update chconf.h * Update config.h * Update halconf.h * Update mcuconf.h * eeprom driver: Refactor where eeprom driver initialisation (and EEPROM emulation initialisation) occurs to make it non-target-specific. (#12671) * Add support for MCU = STM32F446 (#12619) * Add support for MCU = STM32F446 * Update platforms/chibios/GENERIC_STM32_F446XE/configs/config.h * Restore mcuconf.h to the one used by RT-STM32F446RE-NUCLEO64 * stm32f446: update mcuconf.h and board.h for 16MHz operation, with USB enabled, and other peripherals disabled. * Format code according to conventions (#12682) * Format code according to conventions (#12687) * Add STM32L433 and L443 support (#12063) * initial L433 commit * change to XC * fix L433 * disable all peripherals * update system and peripheral clocks * 433 change * use its own board files * revert its own board files * l433 specific change * fix stm32l432xx define * remove duplicate #define * fix bootloader jump * move to L443xx and add i2c2, spi2, usart3 to mcuconf.h * move to L443 * move to L443 * fix sdmmc in mcuconf.h * include STM32L443 * add L443 * Include L443 in compatible microcontrollers * Include L443 in compatible microcontrollers * Update config bootloader jump description * Update ChibiOS define reasoning * Update quantum/mcu_selection.mk * fix git conflict * Updated Function96 with V2 files and removed chconf.h and halconf.h (#12613) * Fix bad PR merge for #6580. (#12721) * Change RGB/LED Matrix to use a simple define for USB suspend (#12697) * [CI] Format code according to conventions (#12731) * Fixing transport's led/rgb matrix suspend state logic (#12770) * [CI] Format code according to conventions (#12772) * Fix comment parsing (#12750) * Added OLED fade out support (#12086) * fix some references to bin/qmk that slipped in (#12832) * Resolve a number of warnings in `qmk generate-api` (#12833) * New command: qmk console (#12828) * stash poc * stash * tidy up implementation * Tidy up slightly for review * Tidy up slightly for review * Bodge environment to make tests pass * Refactor away from asyncio due to windows issues * Filter devices * align vid/pid printing * Add hidapi to the installers * start preparing for multiple hid_listeners * udev rules for hid_listen * refactor to move closer to end state * very basic implementation of the threaded model * refactor how vid/pid/index are supplied and parsed * windows improvements * read the report directly when usage page isn't available * add per-device colors, the choice to show names or numbers, and refactor * add timestamps * Add support for showing bootloaders * tweak the color for bootloaders * Align bootloader disconnect with connect color * add support for showing all bootloaders * fix the pyusb check * tweaks * fix exception * hide a stack trace behind -v * add --no-bootloaders option * add documentation for qmk console * Apply suggestions from code review * pyformat * clean up and flesh out KNOWN_BOOTLOADERS * Remove pointless SERIAL_LINK_ENABLE rules (#12846) * Make Swap Hands use PROGMEM (#12284) This converts the array that the Swap Hands feature uses to use PROGMEM, and to read from that array, as such. Since this array never changes at runtime, there is no reason to keep it in memory. Especially for AVR boards, as memory is a precious resource. * Fix another bin/qmk reference (#12856) * [Keymap] Turn OLED off on suspend in soundmonster keymap (#10419) * Fixup build errors on `develop` branch. (#12723) * LED Matrix: Effects! (#12651) * Fix syntax error when compiling for ARM (#12866) * Remove KEYMAP and LAYOUT_kc (#12160) * alias KEYMAP to LAYOUT * remove KEYMAP and LAYOUT_kc * Add setup, clone, and env to the list of commands we allow even with broken modules (#12868) * Rename `point_t` -> `led_point_t` (#12864) * [Keyboard] updated a vendor name / fixed minor keymap issues (#12881) * Add missing LED Matrix suspend code to suspend.c (#12878) * LED Matrix: Documentation (#12685) * Deprecate `send_unicode_hex_string()` (#12602) * Fix spelling mistake regarding LED Matrix in split_common. (#12888) * [Keymap] Fix QWERTY/DVORAK status output for kzar keymap (#12895) * Use milc.subcommand.config instead of qmk.cli.config (#12915) * Use milc.subcommand.config instead * pyformat * remove the config test * Add function to allow repeated blinking of one layer (#12237) * Implement function rgblight_blink_layer_repeat to allow repeated blinking of one layer at a time * Update doc * Rework rgblight blinking according to requested change * optimize storage * Fixup housekeeping from being invoked twice per loop. (#12933) * matrix: wait for row signal to go HIGH for every row (#12945) I noticed this discrepancy (last row of the matrix treated differently than the others) when optimizing the input latency of my keyboard controller, see also https://michael.stapelberg.ch/posts/2021-05-08-keyboard-input-latency-qmk-kinesis/ Before this commit, when tuning the delays I noticed ghost key presses when pressing the F2 key, which is on the last row of the keyboard matrix: the dead_grave key, which is on the first row of the keyboard matrix, would be incorrectly detected as pressed. After this commit, all keyboard matrix rows are interpreted correctly. I suspect that my setup is more susceptible to this nuance than others because I use GPIO_INPUT_PIN_DELAY=0 and hence don’t have another delay that might mask the problem. * ensure we do not conflict with existing keymap aliases (#12976) * Add support for up to 4 IS31FL3733 drivers (#12342) * Convert Encoder callbacks to be boolean functions (#12805) * [Keyboard] Fix Terrazzo build failure (#12977) * Do not hard set config in CPTC files (#11864) * [Keyboard] Corne - Remove legacy revision support (#12226) * [Keymap] Update to Drashna keymap and user code (based on develop) (#12936) * Add Full-duplex serial driver for ARM boards (#9842) * Document LED_MATRIX_FRAMEBUFFER_EFFECTS (#12987) * Backlight: add defines for default level and breathing state (#12560) * Add dire message about LUFA mass storage bootloader (#13014) * [Keyboard] Remove redundant legacy and common headers for crkbd (#13023) Was causing compiler errors on some systems. * Fix keyboards/keymaps for boolean encoder callback changes (#12985) * `backlight.c`: include `eeprom.h` (#13024) * Add changelog for 2021-05-29 Breaking Changes merge (#12939) * Add ChangeLog for 2021-05-29 Breaking Changes Merge: initial version * Add recent develop changes * Sort recent develop changes * Remove sections for ChibiOS changes per tzarc No ChibiOS changes this round. * Add and sort recent develop changes * add notes about keyboard moves/deletions * import changelog for PR 12172 Documents the change to BOOTMAGIC_ENABLE. * update section headings * re-sort changelog * add additional note regarding Bootmagic changes * remove changelog timestamp * update dates in main Breaking Changes docs * fix broken section anchors in previous changelogs * add link to backlight/eeprom patch to changelog * highlight some more changes * link PRs from section headers * Restore standard readme * run: qmk cformat --core-only
Diffstat (limited to 'users')
-rw-r--r--users/arkag/arkag.c26
-rw-r--r--users/curry/process_records.c16
-rw-r--r--users/d4mation/macros.c28
-rw-r--r--users/drashna/config.h11
-rw-r--r--users/drashna/drashna.c3
-rw-r--r--users/drashna/drashna.h1
-rw-r--r--users/drashna/drashna_transport.c199
-rw-r--r--users/drashna/oled_stuff.c55
-rw-r--r--users/drashna/oled_stuff.h4
-rw-r--r--users/drashna/pimoroni_trackball.c4
-rw-r--r--users/drashna/process_records.h2
-rw-r--r--users/drashna/rgb_matrix_stuff.c4
-rw-r--r--users/drashna/rgb_stuff.c37
-rw-r--r--users/drashna/rules.mk77
-rw-r--r--users/gordon/rules.mk2
-rw-r--r--users/greatwizard/greatwizard.c3
-rw-r--r--users/kuchosauronad0/encoder.c3
-rw-r--r--users/kuchosauronad0/encoder.h2
-rw-r--r--users/kuchosauronad0/process_records.c16
-rw-r--r--users/kuchosauronad0/unicode.h2
-rw-r--r--users/ninjonas/encoder.c7
-rw-r--r--users/ridingqwerty/process_records.c54
-rw-r--r--users/rs/rs.h4
-rw-r--r--users/stanrc85/stanrc85.c7
-rw-r--r--users/xulkal/custom_encoder.c3
-rw-r--r--users/yet-another-developer/process_records.c16
-rw-r--r--users/yet-another-developer/unicode.h2
27 files changed, 368 insertions, 220 deletions
diff --git a/users/arkag/arkag.c b/users/arkag/arkag.c
index 564c234c3..ea716ecda 100644
--- a/users/arkag/arkag.c
+++ b/users/arkag/arkag.c
@@ -363,7 +363,7 @@ void matrix_scan_user(void) {
363 surround_type(4, KC_GRAVE, true); 363 surround_type(4, KC_GRAVE, true);
364 } 364 }
365 SEQ_ONE_KEY(KC_C) { 365 SEQ_ONE_KEY(KC_C) {
366 send_unicode_hex_string("00E7"); 366 register_unicode(0x00E7); // ç
367 } 367 }
368 SEQ_TWO_KEYS(KC_A, KC_V) { 368 SEQ_TWO_KEYS(KC_A, KC_V) {
369 surround_type(2, KC_QUOT, true); 369 surround_type(2, KC_QUOT, true);
@@ -384,10 +384,10 @@ void matrix_scan_user(void) {
384 surround_type(6, KC_GRAVE, false); 384 surround_type(6, KC_GRAVE, false);
385 } 385 }
386 SEQ_ONE_KEY(KC_E) { 386 SEQ_ONE_KEY(KC_E) {
387 send_unicode_hex_string("00E8"); 387 register_unicode(0x00E8); // è
388 } 388 }
389 SEQ_TWO_KEYS(KC_E, KC_E) { 389 SEQ_TWO_KEYS(KC_E, KC_E) {
390 send_unicode_hex_string("00E9"); 390 register_unicode(0x00E9); // é
391 } 391 }
392 // end format functions 392 // end format functions
393 393
@@ -407,8 +407,7 @@ void matrix_scan_user(void) {
407 407
408 // start typing functions 408 // start typing functions
409 SEQ_TWO_KEYS(KC_T, KC_M) { 409 SEQ_TWO_KEYS(KC_T, KC_M) {
410 // ™ 410 register_unicode(0x2122); // ™
411 send_unicode_hex_string("2122");
412 } 411 }
413 SEQ_TWO_KEYS(KC_D, KC_D) { 412 SEQ_TWO_KEYS(KC_D, KC_D) {
414 SEND_STRING(".\\Administrator"); 413 SEND_STRING(".\\Administrator");
@@ -420,27 +419,22 @@ void matrix_scan_user(void) {
420 tap_code(KC_ENTER); 419 tap_code(KC_ENTER);
421 } 420 }
422 SEQ_THREE_KEYS(KC_L, KC_O, KC_D) { 421 SEQ_THREE_KEYS(KC_L, KC_O, KC_D) {
423 // ಠ__ಠ 422 send_unicode_string("ಠ__ಠ");
424 send_unicode_hex_string("0CA0 005F 005F 0CA0");
425 } 423 }
426 SEQ_THREE_KEYS(KC_M, KC_A, KC_P) { 424 SEQ_THREE_KEYS(KC_M, KC_A, KC_P) {
427 SEND_STRING("https://github.com/qmk/qmk_firmware/tree/master/users/arkag"); 425 SEND_STRING("https://github.com/qmk/qmk_firmware/tree/master/users/arkag");
428 } 426 }
429 SEQ_TWO_KEYS(KC_F, KC_F) { 427 SEQ_TWO_KEYS(KC_F, KC_F) {
430 // (╯‵Д′)╯彡┻━┻ 428 send_unicode_string("(╯‵Д′)╯彡┻━┻");
431 send_unicode_hex_string("0028 256F 2035 0414 2032 0029 256F 5F61 253B 2501 253B");
432 } 429 }
433 SEQ_THREE_KEYS(KC_F, KC_F, KC_F) { 430 SEQ_THREE_KEYS(KC_F, KC_F, KC_F) {
434 // ┬─┬ノ( º _ º ノ) 431 send_unicode_string("┬─┬ノ( º _ º ノ)");
435 send_unicode_hex_string("252C 2500 252C 30CE 0028 0020 00BA 0020 005F 0020 00BA 0020 30CE 0029");
436 } 432 }
437 SEQ_THREE_KEYS(KC_L, KC_O, KC_L) { 433 SEQ_THREE_KEYS(KC_L, KC_O, KC_L) {
438 // ( ͡° ͜ʖ ͡°) 434 send_unicode_string("( ͡° ͜ʖ ͡°)");
439 send_unicode_hex_string("0028 0020 0361 00B0 0020 035C 0296 0020 0361 00B0 0029");
440 } 435 }
441 SEQ_THREE_KEYS(KC_S, KC_S, KC_S) { 436 SEQ_THREE_KEYS(KC_S, KC_S, KC_S) {
442 // ¯\_(ツ)_/¯ 437 send_unicode_string("¯\\_(ツ)_/¯");
443 send_unicode_hex_string("00AF 005C 005F 0028 30C4 0029 005F 002F 00AF");
444 } 438 }
445 // end typing functions 439 // end typing functions
446 440
@@ -513,7 +507,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
513 507
514 case M_DASH: 508 case M_DASH:
515 if (record->event.pressed){ 509 if (record->event.pressed){
516 send_unicode_hex_string("2014"); 510 register_unicode(0x2014); // —
517 } 511 }
518 return false; 512 return false;
519 case M_LMHYP: 513 case M_LMHYP:
diff --git a/users/curry/process_records.c b/users/curry/process_records.c
index fd58ea181..3b5c00192 100644
--- a/users/curry/process_records.c
+++ b/users/curry/process_records.c
@@ -46,24 +46,24 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
46 } 46 }
47 break; 47 break;
48#if defined(UNICODE_ENABLE) 48#if defined(UNICODE_ENABLE)
49 case UC_FLIP: // (ノಠ痊ಠ)ノ彡┻━┻ 49 case UC_FLIP:
50 if (record->event.pressed) { 50 if (record->event.pressed) {
51 send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B"); 51 send_unicode_string("(ノಠ痊ಠ)ノ彡┻━┻");
52 } 52 }
53 break; 53 break;
54 case UC_TABL: // ┬─┬ノ( º _ ºノ) 54 case UC_TABL:
55 if (record->event.pressed) { 55 if (record->event.pressed) {
56 send_unicode_hex_string("252C 2500 252C 30CE 0028 0020 00BA 0020 005F 0020 00BA 30CE 0029"); 56 send_unicode_string("┬─┬ノ( º _ ºノ)");
57 } 57 }
58 break; 58 break;
59 case UC_SHRG: // ¯\_(ツ)_/¯ 59 case UC_SHRG:
60 if (record->event.pressed) { 60 if (record->event.pressed) {
61 send_unicode_hex_string("00AF 005C 005F 0028 30C4 0029 005F 002F 00AF"); 61 send_unicode_string("¯\\_(ツ)_/¯");
62 } 62 }
63 break; 63 break;
64 case UC_DISA: // ಠ_ಠ 64 case UC_DISA:
65 if (record->event.pressed) { 65 if (record->event.pressed) {
66 send_unicode_hex_string("0CA0 005F 0CA0"); 66 send_unicode_string("ಠ_ಠ");
67 } 67 }
68 break; 68 break;
69#endif 69#endif
diff --git a/users/d4mation/macros.c b/users/d4mation/macros.c
index 3c115d7ea..a8ca119b1 100644
--- a/users/d4mation/macros.c
+++ b/users/d4mation/macros.c
@@ -45,75 +45,75 @@ bool process_record_user( uint16_t keycode, keyrecord_t *record ) {
45 45
46 #ifdef UNICODE_ENABLE 46 #ifdef UNICODE_ENABLE
47 47
48 case AMENO: /* ༼ つ ◕_◕ ༽つ */ 48 case AMENO:
49 49
50 if ( record->event.pressed ) { 50 if ( record->event.pressed ) {
51 51
52 send_unicode_hex_string( "0F3C 0020 3064 0020 25D5 005F 25D5 0020 0F3D 3064" ); 52 send_unicode_string( " ◕_◕ ༽つ" );
53 53
54 } 54 }
55 55
56 return false; 56 return false;
57 break; 57 break;
58 58
59 case MAGIC: /* (∩ ͡° ͜ʖ ͡°)⊃━☆゚. * */ 59 case MAGIC:
60 60
61 if ( record->event.pressed ) { 61 if ( record->event.pressed ) {
62 62
63 send_unicode_hex_string( "0028 2229 0020 0361 00B0 0020 035C 0296 0020 0361 00B0 0029 2283 2501 2606 FF9F 002E 0020 002A" ); 63 send_unicode_string( "(∩ ͡° ͜ʖ ͡°)⊃━☆゚. *" );
64 64
65 } 65 }
66 66
67 return false; 67 return false;
68 break; 68 break;
69 69
70 case LENNY: /* ( ͡° ͜ʖ ͡°) */ 70 case LENNY:
71 71
72 if ( record->event.pressed ) { 72 if ( record->event.pressed ) {
73 73
74 send_unicode_hex_string( "0028 0020 0361 00B0 0020 035C 0296 0020 0361 00b0 0029" ); 74 send_unicode_string( "( ͡° ͜ʖ ͡°)" );
75 75
76 } 76 }
77 77
78 return false; 78 return false;
79 break; 79 break;
80 80
81 case DISFACE: /* ಠ_ಠ */ 81 case DISFACE:
82 82
83 if ( record->event.pressed ) { 83 if ( record->event.pressed ) {
84 send_unicode_hex_string( "0CA0 005F 0CA0" ); 84 send_unicode_string( "ಠ_ಠ" );
85 } 85 }
86 86
87 return false; 87 return false;
88 break; 88 break;
89 89
90 case TFLIP: /* (╯°□°)╯ ︵ ┻━┻ */ 90 case TFLIP:
91 91
92 if ( record->event.pressed ) { 92 if ( record->event.pressed ) {
93 93
94 send_unicode_hex_string( "0028 256F 00b0 25A1 00B0 0029 256F FE35 253B 2501 253B" ); 94 send_unicode_string( "(╯°□°)╯︵┻━┻" );
95 95
96 } 96 }
97 97
98 return false; 98 return false;
99 break; 99 break;
100 100
101 case TPUT: /* ┬──┬ ノ( ゜-゜ノ) */ 101 case TPUT:
102 102
103 if ( record->event.pressed ) { 103 if ( record->event.pressed ) {
104 104
105 send_unicode_hex_string( "252C 2500 2500 252C 0020 30CE 0028 0020 309C 002D 309C 30CE 0029" ); 105 send_unicode_string( "┬──┬ ノ( ゜-゜ノ)" );
106 106
107 } 107 }
108 108
109 return false; 109 return false;
110 break; 110 break;
111 111
112 case SHRUG: /* ¯\_(ツ)_/¯ */ 112 case SHRUG:
113 113
114 if ( record->event.pressed ) { 114 if ( record->event.pressed ) {
115 115
116 send_unicode_hex_string( "00AF 005C 005F 0028 30C4 0029 005F 002F 00AF" ); 116 send_unicode_string( "¯\\_(ツ)_/¯" );
117 117
118 } 118 }
119 119
diff --git a/users/drashna/config.h b/users/drashna/config.h
index 8081af9cc..5f7c32ff3 100644
--- a/users/drashna/config.h
+++ b/users/drashna/config.h
@@ -24,7 +24,7 @@
24 24
25#if defined(SPLIT_KEYBOARD) 25#if defined(SPLIT_KEYBOARD)
26# define SPLIT_MODS_ENABLE 26# define SPLIT_MODS_ENABLE
27// # define SPLIT_TRANSPORT_MIRROR 27# define SPLIT_TRANSPORT_MIRROR
28# define SERIAL_USE_MULTI_TRANSACTION 28# define SERIAL_USE_MULTI_TRANSACTION
29// # define SPLIT_NUM_TRANSACTIONS_KB 2 29// # define SPLIT_NUM_TRANSACTIONS_KB 2
30#endif 30#endif
@@ -56,6 +56,8 @@
56# else 56# else
57# define RGBLIGHT_ANIMATIONS 57# define RGBLIGHT_ANIMATIONS
58# endif 58# endif
59# define RGBLIGHT_EFFECT_TWINKLE_LIFE 250
60# define RGBLIGHT_EFFECT_TWINKLE_PROBABILITY 1/24
59#endif // RGBLIGHT_ENABLE 61#endif // RGBLIGHT_ENABLE
60 62
61#ifdef RGB_MATRIX_ENABLE 63#ifdef RGB_MATRIX_ENABLE
@@ -115,6 +117,9 @@
115# define OLED_UPDATE_INTERVAL 15 117# define OLED_UPDATE_INTERVAL 15
116# endif 118# endif
117# define OLED_DISABLE_TIMEOUT 119# define OLED_DISABLE_TIMEOUT
120# ifdef OLED_FONT_H
121# undef OLED_FONT_H
122# endif
118# define OLED_FONT_H "drashna_font.h" 123# define OLED_FONT_H "drashna_font.h"
119# define OLED_FONT_END 255 124# define OLED_FONT_END 255
120// # define OLED_FONT_5X5 125// # define OLED_FONT_5X5
@@ -149,7 +154,9 @@
149#undef PERMISSIVE_HOLD 154#undef PERMISSIVE_HOLD
150//#define TAPPING_FORCE_HOLD 155//#define TAPPING_FORCE_HOLD
151//#define RETRO_TAPPING 156//#define RETRO_TAPPING
152#define TAPPING_TERM_PER_KEY 157#ifndef KEYBOARD_kyria_rev1
158# define TAPPING_TERM_PER_KEY
159#endif
153 160
154#define FORCE_NKRO 161#define FORCE_NKRO
155 162
diff --git a/users/drashna/drashna.c b/users/drashna/drashna.c
index 6a13f0d9b..a49373726 100644
--- a/users/drashna/drashna.c
+++ b/users/drashna/drashna.c
@@ -164,6 +164,7 @@ layer_state_t layer_state_set_user(layer_state_t state) {
164 return state; 164 return state;
165 } 165 }
166 166
167 state = layer_state_set_keymap(state);
167 state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); 168 state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST);
168#if defined(RGBLIGHT_ENABLE) 169#if defined(RGBLIGHT_ENABLE)
169 state = layer_state_set_rgb_light(state); 170 state = layer_state_set_rgb_light(state);
@@ -179,7 +180,7 @@ layer_state_t layer_state_set_user(layer_state_t state) {
179 } 180 }
180 } 181 }
181#endif 182#endif
182 return layer_state_set_keymap(state); 183 return state;
183} 184}
184 185
185__attribute__((weak)) layer_state_t default_layer_state_set_keymap(layer_state_t state) { return state; } 186__attribute__((weak)) layer_state_t default_layer_state_set_keymap(layer_state_t state) { return state; }
diff --git a/users/drashna/drashna.h b/users/drashna/drashna.h
index 9a18a8296..e66f10657 100644
--- a/users/drashna/drashna.h
+++ b/users/drashna/drashna.h
@@ -47,7 +47,6 @@ enum userspace_layers {
47 _MALTRON, 47 _MALTRON,
48 _EUCALYN, 48 _EUCALYN,
49 _CARPLAX, 49 _CARPLAX,
50 _MODS, /* layer 8 */
51 _GAMEPAD, 50 _GAMEPAD,
52 _DIABLO, 51 _DIABLO,
53 _MACROS, 52 _MACROS,
diff --git a/users/drashna/drashna_transport.c b/users/drashna/drashna_transport.c
index f0908b490..9df11c9bd 100644
--- a/users/drashna/drashna_transport.c
+++ b/users/drashna/drashna_transport.c
@@ -21,6 +21,7 @@
21#include QMK_KEYBOARD_H 21#include QMK_KEYBOARD_H
22 22
23#define ROWS_PER_HAND (MATRIX_ROWS / 2) 23#define ROWS_PER_HAND (MATRIX_ROWS / 2)
24#define SYNC_TIMER_OFFSET 2
24 25
25#ifdef RGBLIGHT_ENABLE 26#ifdef RGBLIGHT_ENABLE
26# include "rgblight.h" 27# include "rgblight.h"
@@ -37,19 +38,33 @@ static pin_t encoders_pad[] = ENCODERS_PAD_A;
37#endif 38#endif
38 39
39#ifdef POINTING_DEVICE_ENABLE 40#ifdef POINTING_DEVICE_ENABLE
40static int8_t split_mouse_x = 0, split_mouse_y = 0; 41static uint16_t device_cpi = 0;
42static int8_t split_mouse_x = 0, split_mouse_y = 0;
41#endif 43#endif
42 44
43#ifdef OLED_DRIVER_ENABLE 45#ifdef OLED_DRIVER_ENABLE
44# include "oled_driver.h" 46# include "oled_driver.h"
45#endif 47#endif
46 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
47#if defined(USE_I2C) 56#if defined(USE_I2C)
48 57
49# include "i2c_master.h" 58# include "i2c_master.h"
50# include "i2c_slave.h" 59# include "i2c_slave.h"
51 60
52typedef struct _I2C_slave_buffer_t { 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
53 matrix_row_t smatrix[ROWS_PER_HAND]; 68 matrix_row_t smatrix[ROWS_PER_HAND];
54# ifdef SPLIT_MODS_ENABLE 69# ifdef SPLIT_MODS_ENABLE
55 uint8_t real_mods; 70 uint8_t real_mods;
@@ -70,19 +85,29 @@ typedef struct _I2C_slave_buffer_t {
70# ifdef WPM_ENABLE 85# ifdef WPM_ENABLE
71 uint8_t current_wpm; 86 uint8_t current_wpm;
72# endif 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
73 int8_t mouse_x; 96 int8_t mouse_x;
74 int8_t mouse_y; 97 int8_t mouse_y;
98 uint16_t device_cpi;
75 bool oled_on; 99 bool oled_on;
76 layer_state_t t_layer_state; 100 layer_state_t t_layer_state;
77 layer_state_t t_default_layer_state; 101 layer_state_t t_default_layer_state;
78 bool is_rgb_matrix_suspended;
79} __attribute__((packed)) I2C_slave_buffer_t; 102} __attribute__((packed)) I2C_slave_buffer_t;
80 103
81static I2C_slave_buffer_t *const i2c_buffer = (I2C_slave_buffer_t *)i2c_slave_reg; 104static I2C_slave_buffer_t *const i2c_buffer = (I2C_slave_buffer_t *)i2c_slave_reg;
82 105
83# define I2C_BACKLIGHT_START offsetof(I2C_slave_buffer_t, backlight_level) 106# define I2C_BACKLIGHT_START offsetof(I2C_slave_buffer_t, backlight_level)
84# define I2C_RGB_START offsetof(I2C_slave_buffer_t, rgblight_sync) 107# define I2C_RGB_START offsetof(I2C_slave_buffer_t, rgblight_sync)
85# define I2C_KEYMAP_START offsetof(I2C_slave_buffer_t, smatrix) 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)
86# define I2C_REAL_MODS_START offsetof(I2C_slave_buffer_t, real_mods) 111# define I2C_REAL_MODS_START offsetof(I2C_slave_buffer_t, real_mods)
87# define I2C_WEAK_MODS_START offsetof(I2C_slave_buffer_t, weak_mods) 112# define I2C_WEAK_MODS_START offsetof(I2C_slave_buffer_t, weak_mods)
88# define I2C_ONESHOT_MODS_START offsetof(I2C_slave_buffer_t, oneshot_mods) 113# define I2C_ONESHOT_MODS_START offsetof(I2C_slave_buffer_t, oneshot_mods)
@@ -90,10 +115,14 @@ static I2C_slave_buffer_t *const i2c_buffer = (I2C_slave_buffer_t *)i2c_slave_re
90# define I2C_WPM_START offsetof(I2C_slave_buffer_t, current_wpm) 115# define I2C_WPM_START offsetof(I2C_slave_buffer_t, current_wpm)
91# define I2C_MOUSE_X_START offsetof(I2C_slave_buffer_t, mouse_x) 116# define I2C_MOUSE_X_START offsetof(I2C_slave_buffer_t, mouse_x)
92# define I2C_MOUSE_Y_START offsetof(I2C_slave_buffer_t, mouse_y) 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)
93# define I2C_OLED_ON_START offsetof(I2C_slave_buffer_t, oled_on) 119# define I2C_OLED_ON_START offsetof(I2C_slave_buffer_t, oled_on)
94# define I2C_LAYER_STATE_START offsetof(I2C_slave_buffer_t, t_layer_state) 120# define I2C_LAYER_STATE_START offsetof(I2C_slave_buffer_t, t_layer_state)
95# define I2C_DEFAULT_LAYER_STATE_START offsetof(I2C_slave_buffer_t, t_default_layer_state) 121# define I2C_DEFAULT_LAYER_STATE_START offsetof(I2C_slave_buffer_t, t_default_layer_state)
96# define I2C_RGB_MATRIX_SUSPEND_START offsetof(I2C_slave_buffer_t, is_rgb_matrix_suspended) 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)
97 126
98# define TIMEOUT 100 127# define TIMEOUT 100
99 128
@@ -102,9 +131,11 @@ static I2C_slave_buffer_t *const i2c_buffer = (I2C_slave_buffer_t *)i2c_slave_re
102# endif 131# endif
103 132
104// Get rows from other half over i2c 133// Get rows from other half over i2c
105bool transport_master(matrix_row_t matrix[]) { 134bool transport_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
106 i2c_readReg(SLAVE_I2C_ADDRESS, I2C_KEYMAP_START, (void *)matrix, sizeof(i2c_buffer->smatrix), TIMEOUT); 135 i2c_readReg(SLAVE_I2C_ADDRESS, I2C_KEYMAP_SLAVE_START, (void *)slave_matrix, sizeof(i2c_buffer->smatrix), TIMEOUT);
107 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
108 // write backlight info 139 // write backlight info
109# ifdef BACKLIGHT_ENABLE 140# ifdef BACKLIGHT_ENABLE
110 uint8_t level = is_backlight_enabled() ? get_backlight_level() : 0; 141 uint8_t level = is_backlight_enabled() ? get_backlight_level() : 0;
@@ -147,6 +178,12 @@ bool transport_master(matrix_row_t matrix[]) {
147 i2c_readReg(SLAVE_I2C_ADDRESS, I2C_MOUSE_Y_START, (void *)&i2c_buffer->mouse_y, sizeof(i2c_buffer->mouse_y), TIMEOUT); 178 i2c_readReg(SLAVE_I2C_ADDRESS, I2C_MOUSE_Y_START, (void *)&i2c_buffer->mouse_y, sizeof(i2c_buffer->mouse_y), TIMEOUT);
148 temp_report.y = i2c_buffer->mouse_y; 179 temp_report.y = i2c_buffer->mouse_y;
149 pointing_device_set_report(temp_report); 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 }
150 } 187 }
151# endif 188# endif
152 189
@@ -188,29 +225,42 @@ bool transport_master(matrix_row_t matrix[]) {
188 } 225 }
189 226
190# ifdef OLED_DRIVER_ENABLE 227# ifdef OLED_DRIVER_ENABLE
191 bool is_oled = is_oled_on(); 228 bool is_oled_on = is_oled_on();
192 if (is_oled != i2c_buffer->oled_on) { 229 if (is_oled_on != i2c_buffer->oled_on) {
193 if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_LAYER_STATE_START, (void *)&is_oled, sizeof(is_oled), TIMEOUT) >= 0) { 230 if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_LAYER_STATE_START, (void *)&is_oled_on, sizeof(is_oled_on), TIMEOUT) >= 0) {
194 i2c_buffer->oled_on = is_oled; 231 i2c_buffer->oled_on = is_oled_on;
195 } 232 }
196 } 233 }
197# endif 234# endif
198 235
199# ifdef RGB_MATRIX_ENABLE 236# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
200 bool sus_state = rgb_matrix_get_suspend_state(); 237 i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_LED_MATRIX_START, (void *)led_matrix_eeconfig, sizeof(i2c_buffer->led_matrix), TIMEOUT);
201 if (sus_state != i2c_buffer->is_rgb_matrix_suspended) { 238 bool suspend_state = led_matrix_get_suspend_state();
202 if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_RGB_MATRIX_SUSPEND_START, (void *)&sus_state, sizeof(sus_state), TIMEOUT) >= 0) { 239 i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_LED_SUSPEND_START, (void *)suspend_state, sizeof(i2c_buffer->led_suspend_state), TIMEOUT);
203 i2c_buffer->is_rgb_matrix_suspended = sus_state; 240# endif
204 } 241# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
205 } 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);
206# endif 250# endif
207 251
208 return true; 252 return true;
209} 253}
210 254
211void transport_slave(matrix_row_t matrix[]) { 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
212 // Copy matrix to I2C buffer 259 // Copy matrix to I2C buffer
213 memcpy((void *)i2c_buffer->smatrix, (void *)matrix, sizeof(i2c_buffer->smatrix)); 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
214 264
215// Read Backlight Info 265// Read Backlight Info
216# ifdef BACKLIGHT_ENABLE 266# ifdef BACKLIGHT_ENABLE
@@ -235,6 +285,11 @@ void transport_slave(matrix_row_t matrix[]) {
235 285
236# ifdef POINTING_DEVICE_ENABLE 286# ifdef POINTING_DEVICE_ENABLE
237 if (!is_keyboard_left()) { 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 }
238 i2c_buffer->mouse_x = split_mouse_x; 293 i2c_buffer->mouse_x = split_mouse_x;
239 i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_MOUSE_X_START, (void *)&i2c_buffer->mouse_x, sizeof(i2c_buffer->mouse_x), TIMEOUT); 294 i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_MOUSE_X_START, (void *)&i2c_buffer->mouse_x, sizeof(i2c_buffer->mouse_x), TIMEOUT);
240 i2c_buffer->mouse_y = split_mouse_y; 295 i2c_buffer->mouse_y = split_mouse_y;
@@ -266,8 +321,13 @@ void transport_slave(matrix_row_t matrix[]) {
266 } 321 }
267# endif 322# endif
268 323
269# ifdef RGB_MATRIX_ENABLE 324# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
270 rgb_matrix_set_suspend_state(i2c_buffer->is_rgb_matrix_suspended); 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);
271# endif 331# endif
272} 332}
273 333
@@ -283,30 +343,44 @@ typedef struct _Serial_s2m_buffer_t {
283 // TODO: if MATRIX_COLS > 8 change to uint8_t packed_matrix[] for pack/unpack 343 // TODO: if MATRIX_COLS > 8 change to uint8_t packed_matrix[] for pack/unpack
284 matrix_row_t smatrix[ROWS_PER_HAND]; 344 matrix_row_t smatrix[ROWS_PER_HAND];
285# ifdef ENCODER_ENABLE 345# ifdef ENCODER_ENABLE
286 uint8_t encoder_state[NUMBER_OF_ENCODERS]; 346 uint8_t encoder_state[NUMBER_OF_ENCODERS];
287# endif 347# endif
288 int8_t mouse_x; 348 int8_t mouse_x;
289 int8_t mouse_y; 349 int8_t mouse_y;
290} __attribute__((packed)) Serial_s2m_buffer_t; 350} __attribute__((packed)) Serial_s2m_buffer_t;
291 351
292typedef struct _Serial_m2s_buffer_t { 352typedef struct _Serial_m2s_buffer_t {
293# ifdef SPLIT_MODS_ENABLE 353# ifdef SPLIT_MODS_ENABLE
294 uint8_t real_mods; 354 uint8_t real_mods;
295 uint8_t weak_mods; 355 uint8_t weak_mods;
296# ifndef NO_ACTION_ONESHOT 356# ifndef NO_ACTION_ONESHOT
297 uint8_t oneshot_mods; 357 uint8_t oneshot_mods;
298# endif 358# endif
299# 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
300# ifdef BACKLIGHT_ENABLE 366# ifdef BACKLIGHT_ENABLE
301 uint8_t backlight_level; 367 uint8_t backlight_level;
302# endif 368# endif
303# ifdef WPM_ENABLE 369# ifdef WPM_ENABLE
304 uint8_t current_wpm; 370 uint8_t current_wpm;
305# endif 371# endif
372 uint16_t device_cpi;
306 bool oled_on; 373 bool oled_on;
307 layer_state_t t_layer_state; 374 layer_state_t t_layer_state;
308 layer_state_t t_default_layer_state; 375 layer_state_t t_default_layer_state;
309 bool is_rgb_matrix_suspended; 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
310} __attribute__((packed)) Serial_m2s_buffer_t; 384} __attribute__((packed)) Serial_m2s_buffer_t;
311 385
312# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) 386# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
@@ -383,7 +457,7 @@ void transport_rgblight_slave(void) {
383# define transport_rgblight_slave() 457# define transport_rgblight_slave()
384# endif 458# endif
385 459
386bool transport_master(matrix_row_t matrix[]) { 460bool transport_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
387# ifndef SERIAL_USE_MULTI_TRANSACTION 461# ifndef SERIAL_USE_MULTI_TRANSACTION
388 if (soft_serial_transaction() != TRANSACTION_END) { 462 if (soft_serial_transaction() != TRANSACTION_END) {
389 return false; 463 return false;
@@ -397,7 +471,10 @@ bool transport_master(matrix_row_t matrix[]) {
397 471
398 // TODO: if MATRIX_COLS > 8 change to unpack() 472 // TODO: if MATRIX_COLS > 8 change to unpack()
399 for (int i = 0; i < ROWS_PER_HAND; ++i) { 473 for (int i = 0; i < ROWS_PER_HAND; ++i) {
400 matrix[i] = serial_s2m_buffer.smatrix[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
401 } 478 }
402 479
403# ifdef BACKLIGHT_ENABLE 480# ifdef BACKLIGHT_ENABLE
@@ -411,12 +488,12 @@ bool transport_master(matrix_row_t matrix[]) {
411 488
412# ifdef WPM_ENABLE 489# ifdef WPM_ENABLE
413 // Write wpm to slave 490 // Write wpm to slave
414 serial_m2s_buffer.current_wpm = get_current_wpm(); 491 serial_m2s_buffer.current_wpm = get_current_wpm();
415# endif 492# endif
416 493
417# ifdef SPLIT_MODS_ENABLE 494# ifdef SPLIT_MODS_ENABLE
418 serial_m2s_buffer.real_mods = get_mods(); 495 serial_m2s_buffer.real_mods = get_mods();
419 serial_m2s_buffer.weak_mods = get_weak_mods(); 496 serial_m2s_buffer.weak_mods = get_weak_mods();
420# ifndef NO_ACTION_ONESHOT 497# ifndef NO_ACTION_ONESHOT
421 serial_m2s_buffer.oneshot_mods = get_oneshot_mods(); 498 serial_m2s_buffer.oneshot_mods = get_oneshot_mods();
422# endif 499# endif
@@ -428,28 +505,43 @@ bool transport_master(matrix_row_t matrix[]) {
428 temp_report.x = serial_s2m_buffer.mouse_x; 505 temp_report.x = serial_s2m_buffer.mouse_x;
429 temp_report.y = serial_s2m_buffer.mouse_y; 506 temp_report.y = serial_s2m_buffer.mouse_y;
430 pointing_device_set_report(temp_report); 507 pointing_device_set_report(temp_report);
508 serial_m2s_buffer.device_cpi = device_cpi;
431 } 509 }
432# endif 510# endif
433 511
434 serial_m2s_buffer.t_layer_state = layer_state; 512 serial_m2s_buffer.t_layer_state = layer_state;
435 serial_m2s_buffer.t_default_layer_state = default_layer_state; 513 serial_m2s_buffer.t_default_layer_state = default_layer_state;
436# ifdef OLED_DRIVER_ENABLE 514# ifdef OLED_DRIVER_ENABLE
437 serial_m2s_buffer.oled_on = is_oled_on(); 515 serial_m2s_buffer.oled_on = is_oled_on();
438# endif 516# endif
439 517
440# ifdef RGB_MATRIX_ENABLE 518# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
441 serial_m2s_buffer.is_rgb_matrix_suspended = rgb_matrix_get_suspend_state(); 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();
442# endif 525# endif
443 526
527# ifndef DISABLE_SYNC_TIMER
528 serial_m2s_buffer.sync_timer = sync_timer_read32() + SYNC_TIMER_OFFSET;
529# endif
444 return true; 530 return true;
445} 531}
446 532
447void transport_slave(matrix_row_t matrix[]) { 533void transport_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
448 transport_rgblight_slave(); 534 transport_rgblight_slave();
535# ifndef DISABLE_SYNC_TIMER
536 sync_timer_update(serial_m2s_buffer.sync_timer);
537# endif
449 538
450 // TODO: if MATRIX_COLS > 8 change to pack() 539 // TODO: if MATRIX_COLS > 8 change to pack()
451 for (int i = 0; i < ROWS_PER_HAND; ++i) { 540 for (int i = 0; i < ROWS_PER_HAND; ++i) {
452 serial_s2m_buffer.smatrix[i] = matrix[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
453 } 545 }
454 546
455# ifdef BACKLIGHT_ENABLE 547# ifdef BACKLIGHT_ENABLE
@@ -474,6 +566,11 @@ void transport_slave(matrix_row_t matrix[]) {
474 566
475# ifdef POINTING_DEVICE_ENABLE 567# ifdef POINTING_DEVICE_ENABLE
476 if (!is_keyboard_left()) { 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 }
477 serial_s2m_buffer.mouse_x = split_mouse_x; 574 serial_s2m_buffer.mouse_x = split_mouse_x;
478 serial_s2m_buffer.mouse_y = split_mouse_y; 575 serial_s2m_buffer.mouse_y = split_mouse_y;
479 } 576 }
@@ -493,16 +590,14 @@ void transport_slave(matrix_row_t matrix[]) {
493 } 590 }
494# endif 591# endif
495 592
496# ifdef RGB_MATRIX_ENABLE 593# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
497 rgb_matrix_set_suspend_state(serial_m2s_buffer.is_rgb_matrix_suspended); 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);
498# endif 600# endif
499} 601}
500 602
501#endif 603#endif
502
503#ifdef POINTING_DEVICE_ENABLE
504void master_mouse_send(int8_t x, int8_t y) {
505 split_mouse_x = x;
506 split_mouse_y = y;
507}
508#endif
diff --git a/users/drashna/oled_stuff.c b/users/drashna/oled_stuff.c
index 4abf5f05f..98e467d93 100644
--- a/users/drashna/oled_stuff.c
+++ b/users/drashna/oled_stuff.c
@@ -15,7 +15,6 @@
15 */ 15 */
16 16
17#include "drashna.h" 17#include "drashna.h"
18#include <stdio.h>
19 18
20#ifndef KEYLOGGER_LENGTH 19#ifndef KEYLOGGER_LENGTH
21// # ifdef OLED_DISPLAY_128X64 20// # ifdef OLED_DISPLAY_128X64
@@ -158,6 +157,19 @@ void render_keylock_status(uint8_t led_usb_state) {
158 oled_advance_page(true); 157 oled_advance_page(true);
159#endif 158#endif
160} 159}
160void render_matrix_scan_rate(void) {
161#ifdef DEBUG_MATRIX_SCAN_RATE
162 char matrix_rate[5];
163 uint16_t n = get_matrix_scan_rate();
164 matrix_rate[4] = '\0';
165 matrix_rate[3] = '0' + n % 10;
166 matrix_rate[2] = ( n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' ';
167 matrix_rate[1] = n / 10 ? '0' + n / 10 : ' ';
168 matrix_rate[0] = ' ';
169 oled_write_P(PSTR("MS:"), false);
170 oled_write(matrix_rate, false);
171#endif
172}
161 173
162void render_mod_status(uint8_t modifiers) { 174void render_mod_status(uint8_t modifiers) {
163 static const char PROGMEM mod_status[5][3] = {{0xE8, 0xE9, 0}, {0xE4, 0xE5, 0}, {0xE6, 0xE7, 0}, {0xEA, 0xEB, 0}, {0xEC, 0xED, 0}}; 175 static const char PROGMEM mod_status[5][3] = {{0xE8, 0xE9, 0}, {0xE4, 0xE5, 0}, {0xE6, 0xE7, 0}, {0xEA, 0xEB, 0}, {0xEC, 0xED, 0}};
@@ -169,11 +181,17 @@ void render_mod_status(uint8_t modifiers) {
169#endif 181#endif
170 oled_write_P(mod_status[2], (modifiers & MOD_MASK_ALT)); 182 oled_write_P(mod_status[2], (modifiers & MOD_MASK_ALT));
171 oled_write_P(mod_status[1], (modifiers & MOD_MASK_CTRL)); 183 oled_write_P(mod_status[1], (modifiers & MOD_MASK_CTRL));
184
185 render_matrix_scan_rate();
172#if defined(OLED_DISPLAY_128X64) 186#if defined(OLED_DISPLAY_128X64)
173 oled_advance_page(true); 187 oled_advance_page(true);
174#endif 188#endif
175} 189}
176 190
191#ifdef SWAP_HANDS_ENABLE
192extern bool swap_hands;
193#endif
194
177void render_bootmagic_status(void) { 195void render_bootmagic_status(void) {
178 /* Show Ctrl-Gui Swap options */ 196 /* Show Ctrl-Gui Swap options */
179 static const char PROGMEM logo[][2][3] = { 197 static const char PROGMEM logo[][2][3] = {
@@ -209,7 +227,7 @@ void render_bootmagic_status(void) {
209 oled_write_P(PSTR(" "), false); 227 oled_write_P(PSTR(" "), false);
210 oled_write_P(PSTR(OLED_RENDER_BOOTMAGIC_NKRO), keymap_config.nkro); 228 oled_write_P(PSTR(OLED_RENDER_BOOTMAGIC_NKRO), keymap_config.nkro);
211 oled_write_P(PSTR(" "), false); 229 oled_write_P(PSTR(" "), false);
212 oled_write_P(PSTR(OLED_RENDER_BOOTMAGIC_NOGUI), !keymap_config.no_gui); 230 oled_write_P(PSTR(OLED_RENDER_BOOTMAGIC_NOGUI), keymap_config.no_gui);
213#ifdef OLED_DISPLAY_128X64 231#ifdef OLED_DISPLAY_128X64
214 oled_advance_page(true); 232 oled_advance_page(true);
215 oled_write_P(PSTR("Magic"), false); 233 oled_write_P(PSTR("Magic"), false);
@@ -221,10 +239,11 @@ void render_bootmagic_status(void) {
221 } 239 }
222#endif 240#endif
223 oled_write_P(PSTR(" "), false); 241 oled_write_P(PSTR(" "), false);
224 oled_write_P(PSTR(OLED_RENDER_BOOTMAGIC_GRV), keymap_config.swap_grave_esc); 242 oled_write_P(PSTR(OLED_RENDER_BOOTMAGIC_ONESHOT), !is_oneshot_enabled());
243#ifdef SWAP_HANDS_ENABLE
225 oled_write_P(PSTR(" "), false); 244 oled_write_P(PSTR(" "), false);
226 oled_write_P(PSTR(" "), false); 245 oled_write_P(PSTR(OLED_RENDER_BOOTMAGIC_SWAP), swap_hands);
227 oled_write_P(PSTR(OLED_RENDER_BOOTMAGIC_CAPS), keymap_config.swap_control_capslock); 246#endif
228#ifdef OLED_DISPLAY_128X64 247#ifdef OLED_DISPLAY_128X64
229 oled_advance_page(true); 248 oled_advance_page(true);
230#endif 249#endif
@@ -282,12 +301,22 @@ __attribute__((weak)) void oled_driver_render_logo(void) {
282 301
283void render_wpm(void) { 302void render_wpm(void) {
284#ifdef WPM_ENABLE 303#ifdef WPM_ENABLE
304 uint8_t n = get_current_wpm();
285# ifdef OLED_DISPLAY_128X64 305# ifdef OLED_DISPLAY_128X64
286 char wpm_counter[4]; 306 char wpm_counter[4];
307 wpm_counter[3] = '\0';
308 wpm_counter[2] = '0' + n % 10;
309 wpm_counter[1] = ( n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' ';
310 wpm_counter[0] = n / 10 ? '0' + n / 10 : ' ';
287# else 311# else
288 char wpm_counter[6]; 312 char wpm_counter[6];
289# endif 313 wpm_counter[5] = '\0';
290 snprintf(wpm_counter, sizeof(wpm_counter), "%3u", get_current_wpm()); 314 wpm_counter[4] = '0' + n % 10;
315 wpm_counter[3] = ( n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' ';
316 wpm_counter[2] = n / 10 ? '0' + n / 10 : ' ';
317 wpm_counter[1] = ' ';
318 wpm_counter[0] = ' ';
319 # endif
291 oled_write_P(PSTR(OLED_RENDER_WPM_COUNTER), false); 320 oled_write_P(PSTR(OLED_RENDER_WPM_COUNTER), false);
292 oled_write(wpm_counter, false); 321 oled_write(wpm_counter, false);
293#endif 322#endif
@@ -299,7 +328,13 @@ extern uint16_t dpi_array[];
299 328
300void render_pointing_dpi_status(void) { 329void render_pointing_dpi_status(void) {
301 char dpi_status[6]; 330 char dpi_status[6];
302 snprintf(dpi_status, sizeof(dpi_status), "%5u", dpi_array[keyboard_config.dpi_config]); 331 uint16_t n = dpi_array[keyboard_config.dpi_config];
332 dpi_status[5] = '\0';
333 dpi_status[4] = '0' + n % 10;
334 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' : ' ';
336 dpi_status[1] = n / 10 ? '0' + n / 10 : ' ';
337 dpi_status[0] = ' ';
303 oled_write_P(PSTR(" DPI: "), false); 338 oled_write_P(PSTR(" DPI: "), false);
304 oled_write(dpi_status, false); 339 oled_write(dpi_status, false);
305} 340}
@@ -320,7 +355,11 @@ void render_status_secondary(void) {
320void render_status_main(void) { 355void render_status_main(void) {
321#if defined(OLED_DISPLAY_128X64) 356#if defined(OLED_DISPLAY_128X64)
322 oled_driver_render_logo(); 357 oled_driver_render_logo();
358# ifdef DEBUG_MATRIX_SCAN_RATE
359 render_matrix_scan_rate();
360# else
323 render_wpm(); 361 render_wpm();
362# endif
324# ifdef KEYBOARD_handwired_dactyl_manuform_5x6_right_trackball 363# ifdef KEYBOARD_handwired_dactyl_manuform_5x6_right_trackball
325 render_pointing_dpi_status(); 364 render_pointing_dpi_status();
326# endif 365# endif
diff --git a/users/drashna/oled_stuff.h b/users/drashna/oled_stuff.h
index 2224cd90e..1f4440bd4 100644
--- a/users/drashna/oled_stuff.h
+++ b/users/drashna/oled_stuff.h
@@ -57,6 +57,8 @@ extern uint32_t oled_timer;
57# define OLED_RENDER_BOOTMAGIC_NKRO "NKRO" 57# define OLED_RENDER_BOOTMAGIC_NKRO "NKRO"
58# define OLED_RENDER_BOOTMAGIC_NOGUI "nGUI" 58# define OLED_RENDER_BOOTMAGIC_NOGUI "nGUI"
59# define OLED_RENDER_BOOTMAGIC_GRV "GRV" 59# define OLED_RENDER_BOOTMAGIC_GRV "GRV"
60# define OLED_RENDER_BOOTMAGIC_ONESHOT "1SHT"
61# define OLED_RENDER_BOOTMAGIC_SWAP "SWAP"
60# define OLED_RENDER_BOOTMAGIC_CAPS "CAPS" 62# define OLED_RENDER_BOOTMAGIC_CAPS "CAPS"
61 63
62# define OLED_RENDER_USER_NAME "USER:" 64# define OLED_RENDER_USER_NAME "USER:"
@@ -99,6 +101,8 @@ extern uint32_t oled_timer;
99# define OLED_RENDER_BOOTMAGIC_NKRO "NKRO" 101# define OLED_RENDER_BOOTMAGIC_NKRO "NKRO"
100# define OLED_RENDER_BOOTMAGIC_NOGUI "nGUI" 102# define OLED_RENDER_BOOTMAGIC_NOGUI "nGUI"
101# define OLED_RENDER_BOOTMAGIC_GRV "GRV" 103# define OLED_RENDER_BOOTMAGIC_GRV "GRV"
104# define OLED_RENDER_BOOTMAGIC_ONESHOT "1SHT"
105# define OLED_RENDER_BOOTMAGIC_SWAP "SWAP"
102# define OLED_RENDER_BOOTMAGIC_CAPS "CAPS" 106# define OLED_RENDER_BOOTMAGIC_CAPS "CAPS"
103 107
104# define OLED_RENDER_USER_NAME "USER:" 108# define OLED_RENDER_USER_NAME "USER:"
diff --git a/users/drashna/pimoroni_trackball.c b/users/drashna/pimoroni_trackball.c
index 9ae094c05..a6ca6c996 100644
--- a/users/drashna/pimoroni_trackball.c
+++ b/users/drashna/pimoroni_trackball.c
@@ -33,7 +33,7 @@ static float precisionSpeed = 1;
33 33
34void trackball_set_rgbw(uint8_t red, uint8_t green, uint8_t blue, uint8_t white) { 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}; 35 uint8_t data[] = {0x00, red, green, blue, white};
36 i2c_transmit(TRACKBALL_WRITE, data, sizeof(data), I2C_TIMEOUT); 36 i2c_transmit(TRACKBALL_ADDRESS << 1, data, sizeof(data), I2C_TIMEOUT);
37} 37}
38 38
39int16_t mouse_offset(uint8_t positive, uint8_t negative, int16_t scale) { 39int16_t mouse_offset(uint8_t positive, uint8_t negative, int16_t scale) {
@@ -94,7 +94,7 @@ void pointing_device_task(void) {
94 static bool debounce; 94 static bool debounce;
95 static uint16_t debounce_timer; 95 static uint16_t debounce_timer;
96 uint8_t state[5] = {}; 96 uint8_t state[5] = {};
97 if (i2c_readReg(TRACKBALL_WRITE, 0x04, state, 5, I2C_TIMEOUT) == I2C_STATUS_SUCCESS) { 97 if (i2c_readReg(TRACKBALL_ADDRESS << 1, 0x04, state, 5, I2C_TIMEOUT) == I2C_STATUS_SUCCESS) {
98 if (!state[4] && !debounce) { 98 if (!state[4] && !debounce) {
99 if (scrolling) { 99 if (scrolling) {
100#ifdef PIMORONI_TRACKBALL_INVERT_X 100#ifdef PIMORONI_TRACKBALL_INVERT_X
diff --git a/users/drashna/process_records.h b/users/drashna/process_records.h
index 2e2467050..f60e6d7eb 100644
--- a/users/drashna/process_records.h
+++ b/users/drashna/process_records.h
@@ -53,7 +53,7 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record);
53#define LOWER MO(_LOWER) 53#define LOWER MO(_LOWER)
54#define RAISE MO(_RAISE) 54#define RAISE MO(_RAISE)
55#define ADJUST MO(_ADJUST) 55#define ADJUST MO(_ADJUST)
56#define TG_MODS TG(_MODS) 56#define TG_MODS OS_TOGG
57#define TG_GAME TG(_GAMEPAD) 57#define TG_GAME TG(_GAMEPAD)
58#define TG_DBLO TG(_DIABLO) 58#define TG_DBLO TG(_DIABLO)
59#define OS_LWR OSL(_LOWER) 59#define OS_LWR OSL(_LOWER)
diff --git a/users/drashna/rgb_matrix_stuff.c b/users/drashna/rgb_matrix_stuff.c
index 573cc7bc9..9e9e1e427 100644
--- a/users/drashna/rgb_matrix_stuff.c
+++ b/users/drashna/rgb_matrix_stuff.c
@@ -62,7 +62,7 @@ __attribute__((weak)) void rgb_matrix_indicator_keymap(void) {}
62 62
63void matrix_scan_rgb_matrix(void) { 63void matrix_scan_rgb_matrix(void) {
64#if defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) 64#if defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS)
65 if (userspace_config.rgb_matrix_idle_anim && rgb_matrix_get_mode() == RGB_MATRIX_TYPING_HEATMAP && timer_elapsed32(hypno_timer) > 15000) { 65 if (userspace_config.rgb_matrix_idle_anim && rgb_matrix_get_mode() == RGB_MATRIX_TYPING_HEATMAP && sync_timer_elapsed32(hypno_timer) > 15000) {
66 rgb_matrix_mode_noeeprom(RGB_MATRIX_REST_MODE); 66 rgb_matrix_mode_noeeprom(RGB_MATRIX_REST_MODE);
67 } 67 }
68#endif 68#endif
@@ -79,7 +79,7 @@ void keyboard_post_init_rgb_matrix(void) {
79 79
80bool process_record_user_rgb_matrix(uint16_t keycode, keyrecord_t *record) { 80bool process_record_user_rgb_matrix(uint16_t keycode, keyrecord_t *record) {
81#if defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) 81#if defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS)
82 hypno_timer = timer_read32(); 82 hypno_timer = sync_timer_read32();
83 if (userspace_config.rgb_matrix_idle_anim && rgb_matrix_get_mode() == RGB_MATRIX_REST_MODE) { 83 if (userspace_config.rgb_matrix_idle_anim && rgb_matrix_get_mode() == RGB_MATRIX_REST_MODE) {
84 rgb_matrix_mode_noeeprom(RGB_MATRIX_TYPING_HEATMAP); 84 rgb_matrix_mode_noeeprom(RGB_MATRIX_TYPING_HEATMAP);
85 } 85 }
diff --git a/users/drashna/rgb_stuff.c b/users/drashna/rgb_stuff.c
index c8b2f4c72..6723ad4bf 100644
--- a/users/drashna/rgb_stuff.c
+++ b/users/drashna/rgb_stuff.c
@@ -32,7 +32,7 @@ void scan_rgblight_fadeout(void) { // Don't effing change this function .... rg
32 bool litup = false; 32 bool litup = false;
33 33
34 for (uint8_t light_index = 0; light_index < RGBLED_NUM; ++light_index) { 34 for (uint8_t light_index = 0; light_index < RGBLED_NUM; ++light_index) {
35 if (lights[light_index].enabled && timer_elapsed(lights[light_index].timer) > 10) { 35 if (lights[light_index].enabled && sync_timer_elapsed(lights[light_index].timer) > 10) {
36 rgblight_fadeout *light = &lights[light_index]; 36 rgblight_fadeout *light = &lights[light_index];
37 litup = true; 37 litup = true;
38 38
@@ -41,7 +41,7 @@ void scan_rgblight_fadeout(void) { // Don't effing change this function .... rg
41 if (get_highest_layer(layer_state) == 0) { 41 if (get_highest_layer(layer_state) == 0) {
42 sethsv(light->hue + rand() % 0xF, 255, light->life, (LED_TYPE *)&led[light_index]); 42 sethsv(light->hue + rand() % 0xF, 255, light->life, (LED_TYPE *)&led[light_index]);
43 } 43 }
44 light->timer = timer_read(); 44 light->timer = sync_timer_read();
45 } else { 45 } else {
46 if (light->enabled && get_highest_layer(layer_state) == 0) { 46 if (light->enabled && get_highest_layer(layer_state) == 0) {
47 rgblight_sethsv_default_helper(light_index); 47 rgblight_sethsv_default_helper(light_index);
@@ -86,7 +86,7 @@ void start_rgb_light(void) {
86 86
87 rgblight_fadeout *light = &lights[light_index]; 87 rgblight_fadeout *light = &lights[light_index];
88 light->enabled = true; 88 light->enabled = true;
89 light->timer = timer_read(); 89 light->timer = sync_timer_read();
90 light->life = 0xC0 + rand() % 0x40; 90 light->life = 0xC0 + rand() % 0x40;
91 91
92 light->hue = rgblight_get_hue() + (rand() % 0xB4) - 0x54; 92 light->hue = rgblight_get_hue() + (rand() % 0xB4) - 0x54;
@@ -149,11 +149,11 @@ void matrix_scan_rgb_light(void) {
149 149
150# if defined(RGBLIGHT_STARTUP_ANIMATION) 150# if defined(RGBLIGHT_STARTUP_ANIMATION)
151 if (is_rgblight_startup && is_keyboard_master()) { 151 if (is_rgblight_startup && is_keyboard_master()) {
152 if (timer_elapsed(rgblight_startup_loop_timer) > 10) { 152 if (sync_timer_elapsed(rgblight_startup_loop_timer) > 10) {
153 static uint8_t counter; 153 static uint8_t counter;
154 counter++; 154 counter++;
155 rgblight_sethsv_noeeprom((counter + old_hue) % 255, 255, 255); 155 rgblight_sethsv_noeeprom((counter + old_hue) % 255, 255, 255);
156 rgblight_startup_loop_timer = timer_read(); 156 rgblight_startup_loop_timer = sync_timer_read();
157 if (counter == 255) { 157 if (counter == 255) {
158 is_rgblight_startup = false; 158 is_rgblight_startup = false;
159 if (!is_enabled) { 159 if (!is_enabled) {
@@ -177,14 +177,11 @@ void rgblight_set_hsv_and_mode(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mo
177layer_state_t layer_state_set_rgb_light(layer_state_t state) { 177layer_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 uint8_t mode = layer_state_cmp(state, _MODS) ? RGBLIGHT_MODE_BREATHING : RGBLIGHT_MODE_STATIC_LIGHT;
181 switch (get_highest_layer(state | default_layer_state)) { 180 switch (get_highest_layer(state | default_layer_state)) {
182 case _MACROS: 181 case _MACROS: // mouse
183# ifdef RGBLIGHT_EFFECT_TWINKLE 182 if (!layer_state_cmp(state, _GAMEPAD) && !layer_state_cmp(state, _DIABLO)) {
184 rgblight_set_hsv_and_mode(HSV_CHARTREUSE, RGBLIGHT_MODE_TWINKLE + 5); 183 rgblight_set_hsv_and_mode(HSV_CHARTREUSE, RGBLIGHT_MODE_BREATHING + 3);
185# else 184 }
186 rgblight_set_hsv_and_mode(HSV_CHARTREUSE, RGBLIGHT_MODE_BREATHING + 3);
187# endif
188 break; 185 break;
189 case _MEDIA: 186 case _MEDIA:
190 rgblight_set_hsv_and_mode(HSV_CHARTREUSE, RGBLIGHT_MODE_KNIGHT + 1); 187 rgblight_set_hsv_and_mode(HSV_CHARTREUSE, RGBLIGHT_MODE_KNIGHT + 1);
@@ -205,28 +202,28 @@ layer_state_t layer_state_set_rgb_light(layer_state_t state) {
205 rgblight_set_hsv_and_mode(HSV_RED, RGBLIGHT_MODE_KNIGHT + 2); 202 rgblight_set_hsv_and_mode(HSV_RED, RGBLIGHT_MODE_KNIGHT + 2);
206 break; 203 break;
207 case _COLEMAK: 204 case _COLEMAK:
208 rgblight_set_hsv_and_mode(HSV_MAGENTA, mode); 205 rgblight_set_hsv_and_mode(HSV_MAGENTA, RGBLIGHT_MODE_STATIC_LIGHT);
209 break; 206 break;
210 case _DVORAK: 207 case _DVORAK:
211 rgblight_set_hsv_and_mode(HSV_SPRINGGREEN, mode); 208 rgblight_set_hsv_and_mode(HSV_SPRINGGREEN, RGBLIGHT_MODE_STATIC_LIGHT);
212 break; 209 break;
213 case _WORKMAN: 210 case _WORKMAN:
214 rgblight_set_hsv_and_mode(HSV_GOLDENROD, mode); 211 rgblight_set_hsv_and_mode(HSV_GOLDENROD, RGBLIGHT_MODE_STATIC_LIGHT);
215 break; 212 break;
216 case _NORMAN: 213 case _NORMAN:
217 rgblight_set_hsv_and_mode(HSV_CORAL, mode); 214 rgblight_set_hsv_and_mode(HSV_CORAL, RGBLIGHT_MODE_STATIC_LIGHT);
218 break; 215 break;
219 case _MALTRON: 216 case _MALTRON:
220 rgblight_set_hsv_and_mode(HSV_YELLOW, mode); 217 rgblight_set_hsv_and_mode(HSV_YELLOW, RGBLIGHT_MODE_STATIC_LIGHT);
221 break; 218 break;
222 case _EUCALYN: 219 case _EUCALYN:
223 rgblight_set_hsv_and_mode(HSV_PINK, mode); 220 rgblight_set_hsv_and_mode(HSV_PINK, RGBLIGHT_MODE_STATIC_LIGHT);
224 break; 221 break;
225 case _CARPLAX: 222 case _CARPLAX:
226 rgblight_set_hsv_and_mode(HSV_BLUE, mode); 223 rgblight_set_hsv_and_mode(HSV_BLUE, RGBLIGHT_MODE_STATIC_LIGHT);
227 break; 224 break;
228 default: 225 default:
229 rgblight_set_hsv_and_mode(HSV_CYAN, mode); 226 rgblight_set_hsv_and_mode(HSV_CYAN, RGBLIGHT_MODE_STATIC_LIGHT);
230 break; 227 break;
231 } 228 }
232 } 229 }
diff --git a/users/drashna/rules.mk b/users/drashna/rules.mk
index 2ae01c62e..b79051508 100644
--- a/users/drashna/rules.mk
+++ b/users/drashna/rules.mk
@@ -16,29 +16,37 @@ ifneq ($(strip $(NO_SECRETS)), yes)
16 endif 16 endif
17endif 17endif
18 18
19CUSTOM_TAP_DANCE ?= yes
19ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) 20ifeq ($(strip $(TAP_DANCE_ENABLE)), yes)
20 SRC += tap_dances.c 21 ifeq ($(strip $(TAP_DANCE_ENABLE)), yes)
22 SRC += tap_dances.c
23 endif
21endif 24endif
22 25
26CUSTOM_RGBLIGHT ?= yes
23ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) 27ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
24 SRC += rgb_stuff.c 28 ifeq ($(strip $(CUSTOM_RGBLIGHT)), yes)
25 ifeq ($(strip $(RGBLIGHT_TWINKLE)), yes) 29 SRC += rgb_stuff.c
26 OPT_DEFS += -DRGBLIGHT_TWINKLE 30 ifeq ($(strip $(RGBLIGHT_TWINKLE)), yes)
27 endif 31 OPT_DEFS += -DRGBLIGHT_TWINKLE
28 ifeq ($(strip $(RGBLIGHT_NOEEPROM)), yes) 32 endif
29 OPT_DEFS += -DRGBLIGHT_NOEEPROM 33 ifeq ($(strip $(RGBLIGHT_NOEEPROM)), yes)
30 endif 34 OPT_DEFS += -DRGBLIGHT_NOEEPROM
31 ifeq ($(strip $(RGBLIGHT_STARTUP_ANIMATION)), yes) 35 endif
32 OPT_DEFS += -DRGBLIGHT_STARTUP_ANIMATION 36 ifeq ($(strip $(RGBLIGHT_STARTUP_ANIMATION)), yes)
37 OPT_DEFS += -DRGBLIGHT_STARTUP_ANIMATION
38 endif
33 endif 39 endif
34endif 40endif
35 41
36RGB_MATRIX_ENABLE ?= no 42CUSTOM_RGB_MATRIX ?= yes
37ifneq ($(strip $(RGB_MATRIX_ENABLE)), no) 43ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes)
38 SRC += rgb_matrix_stuff.c 44 ifeq ($(strip $(CUSTOM_RGB_MATRIX)), yes)
45 SRC += rgb_matrix_stuff.c
46 endif
39endif 47endif
40 48
41 49KEYLOGGER_ENABLE ?= no
42ifdef CONSOLE_ENABLE 50ifdef CONSOLE_ENABLE
43 ifeq ($(strip $(KEYLOGGER_ENABLE)), yes) 51 ifeq ($(strip $(KEYLOGGER_ENABLE)), yes)
44 OPT_DEFS += -DKEYLOGGER_ENABLE 52 OPT_DEFS += -DKEYLOGGER_ENABLE
@@ -56,8 +64,11 @@ ifeq ($(strip $(PROTOCOL)), VUSB)
56 NKRO_ENABLE = no 64 NKRO_ENABLE = no
57endif 65endif
58 66
67CUSTOM_OLED_DRIVER ?= yes
59ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes) 68ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes)
60 SRC += oled_stuff.c 69 ifeq ($(strip $(CUSTOM_OLED_DRIVER)), yes)
70 SRC += oled_stuff.c
71 endif
61endif 72endif
62 73
63ifeq ($(strip $(PIMORONI_TRACKBALL_ENABLE)), yes) 74ifeq ($(strip $(PIMORONI_TRACKBALL_ENABLE)), yes)
@@ -67,26 +78,30 @@ ifeq ($(strip $(PIMORONI_TRACKBALL_ENABLE)), yes)
67 QUANTUM_LIB_SRC += i2c_master.c 78 QUANTUM_LIB_SRC += i2c_master.c
68endif 79endif
69 80
70 81CUSTOM_SPLIT_TRANSPORT ?= yes
71ifeq ($(strip $(SPLIT_KEYBOARD)), yes) 82ifeq ($(strip $(SPLIT_KEYBOARD)), yes)
72 ifneq ($(strip $(SPLIT_TRANSPORT)), custom) 83 ifneq ($(strip $(SPLIT_TRANSPORT)), custom)
73 SPLIT_TRANSPORT = custom 84 ifeq ($(strip $(CUSTOM_SPLIT_TRANSPORT)), yes)
74 QUANTUM_LIB_SRC += drashna_transport.c 85 SPLIT_TRANSPORT = custom
75 OPT_DEFS += -DDRASHNA_CUSTOM_TRANSPORT 86 QUANTUM_LIB_SRC += drashna_transport.c
76 # Unused functions are pruned away, which is why we can add multiple drivers here without bloat. 87 OPT_DEFS += -DDRASHNA_CUSTOM_TRANSPORT
77 ifeq ($(PLATFORM),AVR) 88 # Unused functions are pruned away, which is why we can add multiple drivers here without bloat.
78 ifneq ($(NO_I2C),yes) 89 ifeq ($(PLATFORM),AVR)
79 QUANTUM_LIB_SRC += i2c_master.c \ 90 ifneq ($(NO_I2C),yes)
80 i2c_slave.c 91 QUANTUM_LIB_SRC += i2c_master.c \
92 i2c_slave.c
93 endif
81 endif 94 endif
82 endif
83 95
84 SERIAL_DRIVER ?= bitbang 96 SERIAL_DRIVER ?= bitbang
85 OPT_DEFS += -DSERIAL_DRIVER_$(strip $(shell echo $(SERIAL_DRIVER) | tr '[:lower:]' '[:upper:]')) 97 OPT_DEFS += -DSERIAL_DRIVER_$(strip $(shell echo $(SERIAL_DRIVER) | tr '[:lower:]' '[:upper:]'))
86 ifeq ($(strip $(SERIAL_DRIVER)), bitbang) 98 ifeq ($(strip $(SERIAL_DRIVER)), bitbang)
87 QUANTUM_LIB_SRC += serial.c 99 QUANTUM_LIB_SRC += serial.c
88 else 100 else
89 QUANTUM_LIB_SRC += serial_$(strip $(SERIAL_DRIVER)).c 101 QUANTUM_LIB_SRC += serial_$(strip $(SERIAL_DRIVER)).c
102 endif
90 endif 103 endif
91 endif 104 endif
92endif 105endif
106
107# DEBUG_MATRIX_SCAN_RATE_ENABLE = api
diff --git a/users/gordon/rules.mk b/users/gordon/rules.mk
index 19e77b01b..06e671a63 100644
--- a/users/gordon/rules.mk
+++ b/users/gordon/rules.mk
@@ -1,4 +1,4 @@
1TAP_DANCE_ENABLE = yes 1TAP_DANCE_ENABLE = yes
2SRC += gordon.c 2SRC += gordon.c
3 3
4# BOOTMAGIC_ENABLE = yes 4# BOOTMAGIC_ENABLE = full
diff --git a/users/greatwizard/greatwizard.c b/users/greatwizard/greatwizard.c
index 46ee41436..3ec856d72 100644
--- a/users/greatwizard/greatwizard.c
+++ b/users/greatwizard/greatwizard.c
@@ -70,7 +70,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
70} 70}
71 71
72#ifdef ENCODER_ENABLE 72#ifdef ENCODER_ENABLE
73void encoder_update_user(uint8_t index, bool clockwise) { 73bool encoder_update_user(uint8_t index, bool clockwise) {
74 switch (get_highest_layer(layer_state)) { 74 switch (get_highest_layer(layer_state)) {
75 case _QWERTY: 75 case _QWERTY:
76#ifdef LAYERS_PROGRAMMER 76#ifdef LAYERS_PROGRAMMER
@@ -90,6 +90,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
90 } 90 }
91 break; 91 break;
92 } 92 }
93 return true;
93} 94}
94#endif 95#endif
95 96
diff --git a/users/kuchosauronad0/encoder.c b/users/kuchosauronad0/encoder.c
index 06b7b5123..9284a041c 100644
--- a/users/kuchosauronad0/encoder.c
+++ b/users/kuchosauronad0/encoder.c
@@ -1,5 +1,5 @@
1#include "encoder.h" 1#include "encoder.h"
2void encoder_update_user(uint8_t index, bool clockwise) { 2bool encoder_update_user(uint8_t index, bool clockwise) {
3 static uint16_t kc; 3 static uint16_t kc;
4 uint8_t temp_mod = get_mods(); 4 uint8_t temp_mod = get_mods();
5 if (index == 0) { /* first encoder */ 5 if (index == 0) { /* first encoder */
@@ -55,6 +55,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
55 tap_code(KC_1); 55 tap_code(KC_1);
56 } 56 }
57 } 57 }
58 return true;
58} 59}
59const uint16_t PROGMEM encoder_actions[][9] = { \ 60const uint16_t PROGMEM encoder_actions[][9] = { \
60// None CTRL ALT SHIFT GUI CTRL+ALT CTRL+SHFT ALT+SHFT HYPER 61// None CTRL ALT SHIFT GUI CTRL+ALT CTRL+SHFT ALT+SHFT HYPER
diff --git a/users/kuchosauronad0/encoder.h b/users/kuchosauronad0/encoder.h
index 2610c9677..7b05aa491 100644
--- a/users/kuchosauronad0/encoder.h
+++ b/users/kuchosauronad0/encoder.h
@@ -1,4 +1,4 @@
1#pragma once 1#pragma once
2#include "quantum.h" 2#include "quantum.h"
3const uint16_t PROGMEM encoder_actions[][9]; 3const uint16_t PROGMEM encoder_actions[][9];
4void encoder_update_user(uint8_t index, bool clockwise); 4bool encoder_update_user(uint8_t index, bool clockwise);
diff --git a/users/kuchosauronad0/process_records.c b/users/kuchosauronad0/process_records.c
index bec6fa5ad..5623c80f9 100644
--- a/users/kuchosauronad0/process_records.c
+++ b/users/kuchosauronad0/process_records.c
@@ -214,24 +214,24 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
214 214
215// Unicode 215// Unicode
216#ifdef UNICODE_ENABLE 216#ifdef UNICODE_ENABLE
217 case UC_FLIP: // (ノಠ痊ಠ)ノ彡┻━┻ 217 case UC_FLIP:
218 if (record->event.pressed) { 218 if (record->event.pressed) {
219 send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B"); 219 send_unicode_string("(ノಠ痊ಠ)ノ彡┻━┻");
220 } 220 }
221 break; 221 break;
222 case UC_TABL: // ┬┬ノ( º _ ºノ) 222 case UC_TABL:
223 if (record->event.pressed) { 223 if (record->event.pressed) {
224 send_unicode_hex_string("252C 2500 252C 30CE 0028 0020 00BA 0020 005F 0020 00BA 30CE 0029"); 224 send_unicode_string("┬─┬ノ( º _ ºノ)");
225 } 225 }
226 break; 226 break;
227 case UC_SHRG: // ¯\_(ツ)_/¯ 227 case UC_SHRG:
228 if (record->event.pressed) { 228 if (record->event.pressed) {
229 send_unicode_hex_string("00AF 005C 005F 0028 30C4 0029 005F 002F 00AF"); 229 send_unicode_string("¯\\_(ツ)_/¯");
230 } 230 }
231 break; 231 break;
232 case UC_DISA: // ಠ_ಠ 232 case UC_DISA:
233 if (record->event.pressed) { 233 if (record->event.pressed) {
234 send_unicode_hex_string("0CA0 005F 0CA0"); 234 send_unicode_string("ಠ_ಠ");
235 } 235 }
236 break; 236 break;
237#endif //!Unicode 237#endif //!Unicode
diff --git a/users/kuchosauronad0/unicode.h b/users/kuchosauronad0/unicode.h
index cb550243e..9ff523baa 100644
--- a/users/kuchosauronad0/unicode.h
+++ b/users/kuchosauronad0/unicode.h
@@ -2,8 +2,6 @@
2 2
3#include "quantum.h" 3#include "quantum.h"
4 4
5void send_unicode_hex_string(const char* str);
6
7/* use X(n) to call the */ 5/* use X(n) to call the */
8#ifdef UNICODEMAP_ENABLE 6#ifdef UNICODEMAP_ENABLE
9enum unicode_name { 7enum unicode_name {
diff --git a/users/ninjonas/encoder.c b/users/ninjonas/encoder.c
index 3d56ff89e..f1b448b79 100644
--- a/users/ninjonas/encoder.c
+++ b/users/ninjonas/encoder.c
@@ -15,7 +15,7 @@
15 */ 15 */
16#include "ninjonas.h" 16#include "ninjonas.h"
17 17
18#ifdef ENCODER_ENABLE 18#ifdef ENCODER_ENABLE
19void left_encoder_cw(void) { 19void left_encoder_cw(void) {
20 switch (get_highest_layer(layer_state)) { 20 switch (get_highest_layer(layer_state)) {
21 case _LOWER: 21 case _LOWER:
@@ -81,7 +81,7 @@ void right_encoder_acw(void) {
81 } 81 }
82} 82}
83 83
84void encoder_update_user(uint8_t index, bool clockwise) { 84bool encoder_update_user(uint8_t index, bool clockwise) {
85 encoder_rotated_timer = timer_read(); 85 encoder_rotated_timer = timer_read();
86 if (index == 0) { 86 if (index == 0) {
87 left_encoder_rotated = true; 87 left_encoder_rotated = true;
@@ -99,6 +99,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
99 right_encoder_acw(); 99 right_encoder_acw();
100 } 100 }
101 } 101 }
102 return true;
102} 103}
103 104
104#endif \ No newline at end of file 105#endif
diff --git a/users/ridingqwerty/process_records.c b/users/ridingqwerty/process_records.c
index b0b0b48a2..770af286e 100644
--- a/users/ridingqwerty/process_records.c
+++ b/users/ridingqwerty/process_records.c
@@ -58,14 +58,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
58#if defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) 58#if defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE)
59 case KC_A: 59 case KC_A:
60 if (record->event.pressed) { 60 if (record->event.pressed) {
61 send_unicode_hex_string("039B"); 61 send_unicode_string("Λ ");
62 tap_code(KC_SPC);
63 } 62 }
64 return false; 63 return false;
65 case KC_E: 64 case KC_E:
66 if (record->event.pressed) { 65 if (record->event.pressed) {
67 send_unicode_hex_string("039E"); 66 send_unicode_string("Ξ ");
68 tap_code(KC_SPC);
69 } 67 }
70 return false; 68 return false;
71#else 69#else
@@ -175,154 +173,154 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
175 // TRANSLATE 173 // TRANSLATE
176 case KC_A: 174 case KC_A:
177 if (record->event.pressed) { 175 if (record->event.pressed) {
178 send_unicode_hex_string("0250"); 176 register_unicode(0x0250); // ɐ
179 tap_code(KC_LEFT); 177 tap_code(KC_LEFT);
180 return false; 178 return false;
181 } 179 }
182 break; 180 break;
183 case KC_C: 181 case KC_C:
184 if (record->event.pressed) { 182 if (record->event.pressed) {
185 send_unicode_hex_string("0254"); 183 register_unicode(0x0254); // ɔ
186 tap_code(KC_LEFT); 184 tap_code(KC_LEFT);
187 return false; 185 return false;
188 } 186 }
189 break; 187 break;
190 case KC_E: 188 case KC_E:
191 if (record->event.pressed) { 189 if (record->event.pressed) {
192 send_unicode_hex_string("01DD"); 190 register_unicode(0x01DD); // ǝ
193 tap_code(KC_LEFT); 191 tap_code(KC_LEFT);
194 return false; 192 return false;
195 } 193 }
196 break; 194 break;
197 case KC_F: 195 case KC_F:
198 if (record->event.pressed) { 196 if (record->event.pressed) {
199 send_unicode_hex_string("025F"); 197 register_unicode(0x025F); // ɟ
200 tap_code(KC_LEFT); 198 tap_code(KC_LEFT);
201 return false; 199 return false;
202 } 200 }
203 break; 201 break;
204 case KC_G: 202 case KC_G:
205 if (record->event.pressed) { 203 if (record->event.pressed) {
206 send_unicode_hex_string("0183"); 204 register_unicode(0x0183); // ƃ
207 tap_code(KC_LEFT); 205 tap_code(KC_LEFT);
208 return false; 206 return false;
209 } 207 }
210 break; 208 break;
211 case KC_H: 209 case KC_H:
212 if (record->event.pressed) { 210 if (record->event.pressed) {
213 send_unicode_hex_string("0265"); 211 register_unicode(0x0265); // ɥ
214 tap_code(KC_LEFT); 212 tap_code(KC_LEFT);
215 return false; 213 return false;
216 } 214 }
217 break; 215 break;
218 case KC_I: 216 case KC_I:
219 if (record->event.pressed) { 217 if (record->event.pressed) {
220 send_unicode_hex_string("1D09"); 218 register_unicode(0x1D09); // ᴉ
221 tap_code(KC_LEFT); 219 tap_code(KC_LEFT);
222 return false; 220 return false;
223 } 221 }
224 break; 222 break;
225 case KC_J: 223 case KC_J:
226 if (record->event.pressed) { 224 if (record->event.pressed) {
227 send_unicode_hex_string("027E"); 225 register_unicode(0x027E); // ɾ
228 tap_code(KC_LEFT); 226 tap_code(KC_LEFT);
229 return false; 227 return false;
230 } 228 }
231 break; 229 break;
232 case KC_K: 230 case KC_K:
233 if (record->event.pressed) { 231 if (record->event.pressed) {
234 send_unicode_hex_string("029E"); 232 register_unicode(0x029E); // ʞ
235 tap_code(KC_LEFT); 233 tap_code(KC_LEFT);
236 return false; 234 return false;
237 } 235 }
238 break; 236 break;
239 case KC_M: 237 case KC_M:
240 if (record->event.pressed) { 238 if (record->event.pressed) {
241 send_unicode_hex_string("026F"); 239 register_unicode(0x026F); // ɯ
242 tap_code(KC_LEFT); 240 tap_code(KC_LEFT);
243 return false; 241 return false;
244 } 242 }
245 break; 243 break;
246 case KC_R: 244 case KC_R:
247 if (record->event.pressed) { 245 if (record->event.pressed) {
248 send_unicode_hex_string("0279"); 246 register_unicode(0x0279); // ɹ
249 tap_code(KC_LEFT); 247 tap_code(KC_LEFT);
250 return false; 248 return false;
251 } 249 }
252 break; 250 break;
253 case KC_T: 251 case KC_T:
254 if (record->event.pressed) { 252 if (record->event.pressed) {
255 send_unicode_hex_string("0287"); 253 register_unicode(0x0287); // ʇ
256 tap_code(KC_LEFT); 254 tap_code(KC_LEFT);
257 return false; 255 return false;
258 } 256 }
259 break; 257 break;
260 case KC_V: 258 case KC_V:
261 if (record->event.pressed) { 259 if (record->event.pressed) {
262 send_unicode_hex_string("028C"); 260 register_unicode(0x028C); // ʌ
263 tap_code(KC_LEFT); 261 tap_code(KC_LEFT);
264 return false; 262 return false;
265 } 263 }
266 break; 264 break;
267 case KC_W: 265 case KC_W:
268 if (record->event.pressed) { 266 if (record->event.pressed) {
269 send_unicode_hex_string("028D"); 267 register_unicode(0x028D); // ʍ
270 tap_code(KC_LEFT); 268 tap_code(KC_LEFT);
271 return false; 269 return false;
272 } 270 }
273 break; 271 break;
274 case KC_X: 272 case KC_X:
275 if (record->event.pressed) { 273 if (record->event.pressed) {
276 send_unicode_hex_string("2717"); 274 register_unicode(0x2717); // ✗
277 tap_code(KC_LEFT); 275 tap_code(KC_LEFT);
278 return false; 276 return false;
279 } 277 }
280 break; 278 break;
281 case KC_Y: 279 case KC_Y:
282 if (record->event.pressed) { 280 if (record->event.pressed) {
283 send_unicode_hex_string("028E"); 281 register_unicode(0x028E); // ʎ
284 tap_code(KC_LEFT); 282 tap_code(KC_LEFT);
285 return false; 283 return false;
286 } 284 }
287 break; 285 break;
288 case KC_1: 286 case KC_1:
289 if (record->event.pressed) { 287 if (record->event.pressed) {
290 send_unicode_hex_string("0269"); 288 register_unicode(0x0269); // ɩ
291 tap_code(KC_LEFT); 289 tap_code(KC_LEFT);
292 return false; 290 return false;
293 } 291 }
294 break; 292 break;
295 case KC_2: 293 case KC_2:
296 if (record->event.pressed) { 294 if (record->event.pressed) {
297 send_unicode_hex_string("3139"); 295 register_unicode(0x3139); // ㄹ
298 tap_code(KC_LEFT); 296 tap_code(KC_LEFT);
299 return false; 297 return false;
300 } 298 }
301 break; 299 break;
302 case KC_3: 300 case KC_3:
303 if (record->event.pressed) { 301 if (record->event.pressed) {
304 send_unicode_hex_string("0190"); 302 register_unicode(0x0190); // Ɛ
305 tap_code(KC_LEFT); 303 tap_code(KC_LEFT);
306 return false; 304 return false;
307 } 305 }
308 break; 306 break;
309 case KC_4: 307 case KC_4:
310 if (record->event.pressed) { 308 if (record->event.pressed) {
311 send_unicode_hex_string("3123"); 309 register_unicode(0x3123); // ㄣ
312 tap_code(KC_LEFT); 310 tap_code(KC_LEFT);
313 return false; 311 return false;
314 } 312 }
315 break; 313 break;
316 case KC_5: 314 case KC_5:
317 if (record->event.pressed) { 315 if (record->event.pressed) {
318 send_unicode_hex_string("03DB"); 316 register_unicode(0x03DB); // ϛ
319 tap_code(KC_LEFT); 317 tap_code(KC_LEFT);
320 return false; 318 return false;
321 } 319 }
322 break; 320 break;
323 case KC_7: 321 case KC_7:
324 if (record->event.pressed) { 322 if (record->event.pressed) {
325 send_unicode_hex_string("3125"); 323 register_unicode(0x3125); // ㄥ
326 tap_code(KC_LEFT); 324 tap_code(KC_LEFT);
327 } 325 }
328 return false; 326 return false;
@@ -401,7 +399,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
401 user_mod_state = get_mods() & MOD_MASK_ALT; 399 user_mod_state = get_mods() & MOD_MASK_ALT;
402 if (user_mod_state) { 400 if (user_mod_state) {
403 unregister_mods(MOD_BIT(KC_RALT)); 401 unregister_mods(MOD_BIT(KC_RALT));
404 send_unicode_hex_string("00B0"); 402 register_unicode(0x00B0); // °
405 set_mods(user_mod_state); 403 set_mods(user_mod_state);
406 return false; 404 return false;
407 } 405 }
@@ -474,7 +472,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
474 if (record->event.pressed && record->event.key.col == 4 && record->event.key.row == 1) { 472 if (record->event.pressed && record->event.key.col == 4 && record->event.key.row == 1) {
475 if (get_mods() & MOD_BIT(KC_RALT)) { 473 if (get_mods() & MOD_BIT(KC_RALT)) {
476 unregister_mods(MOD_BIT(KC_RALT)); 474 unregister_mods(MOD_BIT(KC_RALT));
477 //send_unicode_hex_string("262D"); 475 //register_unicode(0x262D); // ☭
478 tap_code(KC_BSPC); 476 tap_code(KC_BSPC);
479 set_mods(MOD_BIT(KC_RALT)); 477 set_mods(MOD_BIT(KC_RALT));
480 return false; 478 return false;
diff --git a/users/rs/rs.h b/users/rs/rs.h
index 722d6ed19..fde8c3355 100644
--- a/users/rs/rs.h
+++ b/users/rs/rs.h
@@ -18,8 +18,6 @@ enum custom_keycodes {
18#endif 18#endif
19}; 19};
20 20
21#define KC_ KC_TRNS
22
23#define KC_ESCC MT(MOD_LCTL, KC_ESC) 21#define KC_ESCC MT(MOD_LCTL, KC_ESC)
24#define KC_ENTS MT(MOD_LSFT, KC_ENT) 22#define KC_ENTS MT(MOD_LSFT, KC_ENT)
25#define KC_LTGT LTGT // > or < with shift 23#define KC_LTGT LTGT // > or < with shift
@@ -47,4 +45,4 @@ enum custom_keycodes {
47#define KC_LVAI RGB_VAI 45#define KC_LVAI RGB_VAI
48#define KC_LVAD RGB_VAD 46#define KC_LVAD RGB_VAD
49#define KC_LMOD RGB_MOD 47#define KC_LMOD RGB_MOD
50#endif \ No newline at end of file 48#endif
diff --git a/users/stanrc85/stanrc85.c b/users/stanrc85/stanrc85.c
index d5e56571d..f8555d87b 100644
--- a/users/stanrc85/stanrc85.c
+++ b/users/stanrc85/stanrc85.c
@@ -45,7 +45,7 @@ void ctl_copy_reset (qk_tap_dance_state_t *state, void *user_data) {
45} 45}
46 46
47#if defined(HAS_ROTARY) 47#if defined(HAS_ROTARY)
48 void encoder_update_user(uint8_t index, bool clockwise) { 48 bool encoder_update_user(uint8_t index, bool clockwise) {
49 if (index == 0) { /* First encoder */ 49 if (index == 0) { /* First encoder */
50 if (clockwise) { 50 if (clockwise) {
51 tap_code(KC_VOLD); 51 tap_code(KC_VOLD);
@@ -53,6 +53,7 @@ void ctl_copy_reset (qk_tap_dance_state_t *state, void *user_data) {
53 tap_code(KC_VOLU); 53 tap_code(KC_VOLU);
54 } 54 }
55 } 55 }
56 return true;
56 } 57 }
57#endif 58#endif
58 59
@@ -75,7 +76,7 @@ void lock_unlock (qk_tap_dance_state_t *state, void *user_data) {
75 writePin(INDICATOR_PIN_1, !led_user); 76 writePin(INDICATOR_PIN_1, !led_user);
76 wait_ms(200); 77 wait_ms(200);
77 writePin(INDICATOR_PIN_2, !led_user); 78 writePin(INDICATOR_PIN_2, !led_user);
78 #endif 79 #endif
79 break; 80 break;
80 case SINGLE_HOLD: 81 case SINGLE_HOLD:
81 break; 82 break;
@@ -91,7 +92,7 @@ void lock_unlock (qk_tap_dance_state_t *state, void *user_data) {
91 writePin(INDICATOR_PIN_1, !led_user); 92 writePin(INDICATOR_PIN_1, !led_user);
92 wait_ms(200); 93 wait_ms(200);
93 writePin(INDICATOR_PIN_0, !led_user); 94 writePin(INDICATOR_PIN_0, !led_user);
94 #endif 95 #endif
95 break; 96 break;
96 } 97 }
97} 98}
diff --git a/users/xulkal/custom_encoder.c b/users/xulkal/custom_encoder.c
index cd029944f..acd0275a8 100644
--- a/users/xulkal/custom_encoder.c
+++ b/users/xulkal/custom_encoder.c
@@ -58,7 +58,7 @@ const uint16_t PROGMEM encoders[][2] = {
58 { KC_VOLU, KC_VOLD } 58 { KC_VOLU, KC_VOLD }
59}; 59};
60 60
61void encoder_update_user(uint8_t index, bool clockwise) 61bool encoder_update_user(uint8_t index, bool clockwise)
62{ 62{
63 if (!is_keyboard_master()) 63 if (!is_keyboard_master())
64 return; 64 return;
@@ -69,4 +69,5 @@ void encoder_update_user(uint8_t index, bool clockwise)
69 else 69 else
70#endif // RGB_OLED_MENU 70#endif // RGB_OLED_MENU
71 tap_code16(pgm_read_word(&encoders[index][clockwise])); 71 tap_code16(pgm_read_word(&encoders[index][clockwise]));
72 return true;
72} 73}
diff --git a/users/yet-another-developer/process_records.c b/users/yet-another-developer/process_records.c
index c7dbd704a..7dba702bf 100644
--- a/users/yet-another-developer/process_records.c
+++ b/users/yet-another-developer/process_records.c
@@ -162,24 +162,24 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
162 } 162 }
163 break; 163 break;
164#ifdef UNICODE_ENABLE 164#ifdef UNICODE_ENABLE
165 case UC_FLIP: // (ノಠ痊ಠ)ノ彡┻━┻ 165 case UC_FLIP:
166 if (record->event.pressed) { 166 if (record->event.pressed) {
167 send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B"); 167 send_unicode_string("(ノಠ痊ಠ)ノ彡┻━┻");
168 } 168 }
169 break; 169 break;
170 case UC_TABL: // ┬─┬ノ( º _ ºノ) 170 case UC_TABL:
171 if (record->event.pressed) { 171 if (record->event.pressed) {
172 send_unicode_hex_string("252C 2500 252C 30CE 0028 0020 00BA 0020 005F 0020 00BA 30CE 0029"); 172 send_unicode_string("┬─┬ノ( º _ ºノ)");
173 } 173 }
174 break; 174 break;
175 case UC_SHRG: // ¯\_(ツ)_/¯ 175 case UC_SHRG:
176 if (record->event.pressed) { 176 if (record->event.pressed) {
177 send_unicode_hex_string("00AF 005C 005F 0028 30C4 0029 005F 002F 00AF"); 177 send_unicode_string("¯\\_(ツ)_/¯");
178 } 178 }
179 break; 179 break;
180 case UC_DISA: // ಠ_ಠ 180 case UC_DISA:
181 if (record->event.pressed) { 181 if (record->event.pressed) {
182 send_unicode_hex_string("0CA0 005F 0CA0"); 182 send_unicode_string("ಠ_ಠ");
183 } 183 }
184 break; 184 break;
185#endif // UNICODE_ENABLE 185#endif // UNICODE_ENABLE
diff --git a/users/yet-another-developer/unicode.h b/users/yet-another-developer/unicode.h
index cb550243e..9ff523baa 100644
--- a/users/yet-another-developer/unicode.h
+++ b/users/yet-another-developer/unicode.h
@@ -2,8 +2,6 @@
2 2
3#include "quantum.h" 3#include "quantum.h"
4 4
5void send_unicode_hex_string(const char* str);
6
7/* use X(n) to call the */ 5/* use X(n) to call the */
8#ifdef UNICODEMAP_ENABLE 6#ifdef UNICODEMAP_ENABLE
9enum unicode_name { 7enum unicode_name {