You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

261 lines
7.5 KiB

Migrated most code from keymaps to userspace (#1980) * Add woodpad * Cleanup * Remove misc layouts for woodpad * Move woodpad to handwired * Updated RGB Underglow info * Cleanup macros * Tweaked RGB lighting stuff * Start to merge orthodox/ergodox keymaps (persistant layers) * Add woodpad * Add forced NKRO * Added default layer (qwerty/colemak/dvorak) detection to RGB Underglow * Updated macros and added workman keymaps * Fixed RGB lighting for Workman layout * Add leader keys * Remove force NKRO * Add Viterbi one handed layout and minor tweaks to others * Finishing up Viterbi keyboard layout, and NKRO tweaks to other layouts * Made "make" keystroke universal * Clean up and updates of drashna keymaps * Add workman layer to planck * Update to keymaps * Fix makefile toggle code in ez keymap Finish adding RGB code to orthodox * Updated RGB Underglow layer indication code due to discovery of the layer_state_set_kb function * Remove unnecessary planck layout * Fixed Workman song * update make command and added lit reset * Fixed formatting to fall in line with official standards * Minor tweaks * Removed Leader Keys from Ergodox EZ Keymap Added KC_RESET that resets board and sets underglow to red * Tweak reset code * Cleanup * Remove misc layouts for woodpad * Move woodpad to handwired * Updated RGB Underglow info * Cleanup macros * Tweaked RGB lighting stuff * Start to merge orthodox/ergodox keymaps (persistant layers) * Add forced NKRO * Added default layer (qwerty/colemak/dvorak) detection to RGB Underglow * Updated macros and added workman keymaps * Fixed RGB lighting for Workman layout * Add leader keys * Remove force NKRO * Add Viterbi one handed layout and minor tweaks to others * Finishing up Viterbi keyboard layout, and NKRO tweaks to other layouts * Made "make" keystroke universal * Clean up and updates of drashna keymaps * Add workman layer to planck * Update to keymaps * Fix makefile toggle code in ez keymap Finish adding RGB code to orthodox * Updated RGB Underglow layer indication code due to discovery of the layer_state_set_kb function * Remove unnecessary planck layout * Fixed Workman song * update make command and added lit reset * Fixed formatting to fall in line with official standards * Minor tweaks * Removed Leader Keys from Ergodox EZ Keymap Added KC_RESET that resets board and sets underglow to red * Tweak reset code * Fix rebasing issues * remove head files * Fix "macro" issue * Rename ez keymaps for userspace * Revert "Rename ez keymaps for userspace" This reverts commit c25425911852e41711a5f0273b5741adb16e5bd4. * Renamed Ergodox EZ layouts so that all of my personal layouts are on the same name, in prep for using userspaces * Fix ergodox code * Remove "drashna-ez" keymap as it's no longer needed * Migrate majority of code to Userspace
6 years ago
[Keymap] Drashna's Feature madness (#6128) * Fix my Tap Dance issues after I broke them * Cleanup and organization of userspace documentation As well as some additional cleanup of functions due to review of documentation. * Enable Tapdance on Glow and remove more animations * Revert to Eager PR debouncing * Add better check for startup animation * Move where RGB Matrix defines are listed * Limit RGB Matrix max val * Update keyboard for Iris Rev 3 conflicts * Enable encoder support on planck ez * Remove is_master check from corne\'s OLED code * Overhaul OLED screens for my Corne * One last removal * Show RGB valu On both sides * Updates for OLED display info * Fix compile issues for rgb config * Disabled Space Cadet for all drashna keymaps * Fix OLED Screen configs * Minor OLED Tweaks * Revert some Iris changes * Fix song include * Handle MAKE macro for the Corne boards better * Add super hacky-hack for eeconfig initialization * Add audio support for Fractal since Elite Cs support it * Add defines for keycode steps * Add White layout * Update Corne RGB info * Add fun effects to layer indication for RGB Matrix enabled boards * Use proper define for product name detection * Update formatting * Use custom timeout mechanism for OLED timeout * Fix up OLED screen HSV code for new HSV structure * Better handle turning off RGB Matrix when sleeping * Disable MultiSplash Animation * Change Iris back to using serial * Why was RGB disabled?!?!?! * Limit val in rgb_matrix_layer_helper function * Remove EECONFIG setting for RGB matrix
4 years ago
[Keymap] Drashna's Feature madness (#6128) * Fix my Tap Dance issues after I broke them * Cleanup and organization of userspace documentation As well as some additional cleanup of functions due to review of documentation. * Enable Tapdance on Glow and remove more animations * Revert to Eager PR debouncing * Add better check for startup animation * Move where RGB Matrix defines are listed * Limit RGB Matrix max val * Update keyboard for Iris Rev 3 conflicts * Enable encoder support on planck ez * Remove is_master check from corne\'s OLED code * Overhaul OLED screens for my Corne * One last removal * Show RGB valu On both sides * Updates for OLED display info * Fix compile issues for rgb config * Disabled Space Cadet for all drashna keymaps * Fix OLED Screen configs * Minor OLED Tweaks * Revert some Iris changes * Fix song include * Handle MAKE macro for the Corne boards better * Add super hacky-hack for eeconfig initialization * Add audio support for Fractal since Elite Cs support it * Add defines for keycode steps * Add White layout * Update Corne RGB info * Add fun effects to layer indication for RGB Matrix enabled boards * Use proper define for product name detection * Update formatting * Use custom timeout mechanism for OLED timeout * Fix up OLED screen HSV code for new HSV structure * Better handle turning off RGB Matrix when sleeping * Disable MultiSplash Animation * Change Iris back to using serial * Why was RGB disabled?!?!?! * Limit val in rgb_matrix_layer_helper function * Remove EECONFIG setting for RGB matrix
4 years ago
[Keymap] Drashna's Feature madness (#6128) * Fix my Tap Dance issues after I broke them * Cleanup and organization of userspace documentation As well as some additional cleanup of functions due to review of documentation. * Enable Tapdance on Glow and remove more animations * Revert to Eager PR debouncing * Add better check for startup animation * Move where RGB Matrix defines are listed * Limit RGB Matrix max val * Update keyboard for Iris Rev 3 conflicts * Enable encoder support on planck ez * Remove is_master check from corne\'s OLED code * Overhaul OLED screens for my Corne * One last removal * Show RGB valu On both sides * Updates for OLED display info * Fix compile issues for rgb config * Disabled Space Cadet for all drashna keymaps * Fix OLED Screen configs * Minor OLED Tweaks * Revert some Iris changes * Fix song include * Handle MAKE macro for the Corne boards better * Add super hacky-hack for eeconfig initialization * Add audio support for Fractal since Elite Cs support it * Add defines for keycode steps * Add White layout * Update Corne RGB info * Add fun effects to layer indication for RGB Matrix enabled boards * Use proper define for product name detection * Update formatting * Use custom timeout mechanism for OLED timeout * Fix up OLED screen HSV code for new HSV structure * Better handle turning off RGB Matrix when sleeping * Disable MultiSplash Animation * Change Iris back to using serial * Why was RGB disabled?!?!?! * Limit val in rgb_matrix_layer_helper function * Remove EECONFIG setting for RGB matrix
4 years ago
Update to drashna userspace and keymaps (#3172) * Use string with delay * Add skipped region to ergodox * Add send string config * Use default_layer_state instead of function * Fully generalize keyboards * old iris cleanup * Fix Drashna keymap compile issues By checking to see if secret.c exists before actually trying to add it * Remove unnecessary references * Add 4x12 ortho board * Update userspace readme for secrets * Make RGB more modular * Fix iris keymap, since we don't need the lower left (Function keys) * Fix includes * Add Blanks * Fix Ergodox lower layer * Add suspend commands * Add Maltron Layout * Add additional layouts * Finish adding gamepad to Iris * Tweaks to iris gamepag layer * make gaming layers more friendly * minor gaming layer tweak * Add Carplax * Add modded key timer function * Cleanup and macro documentation * Add QMK DFU info * Add 'old' keymap for 12 LED spare * Update Pro Micro documentation * Disable twinkling so it fits in firmware space * Switch to QMK DFU bootloader, since it's better anyhow * Write default layer state colors to EEPROM Since we are writing to EEPROM anyways, and this way, it sticks on reboot * Fix QMK DFU bootloader options * More updates for QMK DFU support * Use matrix scanning hack for startup_user until #3113 gets merged * Fix indicator light consistency issue * Add/readd ifdefs to indicators * Add/readd alt indicator * Remove RGB Twinkling from Viterbi macro pad * Fix default layer color detection * Fix rebase and detection issues * Cleanup code so it will compile if RGBLIGHT is disabled * Revert vsode settings * Use Pragma Once instead of boilerplate code
5 years ago
[Keymap] Drashna's Feature madness (#6128) * Fix my Tap Dance issues after I broke them * Cleanup and organization of userspace documentation As well as some additional cleanup of functions due to review of documentation. * Enable Tapdance on Glow and remove more animations * Revert to Eager PR debouncing * Add better check for startup animation * Move where RGB Matrix defines are listed * Limit RGB Matrix max val * Update keyboard for Iris Rev 3 conflicts * Enable encoder support on planck ez * Remove is_master check from corne\'s OLED code * Overhaul OLED screens for my Corne * One last removal * Show RGB valu On both sides * Updates for OLED display info * Fix compile issues for rgb config * Disabled Space Cadet for all drashna keymaps * Fix OLED Screen configs * Minor OLED Tweaks * Revert some Iris changes * Fix song include * Handle MAKE macro for the Corne boards better * Add super hacky-hack for eeconfig initialization * Add audio support for Fractal since Elite Cs support it * Add defines for keycode steps * Add White layout * Update Corne RGB info * Add fun effects to layer indication for RGB Matrix enabled boards * Use proper define for product name detection * Update formatting * Use custom timeout mechanism for OLED timeout * Fix up OLED screen HSV code for new HSV structure * Better handle turning off RGB Matrix when sleeping * Disable MultiSplash Animation * Change Iris back to using serial * Why was RGB disabled?!?!?! * Limit val in rgb_matrix_layer_helper function * Remove EECONFIG setting for RGB matrix
4 years ago
[Keymap] Drashna's Feature madness (#6128) * Fix my Tap Dance issues after I broke them * Cleanup and organization of userspace documentation As well as some additional cleanup of functions due to review of documentation. * Enable Tapdance on Glow and remove more animations * Revert to Eager PR debouncing * Add better check for startup animation * Move where RGB Matrix defines are listed * Limit RGB Matrix max val * Update keyboard for Iris Rev 3 conflicts * Enable encoder support on planck ez * Remove is_master check from corne\'s OLED code * Overhaul OLED screens for my Corne * One last removal * Show RGB valu On both sides * Updates for OLED display info * Fix compile issues for rgb config * Disabled Space Cadet for all drashna keymaps * Fix OLED Screen configs * Minor OLED Tweaks * Revert some Iris changes * Fix song include * Handle MAKE macro for the Corne boards better * Add super hacky-hack for eeconfig initialization * Add audio support for Fractal since Elite Cs support it * Add defines for keycode steps * Add White layout * Update Corne RGB info * Add fun effects to layer indication for RGB Matrix enabled boards * Use proper define for product name detection * Update formatting * Use custom timeout mechanism for OLED timeout * Fix up OLED screen HSV code for new HSV structure * Better handle turning off RGB Matrix when sleeping * Disable MultiSplash Animation * Change Iris back to using serial * Why was RGB disabled?!?!?! * Limit val in rgb_matrix_layer_helper function * Remove EECONFIG setting for RGB matrix
4 years ago
Update to drashna userspace and keymaps (#3172) * Use string with delay * Add skipped region to ergodox * Add send string config * Use default_layer_state instead of function * Fully generalize keyboards * old iris cleanup * Fix Drashna keymap compile issues By checking to see if secret.c exists before actually trying to add it * Remove unnecessary references * Add 4x12 ortho board * Update userspace readme for secrets * Make RGB more modular * Fix iris keymap, since we don't need the lower left (Function keys) * Fix includes * Add Blanks * Fix Ergodox lower layer * Add suspend commands * Add Maltron Layout * Add additional layouts * Finish adding gamepad to Iris * Tweaks to iris gamepag layer * make gaming layers more friendly * minor gaming layer tweak * Add Carplax * Add modded key timer function * Cleanup and macro documentation * Add QMK DFU info * Add 'old' keymap for 12 LED spare * Update Pro Micro documentation * Disable twinkling so it fits in firmware space * Switch to QMK DFU bootloader, since it's better anyhow * Write default layer state colors to EEPROM Since we are writing to EEPROM anyways, and this way, it sticks on reboot * Fix QMK DFU bootloader options * More updates for QMK DFU support * Use matrix scanning hack for startup_user until #3113 gets merged * Fix indicator light consistency issue * Add/readd ifdefs to indicators * Add/readd alt indicator * Remove RGB Twinkling from Viterbi macro pad * Fix default layer color detection * Fix rebase and detection issues * Cleanup code so it will compile if RGBLIGHT is disabled * Revert vsode settings * Use Pragma Once instead of boilerplate code
5 years ago
[Keymap] Drashna's Feature madness (#6128) * Fix my Tap Dance issues after I broke them * Cleanup and organization of userspace documentation As well as some additional cleanup of functions due to review of documentation. * Enable Tapdance on Glow and remove more animations * Revert to Eager PR debouncing * Add better check for startup animation * Move where RGB Matrix defines are listed * Limit RGB Matrix max val * Update keyboard for Iris Rev 3 conflicts * Enable encoder support on planck ez * Remove is_master check from corne\'s OLED code * Overhaul OLED screens for my Corne * One last removal * Show RGB valu On both sides * Updates for OLED display info * Fix compile issues for rgb config * Disabled Space Cadet for all drashna keymaps * Fix OLED Screen configs * Minor OLED Tweaks * Revert some Iris changes * Fix song include * Handle MAKE macro for the Corne boards better * Add super hacky-hack for eeconfig initialization * Add audio support for Fractal since Elite Cs support it * Add defines for keycode steps * Add White layout * Update Corne RGB info * Add fun effects to layer indication for RGB Matrix enabled boards * Use proper define for product name detection * Update formatting * Use custom timeout mechanism for OLED timeout * Fix up OLED screen HSV code for new HSV structure * Better handle turning off RGB Matrix when sleeping * Disable MultiSplash Animation * Change Iris back to using serial * Why was RGB disabled?!?!?! * Limit val in rgb_matrix_layer_helper function * Remove EECONFIG setting for RGB matrix
4 years ago
Migrated most code from keymaps to userspace (#1980) * Add woodpad * Cleanup * Remove misc layouts for woodpad * Move woodpad to handwired * Updated RGB Underglow info * Cleanup macros * Tweaked RGB lighting stuff * Start to merge orthodox/ergodox keymaps (persistant layers) * Add woodpad * Add forced NKRO * Added default layer (qwerty/colemak/dvorak) detection to RGB Underglow * Updated macros and added workman keymaps * Fixed RGB lighting for Workman layout * Add leader keys * Remove force NKRO * Add Viterbi one handed layout and minor tweaks to others * Finishing up Viterbi keyboard layout, and NKRO tweaks to other layouts * Made "make" keystroke universal * Clean up and updates of drashna keymaps * Add workman layer to planck * Update to keymaps * Fix makefile toggle code in ez keymap Finish adding RGB code to orthodox * Updated RGB Underglow layer indication code due to discovery of the layer_state_set_kb function * Remove unnecessary planck layout * Fixed Workman song * update make command and added lit reset * Fixed formatting to fall in line with official standards * Minor tweaks * Removed Leader Keys from Ergodox EZ Keymap Added KC_RESET that resets board and sets underglow to red * Tweak reset code * Cleanup * Remove misc layouts for woodpad * Move woodpad to handwired * Updated RGB Underglow info * Cleanup macros * Tweaked RGB lighting stuff * Start to merge orthodox/ergodox keymaps (persistant layers) * Add forced NKRO * Added default layer (qwerty/colemak/dvorak) detection to RGB Underglow * Updated macros and added workman keymaps * Fixed RGB lighting for Workman layout * Add leader keys * Remove force NKRO * Add Viterbi one handed layout and minor tweaks to others * Finishing up Viterbi keyboard layout, and NKRO tweaks to other layouts * Made "make" keystroke universal * Clean up and updates of drashna keymaps * Add workman layer to planck * Update to keymaps * Fix makefile toggle code in ez keymap Finish adding RGB code to orthodox * Updated RGB Underglow layer indication code due to discovery of the layer_state_set_kb function * Remove unnecessary planck layout * Fixed Workman song * update make command and added lit reset * Fixed formatting to fall in line with official standards * Minor tweaks * Removed Leader Keys from Ergodox EZ Keymap Added KC_RESET that resets board and sets underglow to red * Tweak reset code * Fix rebasing issues * remove head files * Fix "macro" issue * Rename ez keymaps for userspace * Revert "Rename ez keymaps for userspace" This reverts commit c25425911852e41711a5f0273b5741adb16e5bd4. * Renamed Ergodox EZ layouts so that all of my personal layouts are on the same name, in prep for using userspaces * Fix ergodox code * Remove "drashna-ez" keymap as it's no longer needed * Migrate majority of code to Userspace
6 years ago
[Keymap] Drashna's Feature madness (#6128) * Fix my Tap Dance issues after I broke them * Cleanup and organization of userspace documentation As well as some additional cleanup of functions due to review of documentation. * Enable Tapdance on Glow and remove more animations * Revert to Eager PR debouncing * Add better check for startup animation * Move where RGB Matrix defines are listed * Limit RGB Matrix max val * Update keyboard for Iris Rev 3 conflicts * Enable encoder support on planck ez * Remove is_master check from corne\'s OLED code * Overhaul OLED screens for my Corne * One last removal * Show RGB valu On both sides * Updates for OLED display info * Fix compile issues for rgb config * Disabled Space Cadet for all drashna keymaps * Fix OLED Screen configs * Minor OLED Tweaks * Revert some Iris changes * Fix song include * Handle MAKE macro for the Corne boards better * Add super hacky-hack for eeconfig initialization * Add audio support for Fractal since Elite Cs support it * Add defines for keycode steps * Add White layout * Update Corne RGB info * Add fun effects to layer indication for RGB Matrix enabled boards * Use proper define for product name detection * Update formatting * Use custom timeout mechanism for OLED timeout * Fix up OLED screen HSV code for new HSV structure * Better handle turning off RGB Matrix when sleeping * Disable MultiSplash Animation * Change Iris back to using serial * Why was RGB disabled?!?!?! * Limit val in rgb_matrix_layer_helper function * Remove EECONFIG setting for RGB matrix
4 years ago
[Keymap] Cleanup and updating of drashna keymap code (#11516) * Update other keyboards for rgb matrix changes * Remove customized bootmagic code * Fix corne layout compilation error * Fix compiler errors with all keymaps * Add Simple Visualizer for ergodox infinity * Fix compile issue with Corne * Fix keymap stuff * Add alias for mouse layer * Add Halmak Keyboard layout * Updates for Kyria * Add support for oled interval * Change RGB stuff [CHANGE] Fix coexistence issues * Fix rgb_stuff * Add custom ploopyco mouse keymap * Decrease default dwell time * Updates based on last breaking changes update * Disable command on dactyl * Update ergodox to use proper commands for rgb matrix indicators * Update all rgb matrix indicator functions * Update rules for dactyl-manuform * Reduce wait time for mouse layer off event * Add more info to logger * Add wrappers for get_tapping term * Move version.h include into only file that actually needs it * Update rgb sleep stuff * Update key print function * Change DM keymap settings * Change pin for DM Manuform * Add Proton C stuff for Corne keymap * more arm corne tinkering * Even more arm stuff for corne * Cleanup corne stuff * redirect default keymap to drashna because I am a very bad man * change corne rgb priority * Update tractyl manuform to not conflict * Add more secret stuff * more dactyl tweaks * Add more options to split transport * Changes of oled support * Change split settings * Improve keylogger formatting more * tweak oled stuff * Oled and such tweaks * Reduce brightness due to leds * Decrease brightness more * Only run layer code if master
3 years ago
[Keymap] Cleanup and updating of drashna keymap code (#11516) * Update other keyboards for rgb matrix changes * Remove customized bootmagic code * Fix corne layout compilation error * Fix compiler errors with all keymaps * Add Simple Visualizer for ergodox infinity * Fix compile issue with Corne * Fix keymap stuff * Add alias for mouse layer * Add Halmak Keyboard layout * Updates for Kyria * Add support for oled interval * Change RGB stuff [CHANGE] Fix coexistence issues * Fix rgb_stuff * Add custom ploopyco mouse keymap * Decrease default dwell time * Updates based on last breaking changes update * Disable command on dactyl * Update ergodox to use proper commands for rgb matrix indicators * Update all rgb matrix indicator functions * Update rules for dactyl-manuform * Reduce wait time for mouse layer off event * Add more info to logger * Add wrappers for get_tapping term * Move version.h include into only file that actually needs it * Update rgb sleep stuff * Update key print function * Change DM keymap settings * Change pin for DM Manuform * Add Proton C stuff for Corne keymap * more arm corne tinkering * Even more arm stuff for corne * Cleanup corne stuff * redirect default keymap to drashna because I am a very bad man * change corne rgb priority * Update tractyl manuform to not conflict * Add more secret stuff * more dactyl tweaks * Add more options to split transport * Changes of oled support * Change split settings * Improve keylogger formatting more * tweak oled stuff * Oled and such tweaks * Reduce brightness due to leds * Decrease brightness more * Only run layer code if master
3 years ago
[Keymap] Cleanup and updating of drashna keymap code (#11516) * Update other keyboards for rgb matrix changes * Remove customized bootmagic code * Fix corne layout compilation error * Fix compiler errors with all keymaps * Add Simple Visualizer for ergodox infinity * Fix compile issue with Corne * Fix keymap stuff * Add alias for mouse layer * Add Halmak Keyboard layout * Updates for Kyria * Add support for oled interval * Change RGB stuff [CHANGE] Fix coexistence issues * Fix rgb_stuff * Add custom ploopyco mouse keymap * Decrease default dwell time * Updates based on last breaking changes update * Disable command on dactyl * Update ergodox to use proper commands for rgb matrix indicators * Update all rgb matrix indicator functions * Update rules for dactyl-manuform * Reduce wait time for mouse layer off event * Add more info to logger * Add wrappers for get_tapping term * Move version.h include into only file that actually needs it * Update rgb sleep stuff * Update key print function * Change DM keymap settings * Change pin for DM Manuform * Add Proton C stuff for Corne keymap * more arm corne tinkering * Even more arm stuff for corne * Cleanup corne stuff * redirect default keymap to drashna because I am a very bad man * change corne rgb priority * Update tractyl manuform to not conflict * Add more secret stuff * more dactyl tweaks * Add more options to split transport * Changes of oled support * Change split settings * Improve keylogger formatting more * tweak oled stuff * Oled and such tweaks * Reduce brightness due to leds * Decrease brightness more * Only run layer code if master
3 years ago
[Keymap] Big Drashna code update (#6639) * Add a quefrency keymap * New Alt-ernate layouts * Enable Per Key Tapping Term to preserve sanity * Use underglow and mod lights for status on Corne * Update the drashna_ms keymap for quefrency * Disable Audio since there isn't enough space * Update KC_MAKE to ues :flash target * Cleanup ergodox layout * Enable i2c support for Iris * Add keymap support for CG_SWAP * Enable RGB Matrix Shutdown mode * enable heatmap * Update gitlab CI to install python3 * Remove game macros These are no longer needed, and haven't been used in ages * Cleanup planck layout * Add RGB Matrix fun and RGB cleanup * Add keycode and config for RGB Matrix idle animations * Clean up rgb idle animation code * Add rgb idle keycode to keymaps * Fix issues with rgb matrix idle animation * Fix some handling for idle animation * Reduce idle animation timeout to 15s to be more reasonable * fix up rgb stuff * Fix isses with rgb functions not being called for matrix * Use custom EEPROM Magic Number so testing is easier * Extend Default Layer macro to support a lot more layers * Fix bjohnson macropad * Adjust KC_MAKE to process mods for more consistent behavior * Fix up rgb stuff on corne * Corne OLED Overhaul * Fixes a number of issues with weirdness. * Fixes issues with keylogger (should be more reliable now) * Modulaize the OLED render sections * Rewrite layer display code * Update URL for Font Editor Due to odd issues, I ended up rewriting from scratch. And using PROGMEM versions, since I think I was getting memory overflows. * Update polling rate on all keebs * Fix planck ez layout config * Remove macros from Viterbi
4 years ago
[Keymap] Drashna's Feature madness (#6128) * Fix my Tap Dance issues after I broke them * Cleanup and organization of userspace documentation As well as some additional cleanup of functions due to review of documentation. * Enable Tapdance on Glow and remove more animations * Revert to Eager PR debouncing * Add better check for startup animation * Move where RGB Matrix defines are listed * Limit RGB Matrix max val * Update keyboard for Iris Rev 3 conflicts * Enable encoder support on planck ez * Remove is_master check from corne\'s OLED code * Overhaul OLED screens for my Corne * One last removal * Show RGB valu On both sides * Updates for OLED display info * Fix compile issues for rgb config * Disabled Space Cadet for all drashna keymaps * Fix OLED Screen configs * Minor OLED Tweaks * Revert some Iris changes * Fix song include * Handle MAKE macro for the Corne boards better * Add super hacky-hack for eeconfig initialization * Add audio support for Fractal since Elite Cs support it * Add defines for keycode steps * Add White layout * Update Corne RGB info * Add fun effects to layer indication for RGB Matrix enabled boards * Use proper define for product name detection * Update formatting * Use custom timeout mechanism for OLED timeout * Fix up OLED screen HSV code for new HSV structure * Better handle turning off RGB Matrix when sleeping * Disable MultiSplash Animation * Change Iris back to using serial * Why was RGB disabled?!?!?! * Limit val in rgb_matrix_layer_helper function * Remove EECONFIG setting for RGB matrix
4 years ago
[Keymap] Drashna's Feature madness (#6128) * Fix my Tap Dance issues after I broke them * Cleanup and organization of userspace documentation As well as some additional cleanup of functions due to review of documentation. * Enable Tapdance on Glow and remove more animations * Revert to Eager PR debouncing * Add better check for startup animation * Move where RGB Matrix defines are listed * Limit RGB Matrix max val * Update keyboard for Iris Rev 3 conflicts * Enable encoder support on planck ez * Remove is_master check from corne\'s OLED code * Overhaul OLED screens for my Corne * One last removal * Show RGB valu On both sides * Updates for OLED display info * Fix compile issues for rgb config * Disabled Space Cadet for all drashna keymaps * Fix OLED Screen configs * Minor OLED Tweaks * Revert some Iris changes * Fix song include * Handle MAKE macro for the Corne boards better * Add super hacky-hack for eeconfig initialization * Add audio support for Fractal since Elite Cs support it * Add defines for keycode steps * Add White layout * Update Corne RGB info * Add fun effects to layer indication for RGB Matrix enabled boards * Use proper define for product name detection * Update formatting * Use custom timeout mechanism for OLED timeout * Fix up OLED screen HSV code for new HSV structure * Better handle turning off RGB Matrix when sleeping * Disable MultiSplash Animation * Change Iris back to using serial * Why was RGB disabled?!?!?! * Limit val in rgb_matrix_layer_helper function * Remove EECONFIG setting for RGB matrix
4 years ago
[Keymap] Big Drashna code update (#6639) * Add a quefrency keymap * New Alt-ernate layouts * Enable Per Key Tapping Term to preserve sanity * Use underglow and mod lights for status on Corne * Update the drashna_ms keymap for quefrency * Disable Audio since there isn't enough space * Update KC_MAKE to ues :flash target * Cleanup ergodox layout * Enable i2c support for Iris * Add keymap support for CG_SWAP * Enable RGB Matrix Shutdown mode * enable heatmap * Update gitlab CI to install python3 * Remove game macros These are no longer needed, and haven't been used in ages * Cleanup planck layout * Add RGB Matrix fun and RGB cleanup * Add keycode and config for RGB Matrix idle animations * Clean up rgb idle animation code * Add rgb idle keycode to keymaps * Fix issues with rgb matrix idle animation * Fix some handling for idle animation * Reduce idle animation timeout to 15s to be more reasonable * fix up rgb stuff * Fix isses with rgb functions not being called for matrix * Use custom EEPROM Magic Number so testing is easier * Extend Default Layer macro to support a lot more layers * Fix bjohnson macropad * Adjust KC_MAKE to process mods for more consistent behavior * Fix up rgb stuff on corne * Corne OLED Overhaul * Fixes a number of issues with weirdness. * Fixes issues with keylogger (should be more reliable now) * Modulaize the OLED render sections * Rewrite layer display code * Update URL for Font Editor Due to odd issues, I ended up rewriting from scratch. And using PROGMEM versions, since I think I was getting memory overflows. * Update polling rate on all keebs * Fix planck ez layout config * Remove macros from Viterbi
4 years ago
Update to drashna userspace and keymaps (#3172) * Use string with delay * Add skipped region to ergodox * Add send string config * Use default_layer_state instead of function * Fully generalize keyboards * old iris cleanup * Fix Drashna keymap compile issues By checking to see if secret.c exists before actually trying to add it * Remove unnecessary references * Add 4x12 ortho board * Update userspace readme for secrets * Make RGB more modular * Fix iris keymap, since we don't need the lower left (Function keys) * Fix includes * Add Blanks * Fix Ergodox lower layer * Add suspend commands * Add Maltron Layout * Add additional layouts * Finish adding gamepad to Iris * Tweaks to iris gamepag layer * make gaming layers more friendly * minor gaming layer tweak * Add Carplax * Add modded key timer function * Cleanup and macro documentation * Add QMK DFU info * Add 'old' keymap for 12 LED spare * Update Pro Micro documentation * Disable twinkling so it fits in firmware space * Switch to QMK DFU bootloader, since it's better anyhow * Write default layer state colors to EEPROM Since we are writing to EEPROM anyways, and this way, it sticks on reboot * Fix QMK DFU bootloader options * More updates for QMK DFU support * Use matrix scanning hack for startup_user until #3113 gets merged * Fix indicator light consistency issue * Add/readd ifdefs to indicators * Add/readd alt indicator * Remove RGB Twinkling from Viterbi macro pad * Fix default layer color detection * Fix rebase and detection issues * Cleanup code so it will compile if RGBLIGHT is disabled * Revert vsode settings * Use Pragma Once instead of boilerplate code
5 years ago
Update to drashna userspace and keymaps (#3172) * Use string with delay * Add skipped region to ergodox * Add send string config * Use default_layer_state instead of function * Fully generalize keyboards * old iris cleanup * Fix Drashna keymap compile issues By checking to see if secret.c exists before actually trying to add it * Remove unnecessary references * Add 4x12 ortho board * Update userspace readme for secrets * Make RGB more modular * Fix iris keymap, since we don't need the lower left (Function keys) * Fix includes * Add Blanks * Fix Ergodox lower layer * Add suspend commands * Add Maltron Layout * Add additional layouts * Finish adding gamepad to Iris * Tweaks to iris gamepag layer * make gaming layers more friendly * minor gaming layer tweak * Add Carplax * Add modded key timer function * Cleanup and macro documentation * Add QMK DFU info * Add 'old' keymap for 12 LED spare * Update Pro Micro documentation * Disable twinkling so it fits in firmware space * Switch to QMK DFU bootloader, since it's better anyhow * Write default layer state colors to EEPROM Since we are writing to EEPROM anyways, and this way, it sticks on reboot * Fix QMK DFU bootloader options * More updates for QMK DFU support * Use matrix scanning hack for startup_user until #3113 gets merged * Fix indicator light consistency issue * Add/readd ifdefs to indicators * Add/readd alt indicator * Remove RGB Twinkling from Viterbi macro pad * Fix default layer color detection * Fix rebase and detection issues * Cleanup code so it will compile if RGBLIGHT is disabled * Revert vsode settings * Use Pragma Once instead of boilerplate code
5 years ago
[Keymap] Cleanup and updating of drashna keymap code (#11516) * Update other keyboards for rgb matrix changes * Remove customized bootmagic code * Fix corne layout compilation error * Fix compiler errors with all keymaps * Add Simple Visualizer for ergodox infinity * Fix compile issue with Corne * Fix keymap stuff * Add alias for mouse layer * Add Halmak Keyboard layout * Updates for Kyria * Add support for oled interval * Change RGB stuff [CHANGE] Fix coexistence issues * Fix rgb_stuff * Add custom ploopyco mouse keymap * Decrease default dwell time * Updates based on last breaking changes update * Disable command on dactyl * Update ergodox to use proper commands for rgb matrix indicators * Update all rgb matrix indicator functions * Update rules for dactyl-manuform * Reduce wait time for mouse layer off event * Add more info to logger * Add wrappers for get_tapping term * Move version.h include into only file that actually needs it * Update rgb sleep stuff * Update key print function * Change DM keymap settings * Change pin for DM Manuform * Add Proton C stuff for Corne keymap * more arm corne tinkering * Even more arm stuff for corne * Cleanup corne stuff * redirect default keymap to drashna because I am a very bad man * change corne rgb priority * Update tractyl manuform to not conflict * Add more secret stuff * more dactyl tweaks * Add more options to split transport * Changes of oled support * Change split settings * Improve keylogger formatting more * tweak oled stuff * Oled and such tweaks * Reduce brightness due to leds * Decrease brightness more * Only run layer code if master
3 years ago
Migrated most code from keymaps to userspace (#1980) * Add woodpad * Cleanup * Remove misc layouts for woodpad * Move woodpad to handwired * Updated RGB Underglow info * Cleanup macros * Tweaked RGB lighting stuff * Start to merge orthodox/ergodox keymaps (persistant layers) * Add woodpad * Add forced NKRO * Added default layer (qwerty/colemak/dvorak) detection to RGB Underglow * Updated macros and added workman keymaps * Fixed RGB lighting for Workman layout * Add leader keys * Remove force NKRO * Add Viterbi one handed layout and minor tweaks to others * Finishing up Viterbi keyboard layout, and NKRO tweaks to other layouts * Made "make" keystroke universal * Clean up and updates of drashna keymaps * Add workman layer to planck * Update to keymaps * Fix makefile toggle code in ez keymap Finish adding RGB code to orthodox * Updated RGB Underglow layer indication code due to discovery of the layer_state_set_kb function * Remove unnecessary planck layout * Fixed Workman song * update make command and added lit reset * Fixed formatting to fall in line with official standards * Minor tweaks * Removed Leader Keys from Ergodox EZ Keymap Added KC_RESET that resets board and sets underglow to red * Tweak reset code * Cleanup * Remove misc layouts for woodpad * Move woodpad to handwired * Updated RGB Underglow info * Cleanup macros * Tweaked RGB lighting stuff * Start to merge orthodox/ergodox keymaps (persistant layers) * Add forced NKRO * Added default layer (qwerty/colemak/dvorak) detection to RGB Underglow * Updated macros and added workman keymaps * Fixed RGB lighting for Workman layout * Add leader keys * Remove force NKRO * Add Viterbi one handed layout and minor tweaks to others * Finishing up Viterbi keyboard layout, and NKRO tweaks to other layouts * Made "make" keystroke universal * Clean up and updates of drashna keymaps * Add workman layer to planck * Update to keymaps * Fix makefile toggle code in ez keymap Finish adding RGB code to orthodox * Updated RGB Underglow layer indication code due to discovery of the layer_state_set_kb function * Remove unnecessary planck layout * Fixed Workman song * update make command and added lit reset * Fixed formatting to fall in line with official standards * Minor tweaks * Removed Leader Keys from Ergodox EZ Keymap Added KC_RESET that resets board and sets underglow to red * Tweak reset code * Fix rebasing issues * remove head files * Fix "macro" issue * Rename ez keymaps for userspace * Revert "Rename ez keymaps for userspace" This reverts commit c25425911852e41711a5f0273b5741adb16e5bd4. * Renamed Ergodox EZ layouts so that all of my personal layouts are on the same name, in prep for using userspaces * Fix ergodox code * Remove "drashna-ez" keymap as it's no longer needed * Migrate majority of code to Userspace
6 years ago
Migrated most code from keymaps to userspace (#1980) * Add woodpad * Cleanup * Remove misc layouts for woodpad * Move woodpad to handwired * Updated RGB Underglow info * Cleanup macros * Tweaked RGB lighting stuff * Start to merge orthodox/ergodox keymaps (persistant layers) * Add woodpad * Add forced NKRO * Added default layer (qwerty/colemak/dvorak) detection to RGB Underglow * Updated macros and added workman keymaps * Fixed RGB lighting for Workman layout * Add leader keys * Remove force NKRO * Add Viterbi one handed layout and minor tweaks to others * Finishing up Viterbi keyboard layout, and NKRO tweaks to other layouts * Made "make" keystroke universal * Clean up and updates of drashna keymaps * Add workman layer to planck * Update to keymaps * Fix makefile toggle code in ez keymap Finish adding RGB code to orthodox * Updated RGB Underglow layer indication code due to discovery of the layer_state_set_kb function * Remove unnecessary planck layout * Fixed Workman song * update make command and added lit reset * Fixed formatting to fall in line with official standards * Minor tweaks * Removed Leader Keys from Ergodox EZ Keymap Added KC_RESET that resets board and sets underglow to red * Tweak reset code * Cleanup * Remove misc layouts for woodpad * Move woodpad to handwired * Updated RGB Underglow info * Cleanup macros * Tweaked RGB lighting stuff * Start to merge orthodox/ergodox keymaps (persistant layers) * Add forced NKRO * Added default layer (qwerty/colemak/dvorak) detection to RGB Underglow * Updated macros and added workman keymaps * Fixed RGB lighting for Workman layout * Add leader keys * Remove force NKRO * Add Viterbi one handed layout and minor tweaks to others * Finishing up Viterbi keyboard layout, and NKRO tweaks to other layouts * Made "make" keystroke universal * Clean up and updates of drashna keymaps * Add workman layer to planck * Update to keymaps * Fix makefile toggle code in ez keymap Finish adding RGB code to orthodox * Updated RGB Underglow layer indication code due to discovery of the layer_state_set_kb function * Remove unnecessary planck layout * Fixed Workman song * update make command and added lit reset * Fixed formatting to fall in line with official standards * Minor tweaks * Removed Leader Keys from Ergodox EZ Keymap Added KC_RESET that resets board and sets underglow to red * Tweak reset code * Fix rebasing issues * remove head files * Fix "macro" issue * Rename ez keymaps for userspace * Revert "Rename ez keymaps for userspace" This reverts commit c25425911852e41711a5f0273b5741adb16e5bd4. * Renamed Ergodox EZ layouts so that all of my personal layouts are on the same name, in prep for using userspaces * Fix ergodox code * Remove "drashna-ez" keymap as it's no longer needed * Migrate majority of code to Userspace
6 years ago
[Keymap] Cleanup and updating of drashna keymap code (#11516) * Update other keyboards for rgb matrix changes * Remove customized bootmagic code * Fix corne layout compilation error * Fix compiler errors with all keymaps * Add Simple Visualizer for ergodox infinity * Fix compile issue with Corne * Fix keymap stuff * Add alias for mouse layer * Add Halmak Keyboard layout * Updates for Kyria * Add support for oled interval * Change RGB stuff [CHANGE] Fix coexistence issues * Fix rgb_stuff * Add custom ploopyco mouse keymap * Decrease default dwell time * Updates based on last breaking changes update * Disable command on dactyl * Update ergodox to use proper commands for rgb matrix indicators * Update all rgb matrix indicator functions * Update rules for dactyl-manuform * Reduce wait time for mouse layer off event * Add more info to logger * Add wrappers for get_tapping term * Move version.h include into only file that actually needs it * Update rgb sleep stuff * Update key print function * Change DM keymap settings * Change pin for DM Manuform * Add Proton C stuff for Corne keymap * more arm corne tinkering * Even more arm stuff for corne * Cleanup corne stuff * redirect default keymap to drashna because I am a very bad man * change corne rgb priority * Update tractyl manuform to not conflict * Add more secret stuff * more dactyl tweaks * Add more options to split transport * Changes of oled support * Change split settings * Improve keylogger formatting more * tweak oled stuff * Oled and such tweaks * Reduce brightness due to leds * Decrease brightness more * Only run layer code if master
3 years ago
Update to drashna userspace and keymaps (#3172) * Use string with delay * Add skipped region to ergodox * Add send string config * Use default_layer_state instead of function * Fully generalize keyboards * old iris cleanup * Fix Drashna keymap compile issues By checking to see if secret.c exists before actually trying to add it * Remove unnecessary references * Add 4x12 ortho board * Update userspace readme for secrets * Make RGB more modular * Fix iris keymap, since we don't need the lower left (Function keys) * Fix includes * Add Blanks * Fix Ergodox lower layer * Add suspend commands * Add Maltron Layout * Add additional layouts * Finish adding gamepad to Iris * Tweaks to iris gamepag layer * make gaming layers more friendly * minor gaming layer tweak * Add Carplax * Add modded key timer function * Cleanup and macro documentation * Add QMK DFU info * Add 'old' keymap for 12 LED spare * Update Pro Micro documentation * Disable twinkling so it fits in firmware space * Switch to QMK DFU bootloader, since it's better anyhow * Write default layer state colors to EEPROM Since we are writing to EEPROM anyways, and this way, it sticks on reboot * Fix QMK DFU bootloader options * More updates for QMK DFU support * Use matrix scanning hack for startup_user until #3113 gets merged * Fix indicator light consistency issue * Add/readd ifdefs to indicators * Add/readd alt indicator * Remove RGB Twinkling from Viterbi macro pad * Fix default layer color detection * Fix rebase and detection issues * Cleanup code so it will compile if RGBLIGHT is disabled * Revert vsode settings * Use Pragma Once instead of boilerplate code
5 years ago
[Keymap] Drashna's Feature madness (#6128) * Fix my Tap Dance issues after I broke them * Cleanup and organization of userspace documentation As well as some additional cleanup of functions due to review of documentation. * Enable Tapdance on Glow and remove more animations * Revert to Eager PR debouncing * Add better check for startup animation * Move where RGB Matrix defines are listed * Limit RGB Matrix max val * Update keyboard for Iris Rev 3 conflicts * Enable encoder support on planck ez * Remove is_master check from corne\'s OLED code * Overhaul OLED screens for my Corne * One last removal * Show RGB valu On both sides * Updates for OLED display info * Fix compile issues for rgb config * Disabled Space Cadet for all drashna keymaps * Fix OLED Screen configs * Minor OLED Tweaks * Revert some Iris changes * Fix song include * Handle MAKE macro for the Corne boards better * Add super hacky-hack for eeconfig initialization * Add audio support for Fractal since Elite Cs support it * Add defines for keycode steps * Add White layout * Update Corne RGB info * Add fun effects to layer indication for RGB Matrix enabled boards * Use proper define for product name detection * Update formatting * Use custom timeout mechanism for OLED timeout * Fix up OLED screen HSV code for new HSV structure * Better handle turning off RGB Matrix when sleeping * Disable MultiSplash Animation * Change Iris back to using serial * Why was RGB disabled?!?!?! * Limit val in rgb_matrix_layer_helper function * Remove EECONFIG setting for RGB matrix
4 years ago
[Keymap] Drashna's Feature madness (#6128) * Fix my Tap Dance issues after I broke them * Cleanup and organization of userspace documentation As well as some additional cleanup of functions due to review of documentation. * Enable Tapdance on Glow and remove more animations * Revert to Eager PR debouncing * Add better check for startup animation * Move where RGB Matrix defines are listed * Limit RGB Matrix max val * Update keyboard for Iris Rev 3 conflicts * Enable encoder support on planck ez * Remove is_master check from corne\'s OLED code * Overhaul OLED screens for my Corne * One last removal * Show RGB valu On both sides * Updates for OLED display info * Fix compile issues for rgb config * Disabled Space Cadet for all drashna keymaps * Fix OLED Screen configs * Minor OLED Tweaks * Revert some Iris changes * Fix song include * Handle MAKE macro for the Corne boards better * Add super hacky-hack for eeconfig initialization * Add audio support for Fractal since Elite Cs support it * Add defines for keycode steps * Add White layout * Update Corne RGB info * Add fun effects to layer indication for RGB Matrix enabled boards * Use proper define for product name detection * Update formatting * Use custom timeout mechanism for OLED timeout * Fix up OLED screen HSV code for new HSV structure * Better handle turning off RGB Matrix when sleeping * Disable MultiSplash Animation * Change Iris back to using serial * Why was RGB disabled?!?!?! * Limit val in rgb_matrix_layer_helper function * Remove EECONFIG setting for RGB matrix
4 years ago
  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. #include "drashna.h"
  17. userspace_config_t userspace_config;
  18. bool mod_key_press_timer(uint16_t code, uint16_t mod_code, bool pressed) {
  19. static uint16_t this_timer;
  20. if (pressed) {
  21. this_timer = timer_read();
  22. } else {
  23. if (timer_elapsed(this_timer) < TAPPING_TERM) {
  24. tap_code(code);
  25. } else {
  26. register_code(mod_code);
  27. tap_code(code);
  28. unregister_code(mod_code);
  29. }
  30. }
  31. return false;
  32. }
  33. bool mod_key_press(uint16_t code, uint16_t mod_code, bool pressed, uint16_t this_timer) {
  34. if (pressed) {
  35. this_timer = timer_read();
  36. } else {
  37. if (timer_elapsed(this_timer) < TAPPING_TERM) {
  38. tap_code(code);
  39. } else {
  40. register_code(mod_code);
  41. tap_code(code);
  42. unregister_code(mod_code);
  43. }
  44. }
  45. return false;
  46. }
  47. __attribute__((weak)) void keyboard_pre_init_keymap(void) {}
  48. void keyboard_pre_init_user(void) {
  49. userspace_config.raw = eeconfig_read_user();
  50. keyboard_pre_init_keymap();
  51. }
  52. // Add reconfigurable functions here, for keymap customization
  53. // This allows for a global, userspace functions, and continued
  54. // customization of the keymap. Use _keymap instead of _user
  55. // functions in the keymaps
  56. // Call user matrix init, set default RGB colors and then
  57. // call the keymap's init function
  58. __attribute__((weak)) void matrix_init_keymap(void) {}
  59. __attribute__((weak)) void matrix_init_secret(void) {}
  60. void matrix_init_user(void) {
  61. #if defined(BOOTLOADER_CATERINA) && defined(__AVR__)
  62. DDRD &= ~(1 << 5);
  63. PORTD &= ~(1 << 5);
  64. DDRB &= ~(1 << 0);
  65. PORTB &= ~(1 << 0);
  66. #endif
  67. matrix_init_secret();
  68. matrix_init_keymap();
  69. }
  70. __attribute__((weak)) void keyboard_post_init_keymap(void) {}
  71. void keyboard_post_init_user(void) {
  72. #if defined(RGBLIGHT_ENABLE)
  73. keyboard_post_init_rgb_light();
  74. #endif
  75. #if defined(RGB_MATRIX_ENABLE)
  76. keyboard_post_init_rgb_matrix();
  77. #endif
  78. #if defined(SPLIT_KEYBOARD) && defined(SPLIT_TRANSACTION_IDS_USER)
  79. keyboard_post_init_transport_sync();
  80. #endif
  81. keyboard_post_init_keymap();
  82. }
  83. #ifdef RGB_MATRIX_ENABLE
  84. void rgb_matrix_update_pwm_buffers(void);
  85. #endif
  86. __attribute__((weak)) void shutdown_keymap(void) {}
  87. void shutdown_user(void) {
  88. #ifdef RGBLIGHT_ENABLE
  89. rgblight_enable_noeeprom();
  90. rgblight_mode_noeeprom(1);
  91. rgblight_setrgb_red();
  92. #endif // RGBLIGHT_ENABLE
  93. #ifdef RGB_MATRIX_ENABLE
  94. rgb_matrix_set_color_all(0xFF, 0x00, 0x00);
  95. rgb_matrix_update_pwm_buffers();
  96. #endif // RGB_MATRIX_ENABLE
  97. #ifdef OLED_ENABLE
  98. oled_off();
  99. #endif
  100. shutdown_keymap();
  101. }
  102. __attribute__((weak)) void suspend_power_down_keymap(void) {}
  103. void suspend_power_down_user(void) {
  104. #ifdef OLED_ENABLE
  105. oled_off();
  106. #endif
  107. suspend_power_down_keymap();
  108. }
  109. __attribute__((weak)) void suspend_wakeup_init_keymap(void) {}
  110. void suspend_wakeup_init_user(void) {
  111. if (layer_state_is(_GAMEPAD)) {
  112. layer_off(_GAMEPAD);
  113. }
  114. if (layer_state_is(_DIABLO)) {
  115. layer_off(_DIABLO);
  116. }
  117. suspend_wakeup_init_keymap();
  118. }
  119. // No global matrix scan code, so just run keymap's matrix
  120. // scan function
  121. __attribute__((weak)) void matrix_scan_keymap(void) {}
  122. __attribute__((weak)) void matrix_scan_secret(void) {}
  123. void matrix_scan_user(void) {
  124. static bool has_ran_yet;
  125. if (!has_ran_yet) {
  126. has_ran_yet = true;
  127. startup_user();
  128. }
  129. #ifdef TAP_DANCE_ENABLE // Run Diablo 3 macro checking code.
  130. run_diablo_macro_check();
  131. #endif // TAP_DANCE_ENABLE
  132. #if defined(RGBLIGHT_ENABLE)
  133. matrix_scan_rgb_light();
  134. #endif // RGBLIGHT_ENABLE
  135. #if defined(RGB_MATRIX_ENABLE)
  136. matrix_scan_rgb_matrix();
  137. #endif
  138. matrix_scan_secret();
  139. matrix_scan_keymap();
  140. }
  141. #ifdef AUDIO_ENABLE
  142. float doom_song[][2] = SONG(E1M1_DOOM);
  143. #endif
  144. // on layer change, no matter where the change was initiated
  145. // Then runs keymap's layer change check
  146. __attribute__((weak)) layer_state_t layer_state_set_keymap(layer_state_t state) { return state; }
  147. layer_state_t layer_state_set_user(layer_state_t state) {
  148. if (!is_keyboard_master()) {
  149. return state;
  150. }
  151. state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST);
  152. #if defined(RGBLIGHT_ENABLE)
  153. state = layer_state_set_rgb_light(state);
  154. #endif // RGBLIGHT_ENABLE
  155. #if defined(AUDIO_ENABLE) && !defined(__arm__)
  156. static bool is_gamepad_on = false;
  157. if (layer_state_cmp(state, _GAMEPAD) != is_gamepad_on) {
  158. is_gamepad_on = layer_state_cmp(state, _GAMEPAD);
  159. if (is_gamepad_on) {
  160. PLAY_LOOP(doom_song);
  161. } else {
  162. stop_all_notes();
  163. }
  164. }
  165. #endif
  166. state = layer_state_set_keymap(state);
  167. return state;
  168. }
  169. // Runs state check and changes underglow color and animation
  170. __attribute__((weak)) layer_state_t default_layer_state_set_keymap(layer_state_t state) { return state; }
  171. layer_state_t default_layer_state_set_user(layer_state_t state) {
  172. if (!is_keyboard_master()) {
  173. return state;
  174. }
  175. state = default_layer_state_set_keymap(state);
  176. #if 0
  177. # if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
  178. state = default_layer_state_set_rgb(state);
  179. # endif // RGBLIGHT_ENABLE
  180. #endif
  181. return state;
  182. }
  183. __attribute__((weak)) void led_set_keymap(uint8_t usb_led) {}
  184. void led_set_user(uint8_t usb_led) { led_set_keymap(usb_led); }
  185. __attribute__((weak)) void eeconfig_init_keymap(void) {}
  186. void eeconfig_init_user(void) {
  187. userspace_config.raw = 0;
  188. userspace_config.rgb_layer_change = true;
  189. eeconfig_update_user(userspace_config.raw);
  190. eeconfig_init_keymap();
  191. keyboard_init();
  192. }
  193. bool hasAllBitsInMask(uint8_t value, uint8_t mask) {
  194. value &= 0xF;
  195. mask &= 0xF;
  196. return (value & mask) == mask;
  197. }
  198. #ifdef SPLIT_KEYBOARD
  199. __attribute__((weak)) void matrix_slave_scan_keymap(void) {}
  200. void matrix_slave_scan_user(void) {
  201. # if defined(AUDIO_ENABLE)
  202. # if !defined(NO_MUSIC_MODE)
  203. music_task();
  204. # endif
  205. # ifdef AUDIO_INIT_DELAY
  206. if (!is_keyboard_master()) {
  207. static bool delayed_tasks_run = false;
  208. static uint16_t delayed_task_timer = 0;
  209. if (!delayed_tasks_run) {
  210. if (!delayed_task_timer) {
  211. delayed_task_timer = timer_read();
  212. } else if (timer_elapsed(delayed_task_timer) > 300) {
  213. audio_startup();
  214. delayed_tasks_run = true;
  215. }
  216. }
  217. }
  218. # endif
  219. # endif
  220. # ifdef SEQUENCER_ENABLE
  221. sequencer_task();
  222. # endif
  223. # ifdef LED_MATRIX_ENABLE
  224. led_matrix_task();
  225. # endif
  226. # ifdef HAPTIC_ENABLE
  227. haptic_task();
  228. # endif
  229. matrix_slave_scan_keymap();
  230. }
  231. #endif