aboutsummaryrefslogtreecommitdiff
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
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
-rw-r--r--keyboards/kc60/Makefile2
-rw-r--r--quantum/quantum.c12
-rw-r--r--readme.md6
3 files changed, 19 insertions, 1 deletions
diff --git a/keyboards/kc60/Makefile b/keyboards/kc60/Makefile
index 9717b519c..b00a488b9 100644
--- a/keyboards/kc60/Makefile
+++ b/keyboards/kc60/Makefile
@@ -53,7 +53,7 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096
53# Build Options 53# Build Options
54# change yes to no to disable 54# change yes to no to disable
55# 55#
56BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) 56BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
57MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) 57MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
58EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) 58EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
59CONSOLE_ENABLE ?= yes # Console for debug(+400) 59CONSOLE_ENABLE ?= yes # Console for debug(+400)
diff --git a/quantum/quantum.c b/quantum/quantum.c
index 09daa4712..d5b9753b7 100644
--- a/quantum/quantum.c
+++ b/quantum/quantum.c
@@ -212,6 +212,12 @@ bool process_record_quantum(keyrecord_t *record) {
212 register_mods(MOD_BIT(KC_LSFT)); 212 register_mods(MOD_BIT(KC_LSFT));
213 } 213 }
214 else { 214 else {
215 #ifdef DISABLE_SPACE_CADET_ROLLOVER
216 if (get_mods() & MOD_BIT(KC_RSFT)) {
217 shift_interrupted[0] = true;
218 shift_interrupted[1] = true;
219 }
220 #endif
215 if (!shift_interrupted[0]) { 221 if (!shift_interrupted[0]) {
216 register_code(LSPO_KEY); 222 register_code(LSPO_KEY);
217 unregister_code(LSPO_KEY); 223 unregister_code(LSPO_KEY);
@@ -228,6 +234,12 @@ bool process_record_quantum(keyrecord_t *record) {
228 register_mods(MOD_BIT(KC_RSFT)); 234 register_mods(MOD_BIT(KC_RSFT));
229 } 235 }
230 else { 236 else {
237 #ifdef DISABLE_SPACE_CADET_ROLLOVER
238 if (get_mods() & MOD_BIT(KC_LSFT)) {
239 shift_interrupted[0] = true;
240 shift_interrupted[1] = true;
241 }
242 #endif
231 if (!shift_interrupted[1]) { 243 if (!shift_interrupted[1]) {
232 register_code(RSPC_KEY); 244 register_code(RSPC_KEY);
233 unregister_code(RSPC_KEY); 245 unregister_code(RSPC_KEY);
diff --git a/readme.md b/readme.md
index 7f7a55c82..e0dcd5608 100644
--- a/readme.md
+++ b/readme.md
@@ -306,6 +306,12 @@ It's defaulted to work on US keyboards, but if your layout uses different keys f
306 #define LSPO_KEY KC_9 306 #define LSPO_KEY KC_9
307 #define RSPC_KEY KC_0 307 #define RSPC_KEY KC_0
308 308
309You can also choose between different rollover behaviors of the shift keys by defining:
310
311 #define DISABLE_SPACE_CADET_ROLLOVER
312
313in your `config.h`. Disabling rollover allows you to use the opposite shift key to cancel the space cadet state in the event of an erroneous press instead of emitting a pair of parentheses when the keys are released.
314
309The only other thing you're going to want to do is create a `Makefile` in your keymap directory and set the following: 315The only other thing you're going to want to do is create a `Makefile` in your keymap directory and set the following:
310 316
311``` 317```