Allow Space Cadet state to be canceled by alternate Shift key

Allows you to press RSHIFT to cancel the insertion of a "(" when holding down LSHIFT. Alternatively, allows you to press LSHIFT to cancel the insertion of a ")" when holding down RSHIFT. This change enables you to renege from outputting a character should you press a shift key erroneously.
example_keyboards
Smilliam 8 years ago
parent 94d3159d9d
commit 1412076df6

@ -162,6 +162,10 @@ bool process_record_quantum(keyrecord_t *record) {
register_mods(MOD_BIT(KC_LSFT));
}
else {
if (get_mods() & MOD_BIT(KC_RSFT)) {
shift_interrupted[0] = true;
shift_interrupted[1] = true;
}
if (!shift_interrupted[0]) {
register_code(LSPO_KEY);
unregister_code(LSPO_KEY);
@ -178,6 +182,10 @@ bool process_record_quantum(keyrecord_t *record) {
register_mods(MOD_BIT(KC_RSFT));
}
else {
if (get_mods() & MOD_BIT(KC_LSFT)) {
shift_interrupted[0] = true;
shift_interrupted[1] = true;
}
if (!shift_interrupted[1]) {
register_code(RSPC_KEY);
unregister_code(RSPC_KEY);

Loading…
Cancel
Save