-
-
Notifications
You must be signed in to change notification settings - Fork 40.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Redefining LSPO_KEY with shifted key #3815
Comments
The trouble seems to be that you have to hold shift to get a 5 on the belgian keyboard, is this right? One solution would be to define your own tap dance. |
You're probably right. I assume that this is the piece of code which is handling it:
I'm quite new to QMK and I'm a little bit rusty in C but I assume that I could add a flag like DISABLE_SPACE_CADET_AUTOSHIFT and modify a little the code like this:
So we would have something like this ? It's working fine for me. I will submit a PR if it's ok for you. |
Sounds reasonable, but my experience with QMK is probably as limited at yours.
|
You're right, it would be nice to be a bit more flexible and allow users to choose a different modifier, but I'm not a fan of setting the LSPO_MOD to 0 in order to disable the modifier. My suggestion is to create both LSPO_MOD and RSPC_MOD, having both a default value of KC_LSFT, which could be overriden to whatever the user likes. And then, I guess we could undefine LSPO_MOD/RSPC_MOD in the config.h of the keyboard to remove that default modifier, and check in quantum.c if they are defined in order to register them or not. But what is the right place for defining the default LSPO_MOD and RSPC_MOD ? |
I assume they could be defined next to LSPO_KEY and RSPC_KEY like that.
And then, it could be handled like this ? What do you think ?
But undefining LSPO_MOD in my config.h seems to have no effect. |
… a modifier on the key and allow to override the default modifier. Closes qmk#3815
I agree with you regarding setting LSPO_MOD to 0, but I prefer to limit the use of preprocessor directives to a few controlled places. But, judging from the QMK code that I know, I don't think that this is a design goal of QMK ;-). |
Yes, there is an extensive usage of preprocessor directives, I have the feeling that it's for reducing the compiled code to the minimum required, as the firmware is installed on keyboards with limited space. But my usual language is Java so ... not sure 😄 |
* Improvement of Space Cadet Shift by preventing to automatically apply a modifier on the key and allow to override the default modifier. Closes #3815 * Improve the use of the DISABLE_SPACE_CADET_MODIFIER flag to avoid unregistering KC_LSFT when equals to LSPO_MOD * change #if to if statement
* Improvement of Space Cadet Shift by preventing to automatically apply a modifier on the key and allow to override the default modifier. Closes qmk#3815 * Improve the use of the DISABLE_SPACE_CADET_MODIFIER flag to avoid unregistering KC_LSFT when equals to LSPO_MOD * change #if to if statement
* Improvement of Space Cadet Shift by preventing to automatically apply a modifier on the key and allow to override the default modifier. Closes qmk#3815 * Improve the use of the DISABLE_SPACE_CADET_MODIFIER flag to avoid unregistering KC_LSFT when equals to LSPO_MOD * change #if to if statement
I'm trying the add the space cadet shift to my keyboard layout, but as my computer is set to use a belgian layout, the default keycode of LSPO_KEY gives a '9'.
To make it work on a belgian layout, I'm using the keymap-belgian.h, and in my layout, I'm using this key:
#define BE_LPRN KC_5
When I use it in my layout, it prints the left parenthesis, as I expect.
If I do the following definition in config.h, KC_LSPO prints 5.
#define LSPO_KEY KC_5
So I tried this one:
#define LSPO_KEY LSFT(KC_5)
But it gives me the following compilation error.
Why do I have this strange behavior and how can I fix it ?
The text was updated successfully, but these errors were encountered: