diff options
author | Drashna Jaelre <drashna@live.com> | 2019-09-07 08:57:30 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-07 08:57:30 -0700 |
commit | e88f80a891138d40acddcdd2b3dface8b2a57404 (patch) | |
tree | 1fa1e8cd0bd15d10970ce55efceaffcddaf01160 /users/drashna/drashna.c | |
parent | 79a6c6eda50671b28f32dfb73728fcc1671fe4fc (diff) | |
download | qmk_firmware-e88f80a891138d40acddcdd2b3dface8b2a57404.tar.gz |
[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
Diffstat (limited to 'users/drashna/drashna.c')
-rw-r--r-- | users/drashna/drashna.c | 37 |
1 files changed, 10 insertions, 27 deletions
diff --git a/users/drashna/drashna.c b/users/drashna/drashna.c index c1809dad0..6a436e0af 100644 --- a/users/drashna/drashna.c +++ b/users/drashna/drashna.c @@ -25,26 +25,7 @@ userspace_config_t userspace_config; # define DRASHNA_UNICODE_MODE 2 #endif -// This block is for all of the gaming macros, as they were all doing -// the same thing, but with differring text sent. -bool send_game_macro(const char *str, keyrecord_t *record, bool override) { - if (!record->event.pressed || override) { - uint16_t keycode; - if (userspace_config.is_overwatch) { - keycode = KC_BSPC; - } else { - keycode = KC_ENTER; - } - clear_keyboard(); - tap_code(keycode); - wait_ms(TAP_CODE_DELAY); - send_string_with_delay(str, TAP_CODE_DELAY); - wait_ms(TAP_CODE_DELAY); - tap_code(KC_ENTER); - } - if (override) wait_ms(3000); - return false; -} + bool mod_key_press_timer(uint16_t code, uint16_t mod_code, bool pressed) { static uint16_t this_timer; @@ -123,7 +104,7 @@ __attribute__((weak)) void keyboard_post_init_keymap(void) {} void keyboard_post_init_user(void) { -#ifdef RGBLIGHT_ENABLE +#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) keyboard_post_init_rgb(); #endif keyboard_post_init_keymap(); @@ -132,6 +113,8 @@ void keyboard_post_init_user(void) { __attribute__((weak)) void shutdown_keymap(void) {} + void rgb_matrix_update_pwm_buffers(void); + void shutdown_user(void) { #ifdef RGBLIGHT_ENABLE rgblight_enable_noeeprom(); @@ -139,9 +122,9 @@ void shutdown_user(void) { rgblight_setrgb_red(); #endif // RGBLIGHT_ENABLE #ifdef RGB_MATRIX_ENABLE - // uint16_t timer_start = timer_read(); - // rgb_matrix_set_color_all( 0xFF, 0x00, 0x00 ); - // while(timer_elapsed(timer_start) < 250) { wait_ms(1); } + rgb_matrix_set_color_all( 0xFF, 0x00, 0x00 ); + rgb_matrix_update_pwm_buffers(); + #endif // RGB_MATRIX_ENABLE shutdown_keymap(); } @@ -176,7 +159,7 @@ void matrix_scan_user(void) { run_diablo_macro_check(); #endif // TAP_DANCE_ENABLE -#ifdef RGBLIGHT_ENABLE +#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) matrix_scan_rgb(); #endif // RGBLIGHT_ENABLE @@ -190,7 +173,7 @@ layer_state_t layer_state_set_keymap(layer_state_t state) { return state; } // Then runs keymap's layer change check layer_state_t layer_state_set_user(layer_state_t state) { state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); -#ifdef RGBLIGHT_ENABLE +#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) state = layer_state_set_rgb(state); #endif // RGBLIGHT_ENABLE return layer_state_set_keymap(state); @@ -203,7 +186,7 @@ layer_state_t default_layer_state_set_keymap(layer_state_t state) { return state layer_state_t default_layer_state_set_user(layer_state_t state) { state = default_layer_state_set_keymap(state); #if 0 -# ifdef RGBLIGHT_ENABLE +#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) state = default_layer_state_set_rgb(state); # endif // RGBLIGHT_ENABLE #endif |