1
0
Fork 0

Made rollover behavior for space cadet optional

This commit is contained in:
Smilliam 2016-07-10 19:04:01 -07:00
parent 6b0c9cc905
commit b12fe6abb2
4 changed files with 26 additions and 10 deletions

View file

@ -162,10 +162,12 @@ 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;
}
#ifdef DISABLE_SPACE_CADET_ROLLOVER
if (get_mods() & MOD_BIT(KC_RSFT)) {
shift_interrupted[0] = true;
shift_interrupted[1] = true;
}
#endif
if (!shift_interrupted[0]) {
register_code(LSPO_KEY);
unregister_code(LSPO_KEY);
@ -182,10 +184,12 @@ 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;
}
#ifdef DISABLE_SPACE_CADET_ROLLOVER
if (get_mods() & MOD_BIT(KC_LSFT)) {
shift_interrupted[0] = true;
shift_interrupted[1] = true;
}
#endif
if (!shift_interrupted[1]) {
register_code(RSPC_KEY);
unregister_code(RSPC_KEY);