forked from mirrors/qmk_firmware
quick fix for space cadet shift
This commit is contained in:
parent
da53f3a529
commit
de52bd5d89
1 changed files with 5 additions and 5 deletions
|
@ -135,7 +135,7 @@ void reset_keyboard(void) {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static bool shift_interrupted[2] = {0, 0};
|
static bool shift_interrupted[2] = {0, 0};
|
||||||
static uint16_t scs_timer = 0;
|
static uint16_t scs_timer[2] = {0, 0};
|
||||||
|
|
||||||
bool process_record_quantum(keyrecord_t *record) {
|
bool process_record_quantum(keyrecord_t *record) {
|
||||||
|
|
||||||
|
@ -395,7 +395,7 @@ 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;
|
||||||
scs_timer = timer_read ();
|
scs_timer[0] = timer_read ();
|
||||||
register_mods(MOD_BIT(KC_LSFT));
|
register_mods(MOD_BIT(KC_LSFT));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -405,7 +405,7 @@ bool process_record_quantum(keyrecord_t *record) {
|
||||||
shift_interrupted[1] = true;
|
shift_interrupted[1] = true;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (!shift_interrupted[0] && timer_elapsed(scs_timer) < TAPPING_TERM) {
|
if (!shift_interrupted[0] && timer_elapsed(scs_timer[0]) < TAPPING_TERM) {
|
||||||
register_code(LSPO_KEY);
|
register_code(LSPO_KEY);
|
||||||
unregister_code(LSPO_KEY);
|
unregister_code(LSPO_KEY);
|
||||||
}
|
}
|
||||||
|
@ -418,7 +418,7 @@ 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;
|
||||||
scs_timer = timer_read ();
|
scs_timer[1] = timer_read ();
|
||||||
register_mods(MOD_BIT(KC_RSFT));
|
register_mods(MOD_BIT(KC_RSFT));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -428,7 +428,7 @@ bool process_record_quantum(keyrecord_t *record) {
|
||||||
shift_interrupted[1] = true;
|
shift_interrupted[1] = true;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (!shift_interrupted[1] && timer_elapsed(scs_timer) < TAPPING_TERM) {
|
if (!shift_interrupted[1] && timer_elapsed(scs_timer[1]) < TAPPING_TERM) {
|
||||||
register_code(RSPC_KEY);
|
register_code(RSPC_KEY);
|
||||||
unregister_code(RSPC_KEY);
|
unregister_code(RSPC_KEY);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue