Steve Losh described the Space Cadet Shift 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, and now even cooler supporting Control and Alt as well!
Firstly, in your keymap, do one of the following:
Replace the Left Shift key with
KC_LSPO (Left Shift, Parenthesis Open), and Right Shift with
KC_RSPC (Right Shift, Parenthesis Close).
Replace the Left Control key with
KC_LCPO (Left Control, Parenthesis Open), and Right Control with
KC_RCPC (Right Control, Parenthesis Close).
Replace the Left Alt key with
KC_LAPO (Left Alt, Parenthesis Open), and Right Alt with
KC_RAPC (Right Alt, Parenthesis Close).
Replace any Shift key in your keymap with
KC_SFTENT (Right Shift, Enter).
Left Shift when held,
Right Shift when held,
Left Control when held,
Right Control when held,
Left Alt when held,
Right Alt when held,
Right Shift when held, Enter when tapped
Space Cadet's functionality can conflict with the default Command functionality when both Shift keys are held at the same time. See the Command feature for info on how to change it, or make sure that Command is disabled in your
COMMAND_ENABLE = no
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. In addition, you can redefine the modifier to send on tap, or even send no modifier at all. The new configuration defines bundle all options up into a single define of 3 key codes in this order: the
Modifier when held or when used with other keys, the
Tap Modifer sent when tapped (no modifier if
KC_TRNS), finally the
Keycode sent when tapped. Now keep in mind, mods from other keys will still apply to the
Keycode if say
KC_RSFT is held while tapping
KC_LSPO key with
KC_TRNS as the
Store current modifiers before the hold mod is pressed and use them with the tap mod and keycode. Useful for when you frequently release a modifier before triggering Space Cadet.
These defines are used in the above defines internally to support backwards compatibility, so you may continue to use them, however the above defines open up a larger range of flexibility than before. As an example, say you want to not send any modifier when you tap just
KC_LSPO, with the old defines you had an all or nothing choice of using the
DISABLE_SPACE_CADET_MODIFIER define. Now you can define that key as:
#define LSPO_KEYS KC_LSFT, KC_TRNS, KC_9. This tells the system to set Left Shift if held or used with other keys, then on tap send no modifier (transparent) with the
The keycode to send when Left Shift is tapped
The keycode to send when Right Shift is tapped
The modifier to apply to
The modifier to apply to
The keycode to send when the Shift key is tapped
If defined, prevent the Space Cadet from applying a modifier