summaryrefslogtreecommitdiff
path: root/users/drashna/process_records.c
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2019-09-07 08:57:30 -0700
committerGitHub <noreply@github.com>2019-09-07 08:57:30 -0700
commite88f80a891138d40acddcdd2b3dface8b2a57404 (patch)
tree1fa1e8cd0bd15d10970ce55efceaffcddaf01160 /users/drashna/process_records.c
parent79a6c6eda50671b28f32dfb73728fcc1671fe4fc (diff)
[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/process_records.c')
-rw-r--r--users/drashna/process_records.c63
1 files changed, 12 insertions, 51 deletions
diff --git a/users/drashna/process_records.c b/users/drashna/process_records.c
index 5666d052dc..6eb21d2f27 100644
--- a/users/drashna/process_records.c
+++ b/users/drashna/process_records.c
@@ -21,16 +21,23 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#endif // KEYLOGGER_ENABLE
switch (keycode) {
- case KC_QWERTY ... KC_CARPLAX:
+ case KC_QWERTY ... KC_WORKMAN:
if (record->event.pressed) {
- set_single_persistent_default_layer(keycode - KC_QWERTY);
+ uint8_t mods = mod_config(get_mods()|get_oneshot_mods());
+ if (!mods) {
+ set_single_persistent_default_layer(keycode - KC_QWERTY);
+ } else if (mods & MOD_MASK_SHIFT) {
+ set_single_persistent_default_layer(keycode - KC_QWERTY + 4);
+ } else if (mods & MOD_MASK_CTRL) {
+ set_single_persistent_default_layer(keycode - KC_QWERTY + 8);
+ }
}
break;
case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader
if (!record->event.pressed) {
- uint8_t temp_mod = get_mods();
- uint8_t temp_osm = get_oneshot_mods();
+ uint8_t temp_mod = mod_config(get_mods());
+ uint8_t temp_osm = mod_config(get_oneshot_mods());
clear_mods();
clear_oneshot_mods();
send_string_with_delay_P(PSTR("make " QMK_KEYBOARD ":" QMK_KEYMAP), TAP_CODE_DELAY);
@@ -38,15 +45,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if ((temp_mod | temp_osm) & MOD_MASK_SHIFT)
#endif
{
-#if defined(__arm__)
- send_string_with_delay_P(PSTR(":dfu-util"), TAP_CODE_DELAY);
-#elif defined(BOOTLOADER_DFU)
- send_string_with_delay_P(PSTR(":dfu"), TAP_CODE_DELAY);
-#elif defined(BOOTLOADER_HALFKAY)
- send_string_with_delay_P(PSTR(":teensy"), TAP_CODE_DELAY);
-#elif defined(BOOTLOADER_CATERINA)
- send_string_with_delay_P(PSTR(":avrdude"), TAP_CODE_DELAY);
-#endif // bootloader options
+ send_string_with_delay_P(PSTR(":flash"), TAP_CODE_DELAY);
}
if ((temp_mod | temp_osm) & MOD_MASK_CTRL) {
send_string_with_delay_P(PSTR(" -j8 --output-sync"), TAP_CODE_DELAY);
@@ -68,44 +67,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
break;
- // These are a serious of gaming macros.
- // Only enables for the viterbi, basically,
- // to save on firmware space, since it's limited.
-#ifdef MACROS_ENABLED
- case KC_OVERWATCH: // Toggle's if we hit "ENTER" or "BACKSPACE" to input macros
- if (record->event.pressed) {
- userspace_config.is_overwatch ^= 1;
- eeconfig_update_user(userspace_config.raw);
- }
-# ifdef RGBLIGHT_ENABLE
- userspace_config.is_overwatch ? rgblight_mode_noeeprom(17) : rgblight_mode_noeeprom(18);
-# endif // RGBLIGHT_ENABLE
- break;
- case KC_SALT:
- return send_game_macro("Salt, salt, salt...", record, false);
- case KC_MORESALT:
- return send_game_macro("Please sir, can I have some more salt?!", record, false);
- case KC_SALTHARD:
- return send_game_macro("Your salt only makes me harder, and even more aggressive!", record, false);
- case KC_GOODGAME:
- return send_game_macro("Good game, everyone!", record, false);
- case KC_GLHF:
- return send_game_macro("Good luck, have fun!!!", record, false);
- case KC_SYMM:
- return send_game_macro("Left click to win!", record, false);
- case KC_JUSTGAME:
- return send_game_macro("It may be a game, but if you don't want to actually try, please go play AI, so that people that actually want to take the game seriously and \"get good\" have a place to do so without trolls like you throwing games.", record, false);
- case KC_TORB:
- return send_game_macro("That was positively riveting!", record, false);
- case KC_AIM:
- send_game_macro("That aim is absolutely amazing. It's almost like you're a machine!", record, true);
- return send_game_macro("Wait! That aim is TOO good! You're clearly using an aim hack! CHEATER!", record, false);
- case KC_C9:
- return send_game_macro("OMG!!! C9!!!", record, false);
- case KC_GGEZ:
- return send_game_macro("That was a fantastic game, though it was a bit easy. Try harder next time!", record, false);
-#endif // MACROS_ENABLED
-
case KC_DIABLO_CLEAR: // reset all Diablo timers, disabling them
#ifdef TAP_DANCE_ENABLE
if (record->event.pressed) {