-
-
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
Improvement of Space Cadet Shift by preventing to automatically apply… #3856
Changes from 2 commits
34a708f
afc189a
5c6f7b6
64a67a8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -177,6 +177,13 @@ void reset_keyboard(void) { | |
#define RSPC_KEY KC_0 | ||
#endif | ||
|
||
#ifndef LSPO_MOD | ||
#define LSPO_MOD KC_LSFT | ||
#endif | ||
#ifndef RSPC_MOD | ||
#define RSPC_MOD KC_RSFT | ||
#endif | ||
|
||
// Shift / Enter setup | ||
#ifndef SFTENT_KEY | ||
#define SFTENT_KEY KC_ENT | ||
|
@@ -627,14 +634,27 @@ bool process_record_quantum(keyrecord_t *record) { | |
} | ||
else { | ||
#ifdef DISABLE_SPACE_CADET_ROLLOVER | ||
if (get_mods() & MOD_BIT(KC_RSFT)) { | ||
if (get_mods() & MOD_BIT(RSPC_MOD)) { | ||
drashna marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Have you tested this with DISABLE_SPACE_CADET_ROLLOVER on? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And yes as well 😄 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The question was repeated accidentally, not to emphasize it ;-). |
||
shift_interrupted[0] = true; | ||
shift_interrupted[1] = true; | ||
} | ||
#endif | ||
if (!shift_interrupted[0] && timer_elapsed(scs_timer[0]) < TAPPING_TERM) { | ||
#ifdef DISABLE_SPACE_CADET_MODIFIER | ||
unregister_mods(MOD_BIT(KC_LSFT)); | ||
#else | ||
#if LSPO_MOD != KC_LSFT | ||
drashna marked this conversation as resolved.
Show resolved
Hide resolved
|
||
unregister_mods(MOD_BIT(KC_LSFT)); | ||
register_mods(MOD_BIT(LSPO_MOD)); | ||
#endif | ||
#endif | ||
register_code(LSPO_KEY); | ||
unregister_code(LSPO_KEY); | ||
#ifndef DISABLE_SPACE_CADET_MODIFIER | ||
#if LSPO_MOD != KC_LSFT | ||
drashna marked this conversation as resolved.
Show resolved
Hide resolved
|
||
unregister_mods(MOD_BIT(LSPO_MOD)); | ||
#endif | ||
#endif | ||
} | ||
unregister_mods(MOD_BIT(KC_LSFT)); | ||
} | ||
|
@@ -649,14 +669,27 @@ bool process_record_quantum(keyrecord_t *record) { | |
} | ||
else { | ||
#ifdef DISABLE_SPACE_CADET_ROLLOVER | ||
if (get_mods() & MOD_BIT(KC_LSFT)) { | ||
if (get_mods() & MOD_BIT(LSPO_MOD)) { | ||
shift_interrupted[0] = true; | ||
shift_interrupted[1] = true; | ||
} | ||
#endif | ||
if (!shift_interrupted[1] && timer_elapsed(scs_timer[1]) < TAPPING_TERM) { | ||
#ifdef DISABLE_SPACE_CADET_MODIFIER | ||
unregister_mods(MOD_BIT(KC_RSFT)); | ||
#else | ||
#if RSPC_MOD != KC_RSFT | ||
drashna marked this conversation as resolved.
Show resolved
Hide resolved
|
||
unregister_mods(MOD_BIT(KC_RSFT)); | ||
register_mods(MOD_BIT(RSPC_MOD)); | ||
#endif | ||
#endif | ||
register_code(RSPC_KEY); | ||
unregister_code(RSPC_KEY); | ||
#ifndef DISABLE_SPACE_CADET_MODIFIER | ||
#if RSPC_MOD != KC_RSFT | ||
drashna marked this conversation as resolved.
Show resolved
Hide resolved
|
||
unregister_mods(MOD_BIT(RSPC_MOD)); | ||
#endif | ||
#endif | ||
} | ||
unregister_mods(MOD_BIT(KC_RSFT)); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to have corresponding options (DISABLE_LSPO_MOD, DISABLE_LSPC_MOD) for both sides? I am not sure if this is necessary for any language if your goal is to have matching pairs of parentheses or brackets on the left and right shift key.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's not needed. But it can be changed later if required.