diff options
Diffstat (limited to 'quantum/quantum.c')
| -rw-r--r-- | quantum/quantum.c | 66 |
1 files changed, 64 insertions, 2 deletions
diff --git a/quantum/quantum.c b/quantum/quantum.c index d8e43a465..d5b9753b7 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c | |||
| @@ -93,16 +93,66 @@ bool process_record_quantum(keyrecord_t *record) { | |||
| 93 | *(uint16_t *)0x0800 = 0x7777; // these two are a-star-specific | 93 | *(uint16_t *)0x0800 = 0x7777; // these two are a-star-specific |
| 94 | #endif | 94 | #endif |
| 95 | bootloader_jump(); | 95 | bootloader_jump(); |
| 96 | return false; | ||
| 97 | } | 96 | } |
| 97 | return false; | ||
| 98 | break; | 98 | break; |
| 99 | case DEBUG: | 99 | case DEBUG: |
| 100 | if (record->event.pressed) { | 100 | if (record->event.pressed) { |
| 101 | print("\nDEBUG: enabled.\n"); | 101 | print("\nDEBUG: enabled.\n"); |
| 102 | debug_enable = true; | 102 | debug_enable = true; |
| 103 | return false; | ||
| 104 | } | 103 | } |
| 104 | return false; | ||
| 105 | break; | ||
| 106 | #ifdef RGBLIGHT_ENABLE | ||
| 107 | case RGB_TOG: | ||
| 108 | if (record->event.pressed) { | ||
| 109 | rgblight_toggle(); | ||
| 110 | } | ||
| 111 | return false; | ||
| 112 | break; | ||
| 113 | case RGB_MOD: | ||
| 114 | if (record->event.pressed) { | ||
| 115 | rgblight_step(); | ||
| 116 | } | ||
| 117 | return false; | ||
| 105 | break; | 118 | break; |
| 119 | case RGB_HUI: | ||
| 120 | if (record->event.pressed) { | ||
| 121 | rgblight_increase_hue(); | ||
| 122 | } | ||
| 123 | return false; | ||
| 124 | break; | ||
| 125 | case RGB_HUD: | ||
| 126 | if (record->event.pressed) { | ||
| 127 | rgblight_decrease_hue(); | ||
| 128 | } | ||
| 129 | return false; | ||
| 130 | break; | ||
| 131 | case RGB_SAI: | ||
| 132 | if (record->event.pressed) { | ||
| 133 | rgblight_increase_sat(); | ||
| 134 | } | ||
| 135 | return false; | ||
| 136 | break; | ||
| 137 | case RGB_SAD: | ||
| 138 | if (record->event.pressed) { | ||
| 139 | rgblight_decrease_sat(); | ||
| 140 | } | ||
| 141 | return false; | ||
| 142 | break; | ||
| 143 | case RGB_VAI: | ||
| 144 | if (record->event.pressed) { | ||
| 145 | rgblight_increase_val(); | ||
| 146 | } | ||
| 147 | return false; | ||
| 148 | break; | ||
| 149 | case RGB_VAD: | ||
| 150 | if (record->event.pressed) { | ||
| 151 | rgblight_decrease_val(); | ||
| 152 | } | ||
| 153 | return false; | ||
| 154 | break; | ||
| 155 | #endif | ||
| 106 | case MAGIC_SWAP_CONTROL_CAPSLOCK ... MAGIC_UNSWAP_ALT_GUI: | 156 | case MAGIC_SWAP_CONTROL_CAPSLOCK ... MAGIC_UNSWAP_ALT_GUI: |
| 107 | if (record->event.pressed) { | 157 | if (record->event.pressed) { |
| 108 | // MAGIC actions (BOOTMAGIC without the boot) | 158 | // MAGIC actions (BOOTMAGIC without the boot) |
| @@ -162,6 +212,12 @@ bool process_record_quantum(keyrecord_t *record) { | |||
| 162 | register_mods(MOD_BIT(KC_LSFT)); | 212 | register_mods(MOD_BIT(KC_LSFT)); |
| 163 | } | 213 | } |
| 164 | else { | 214 | else { |
| 215 | #ifdef DISABLE_SPACE_CADET_ROLLOVER | ||
| 216 | if (get_mods() & MOD_BIT(KC_RSFT)) { | ||
| 217 | shift_interrupted[0] = true; | ||
| 218 | shift_interrupted[1] = true; | ||
| 219 | } | ||
| 220 | #endif | ||
| 165 | if (!shift_interrupted[0]) { | 221 | if (!shift_interrupted[0]) { |
| 166 | register_code(LSPO_KEY); | 222 | register_code(LSPO_KEY); |
| 167 | unregister_code(LSPO_KEY); | 223 | unregister_code(LSPO_KEY); |
| @@ -178,6 +234,12 @@ bool process_record_quantum(keyrecord_t *record) { | |||
| 178 | register_mods(MOD_BIT(KC_RSFT)); | 234 | register_mods(MOD_BIT(KC_RSFT)); |
| 179 | } | 235 | } |
| 180 | else { | 236 | else { |
| 237 | #ifdef DISABLE_SPACE_CADET_ROLLOVER | ||
| 238 | if (get_mods() & MOD_BIT(KC_LSFT)) { | ||
| 239 | shift_interrupted[0] = true; | ||
| 240 | shift_interrupted[1] = true; | ||
| 241 | } | ||
| 242 | #endif | ||
| 181 | if (!shift_interrupted[1]) { | 243 | if (!shift_interrupted[1]) { |
| 182 | register_code(RSPC_KEY); | 244 | register_code(RSPC_KEY); |
| 183 | unregister_code(RSPC_KEY); | 245 | unregister_code(RSPC_KEY); |
