- case KC_LSPO: {
- if (record->event.pressed) {
- shift_interrupted[0] = false;
- scs_timer[0] = timer_read ();
- register_mods(MOD_BIT(KC_LSFT));
- }
- else {
- #ifdef DISABLE_SPACE_CADET_ROLLOVER
- if (get_mods() & MOD_BIT(RSPC_MOD)) {
- shift_interrupted[0] = true;
- shift_interrupted[1] = true;
- }
- #endif
- if (!shift_interrupted[0] && timer_elapsed(scs_timer[0]) < TAPPING_TERM) {
- #ifdef DISABLE_SPACE_CADET_MODIFIER
- unregister_mods(MOD_BIT(KC_LSFT));
- #else
- if( LSPO_MOD != KC_LSFT ){
- unregister_mods(MOD_BIT(KC_LSFT));
- register_mods(MOD_BIT(LSPO_MOD));
- }
- #endif
- register_code(LSPO_KEY);
- unregister_code(LSPO_KEY);
- #ifndef DISABLE_SPACE_CADET_MODIFIER
- if( LSPO_MOD != KC_LSFT ){
- unregister_mods(MOD_BIT(LSPO_MOD));
- }
- #endif
- }
- unregister_mods(MOD_BIT(KC_LSFT));
- }
- return false;
- }
-
- case KC_RSPC: {
- if (record->event.pressed) {
- shift_interrupted[1] = false;
- scs_timer[1] = timer_read ();
- register_mods(MOD_BIT(KC_RSFT));
- }
- else {
- #ifdef DISABLE_SPACE_CADET_ROLLOVER
- if (get_mods() & MOD_BIT(LSPO_MOD)) {
- shift_interrupted[0] = true;
- shift_interrupted[1] = true;
- }
- #endif
- if (!shift_interrupted[1] && timer_elapsed(scs_timer[1]) < TAPPING_TERM) {
- #ifdef DISABLE_SPACE_CADET_MODIFIER
- unregister_mods(MOD_BIT(KC_RSFT));
- #else
- if( RSPC_MOD != KC_RSFT ){
- unregister_mods(MOD_BIT(KC_RSFT));
- register_mods(MOD_BIT(RSPC_MOD));
- }
- #endif
- register_code(RSPC_KEY);
- unregister_code(RSPC_KEY);
- #ifndef DISABLE_SPACE_CADET_MODIFIER
- if ( RSPC_MOD != KC_RSFT ){
- unregister_mods(MOD_BIT(RSPC_MOD));
- }
- #endif
- }
- unregister_mods(MOD_BIT(KC_RSFT));
- }
- return false;
- }
-
- case KC_SFTENT: {
- if (record->event.pressed) {
- shift_interrupted[1] = false;
- scs_timer[1] = timer_read ();
- register_mods(MOD_BIT(KC_RSFT));
- }
- else if (!shift_interrupted[1] && timer_elapsed(scs_timer[1]) < TAPPING_TERM) {
- unregister_mods(MOD_BIT(KC_RSFT));
- register_code(SFTENT_KEY);
- unregister_code(SFTENT_KEY);
- }
- else {
- unregister_mods(MOD_BIT(KC_RSFT));
- }
- return false;
- }