[Jack & Erez] Fixes Space Cadet right shift

This commit is contained in:
Jack & Erez 2016-06-20 22:36:36 -04:00 committed by Erez Zukerman
parent f77df7e356
commit 76076db725
2 changed files with 5 additions and 5 deletions

View File

@ -154,7 +154,7 @@ enum quantum_keycodes {
KC_LSPO, KC_LSPO,
// Right shift, close paren // Right shift, close paren
KC_RSPC, KC_RSPC
}; };
// Ability to use mods in layouts // Ability to use mods in layouts

View File

@ -504,14 +504,14 @@ bool process_record_quantum(keyrecord_t *record) {
case KC_LSPO: { case KC_LSPO: {
if (record->event.pressed) { if (record->event.pressed) {
shift_interrupted[0] = false; shift_interrupted[0] = false;
register_mods(MOD_LSFT); register_mods(MOD_BIT(KC_LSFT));
} }
else { else {
if (!shift_interrupted[0]) { if (!shift_interrupted[0]) {
register_code(LSPO_KEY); register_code(LSPO_KEY);
unregister_code(LSPO_KEY); unregister_code(LSPO_KEY);
} }
unregister_mods(MOD_LSFT); unregister_mods(MOD_BIT(KC_LSFT));
} }
return false; return false;
break; break;
@ -520,14 +520,14 @@ bool process_record_quantum(keyrecord_t *record) {
case KC_RSPC: { case KC_RSPC: {
if (record->event.pressed) { if (record->event.pressed) {
shift_interrupted[1] = false; shift_interrupted[1] = false;
register_mods(MOD_RSFT); register_mods(MOD_BIT(KC_RSFT));
} }
else { else {
if (!shift_interrupted[1]) { if (!shift_interrupted[1]) {
register_code(RSPC_KEY); register_code(RSPC_KEY);
unregister_code(RSPC_KEY); unregister_code(RSPC_KEY);
} }
unregister_mods(MOD_RSFT); unregister_mods(MOD_BIT(KC_RSFT));
} }
return false; return false;
break; break;