forked from mirrors/qmk_userspace
[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
This commit is contained in:
parent
c16a3dcb54
commit
7a08b9d374
36 changed files with 588 additions and 270 deletions
|
@ -49,21 +49,6 @@ bool mod_key_press(uint16_t code, uint16_t mod_code, bool pressed, uint16_t this
|
|||
return false;
|
||||
}
|
||||
|
||||
void bootmagic_lite(void) {
|
||||
matrix_scan();
|
||||
#if defined(DEBOUNCING_DELAY) && DEBOUNCING_DELAY > 0
|
||||
wait_ms(DEBOUNCING_DELAY * 2);
|
||||
#elif defined(DEBOUNCE) && DEBOUNCE > 0
|
||||
wait_ms(DEBOUNCE * 2);
|
||||
#else
|
||||
wait_ms(30);
|
||||
#endif
|
||||
matrix_scan();
|
||||
if (matrix_get_row(BOOTMAGIC_LITE_ROW) & (1 << BOOTMAGIC_LITE_COLUMN)) {
|
||||
bootloader_jump();
|
||||
}
|
||||
}
|
||||
|
||||
__attribute__((weak)) void keyboard_pre_init_keymap(void) {}
|
||||
|
||||
void keyboard_pre_init_user(void) {
|
||||
|
@ -75,6 +60,7 @@ void keyboard_pre_init_user(void) {
|
|||
// customization of the keymap. Use _keymap instead of _user
|
||||
// functions in the keymaps
|
||||
__attribute__((weak)) void matrix_init_keymap(void) {}
|
||||
__attribute__((weak)) void matrix_init_secret(void) {}
|
||||
|
||||
// Call user matrix init, set default RGB colors and then
|
||||
// call the keymap's init function
|
||||
|
@ -86,6 +72,8 @@ void matrix_init_user(void) {
|
|||
DDRB &= ~(1 << 0);
|
||||
PORTB &= ~(1 << 0);
|
||||
#endif
|
||||
|
||||
matrix_init_secret();
|
||||
matrix_init_keymap();
|
||||
}
|
||||
|
||||
|
@ -103,7 +91,9 @@ void keyboard_post_init_user(void) {
|
|||
|
||||
__attribute__((weak)) void shutdown_keymap(void) {}
|
||||
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
void rgb_matrix_update_pwm_buffers(void);
|
||||
#endif
|
||||
|
||||
void shutdown_user(void) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
|
@ -129,6 +119,8 @@ void suspend_wakeup_init_user(void) { suspend_wakeup_init_keymap(); }
|
|||
|
||||
__attribute__((weak)) void matrix_scan_keymap(void) {}
|
||||
|
||||
__attribute__((weak)) void matrix_scan_secret(void) {}
|
||||
|
||||
// No global matrix scan code, so just run keymap's matrix
|
||||
// scan function
|
||||
void matrix_scan_user(void) {
|
||||
|
@ -149,6 +141,8 @@ void matrix_scan_user(void) {
|
|||
matrix_scan_rgb_matrix();
|
||||
#endif
|
||||
|
||||
matrix_scan_secret();
|
||||
|
||||
matrix_scan_keymap();
|
||||
}
|
||||
|
||||
|
@ -157,6 +151,8 @@ __attribute__((weak)) layer_state_t layer_state_set_keymap(layer_state_t state)
|
|||
// on layer change, no matter where the change was initiated
|
||||
// Then runs keymap's layer change check
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
if (!is_keyboard_master()) { return state; }
|
||||
|
||||
state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST);
|
||||
#if defined(RGBLIGHT_ENABLE)
|
||||
state = layer_state_set_rgb_light(state);
|
||||
|
@ -168,6 +164,8 @@ __attribute__((weak)) layer_state_t default_layer_state_set_keymap(layer_state_t
|
|||
|
||||
// Runs state check and changes underglow color and animation
|
||||
layer_state_t default_layer_state_set_user(layer_state_t state) {
|
||||
if (!is_keyboard_master()) { return state; }
|
||||
|
||||
state = default_layer_state_set_keymap(state);
|
||||
#if 0
|
||||
# if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue