]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Made rollover behavior for space cadet optional
authorSmilliam <smilliam@gmail.com>
Mon, 11 Jul 2016 02:04:01 +0000 (19:04 -0700)
committerSmilliam <smilliam@gmail.com>
Mon, 11 Jul 2016 02:04:01 +0000 (19:04 -0700)
keyboards/kc60/Makefile
keyboards/kc60/config.h
quantum/quantum.c
readme.md

index 9717b519c8f28a858ff59b6fa8ab4d8783d37e79..855e81b1cc1ae3e1e256aeecb6e971d85b4a5861 100644 (file)
@@ -53,11 +53,11 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096
 # Build Options
 #   change yes to no to disable
 #
-BOOTMAGIC_ENABLE ?= yes      # Virtual DIP switch configuration(+1000)
+BOOTMAGIC_ENABLE ?= no       # Virtual DIP switch configuration(+1000)
 MOUSEKEY_ENABLE ?= yes       # Mouse keys(+4700)
 EXTRAKEY_ENABLE ?= yes       # Audio control and System control(+450)
 CONSOLE_ENABLE ?= yes        # Console for debug(+400)
-COMMAND_ENABLE ?= yes        # Commands for debug and configuration
+COMMAND_ENABLE ?= no         # Commands for debug and configuration
 KEYBOARD_LOCK_ENABLE ?= yes  # Allow locking of keyboard via magic key
 # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
 SLEEP_LED_ENABLE ?= no       # Breathing sleep LED during USB suspend
index c4a9b9ff82de09de25d5d22051c0f82a5c5de303..a315f688fcbb21de2fc085800d6eb7b1d9dcac75 100644 (file)
@@ -107,6 +107,12 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
     keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
 )
 
+/* Prevent stuck modifiers when switching between FN layers */
+#define PREVENT_STUCK_MODIFIERS
+
+/* Enable opposite shift key to cancel space cadet state */
+#define DISABLE_SPACE_CADET_ROLLOVER
+
 /* control how magic key switches layers */
 //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS  true
 //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS  true
index 71c3c723ba277388254f754834985980c5a75390..d91b8f2d0670e17ba24b688a8968d1f1cb3c16e5 100644 (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);
index c24d951d8df63833e4344261885abc0d85342504..cc36a34ffa9b54b8198b3dfcdfd96bb67e10e803 100644 (file)
--- a/readme.md
+++ b/readme.md
@@ -309,6 +309,12 @@ It's defaulted to work on US keyboards, but if your layout uses different keys f
     #define LSPO_KEY KC_9
     #define RSPC_KEY KC_0
 
+You can also choose between different rollover behaviors of the shift keys by defining:
+
+    #define DISABLE_SPACE_CADET_ROLLOVER
+
+in 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.
+
 The only other thing you're going to want to do is create a `Makefile` in your keymap directory and set the following:
 
 ```