summaryrefslogtreecommitdiff
path: root/quantum/quantum.c
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2016-07-11 09:14:43 -0400
committerGitHub <noreply@github.com>2016-07-11 09:14:43 -0400
commita998a48673372e409991066d7d2d9ba282f79d59 (patch)
treede032d3cc365f0454bd769c66c57127e744fe8ce /quantum/quantum.c
parent076de6fa7540be1d5ef87a83816a006907539ca0 (diff)
parent5e58e2281ad872048719b2c142169f3e8103af26 (diff)
downloadqmk_firmware-a998a48673372e409991066d7d2d9ba282f79d59.tar.gz
qmk_firmware-a998a48673372e409991066d7d2d9ba282f79d59.zip
Merge pull request #477 from Smilliam/master
Canceling Space Cadet state with opposite shift key
Diffstat (limited to 'quantum/quantum.c')
-rw-r--r--quantum/quantum.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/quantum/quantum.c b/quantum/quantum.c
index 09daa47127..d5b9753b76 100644
--- a/quantum/quantum.c
+++ b/quantum/quantum.c
@@ -212,6 +212,12 @@ bool process_record_quantum(keyrecord_t *record) {
register_mods(MOD_BIT(KC_LSFT));
}
else {
+ #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);
@@ -228,6 +234,12 @@ bool process_record_quantum(keyrecord_t *record) {
register_mods(MOD_BIT(KC_RSFT));
}
else {
+ #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);