qmk / qmk_firmware

Open-source keyboard firmware for Atmel AVR and Arm USB families
https://qmk.fm
GNU General Public License v2.0
17.81k stars 38.16k forks source link

Curious about a method of improving the Space Cadet Shift. #819

Closed h-parks closed 6 years ago

h-parks commented 7 years ago

You'll have to excuse my novice coding abilities in asking this question. This is the first project I have ever worked on via github.

I really like the idea of the Space Cadet Shift and I've noticed that there might be a way to improve it via the present capabilities of QMK, even if it is beyond my own abilities to implement it.

Is there a way in which we can limit the action of the space cadet shift parenthesis function, so as not to register that function if the shift key is held down for a longer period of time than a simple tap of the key?

There are times where I'll be writing and I'll pause to hold down the shift key, thinking I'm about to write a capital letter, but then I'll reconsider and let the key go, which leads to an unwanted parenthesis appearing. Users adapting to a new OLKB or ergonomic keyboard may also appreciate limiting the milliseconds in which this function remains active, due to the higher frequency of typing errors as a new QMK user switches from their old keyboards.

Thank you for considering such a feature.

PureSpider commented 7 years ago

You can easily do this by defining your own keymap. Disable space cadet mode and instead use MT(MOD_LSFT, KC_LPRN) and MT(MOD_LSFT, KC_RPRN) for the left and right shift keys, respectively - assuming you're using an US layout; you'd have to adjust the second value accordingly if not. I did this in my own keymap: https://github.com/PureSpider/qmk_firmware/blob/master/keyboards/tada68/keymaps/purespider/keymap.c#L15 For more information see here: https://github.com/jackhumbert/qmk_firmware/blob/master/readme.md#fun-with-modifier-keys

Edit: might not work with shifted characters after all, see https://github.com/jackhumbert/qmk_firmware/issues/642#issuecomment-240166767 for an alternative