]> git.donarmstrong.com Git - qmk_firmware.git/blob - docs/feature_space_cadet_shift.md
Features/ws2812 matrix driver (#5418)
[qmk_firmware.git] / docs / feature_space_cadet_shift.md
1 # Space Cadet Shift: The Future, Built In
2
3 Steve Losh described the [Space Cadet Shift](http://stevelosh.com/blog/2012/10/a-modern-space-cadet/) quite well. Essentially, when you tap Left Shift on its own, you get an opening parenthesis; tap Right Shift on its own and you get the closing one. When held, the Shift keys function as normal. Yes, it's as cool as it sounds.
4
5 ## Usage
6
7 Replace the Left Shift key in your keymap with `KC_LSPO` (Left Shift, Parenthesis Open), and Right Shift with `KC_RSPC` (Right Shift, Parenthesis Close).
8
9 ## Keycodes
10
11 |Keycode  |Description                           |
12 |---------|--------------------------------------|
13 |`KC_LSPO`|Left Shift when held, `(` when tapped |
14 |`KC_RSPC`|Right Shift when held, `)` when tapped|
15
16 ## Caveats
17
18 Space Cadet's functionality can conflict with the default Command functionality when both Shift keys are held at the same time. Make sure that Command is disabled in your `rules.mk` with:
19
20 ```make
21 COMMAND_ENABLE = no
22 ```
23
24 ## Configuration
25
26 By default Space Cadet assumes a US ANSI layout, but if your layout uses different keys for parentheses, you can redefine them in your `config.h`.
27 You can also disable the rollover, allowing 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.
28 Also, by default, the Space Cadet applies modifiers LSPO_MOD and RSPC_MOD to keys defined by LSPO_KEY and RSPC_KEY. You can override this behavior by redefining those variables in your `config.h`. You can also prevent the Space Cadet to apply a modifier by defining DISABLE_SPACE_CADET_MODIFIER in your `config.h`.
29
30 |Define                        |Default      |Description                                                                     |
31 |------------------------------|-------------|--------------------------------------------------------------------------------|
32 |`LSPO_KEY`                    |`KC_9`       |The keycode to send when Left Shift is tapped                                   |
33 |`RSPC_KEY`                    |`KC_0`       |The keycode to send when Right Shift is tapped                                  |
34 |`LSPO_MOD`                    |`KC_LSFT`    |The keycode to send when Left Shift is tapped                                   |
35 |`RSPC_MOD`                    |`KC_RSFT`    |The keycode to send when Right Shift is tapped                                  |
36 |`DISABLE_SPACE_CADET_ROLLOVER`|*Not defined*|If defined, use the opposite Shift key to cancel Space Cadet                    |
37 |`DISABLE_SPACE_CADET_MODIFIER`|*Not defined*|If defined, prevent the Space Cadet to apply a modifier to LSPO_KEY and RSPC_KEY|