Disabling Achordion for regular SHIFT key #47
Replies: 3 comments
-
I was able to fix the issue by using such static bool is_shifted = false;
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (keycode == KC_LEFT_SHIFT) { is_shifted = record->event.pressed; }
else if (is_shifted) {
if (keycode == LCTL_T(KC_D)) {
if (record->event.pressed) { tap_code(KC_D); }
return false;
}
}
return process_achordion(keycode, record);
} But that is not satisfactory because that prevents using ctrl with shifted keys like <. |
Beta Was this translation helpful? Give feedback.
-
At last, I think I found a solution! To recap, my issue was that when holding a dedicated shift key (KC_LEFT_SHIFT), then tapping a mod-tap key required to release the mod-tap key before the shift to produce the upper case letter, otherwise it was either sent as lowercase, or not sent at all. Thanks to the
However this is not enough because that still prevents using shifted modifiers such as alt-<. diff --git a/features/achordion.c b/features/achordion.c
index 3356082..f632895 100644
--- a/features/achordion.c
+++ b/features/achordion.c
@@ -151,7 +151,7 @@ bool process_achordion(uint16_t keycode, keyrecord_t* record) {
// events back into the handling pipeline so that QMK features and other
// user code can see them. This is done by calling `process_record()`, which
// in turn calls most handlers including `process_record_user()`.
- if (!is_key_event || (is_tap_hold && record->tap.count == 0) ||
+ if (!is_key_event || keycode == KC_LEFT_SHIFT || (is_tap_hold && record->tap.count == 0) ||
achordion_chord(tap_hold_keycode, &tap_hold_record, keycode, record)) {
dprintln("Achordion: Plumbing hold press.");
settle_as_hold(); With the above patch, pressing shift after the modifiers works as expected. Perhaps that should be the default behavior? Anyway, thank you very much for making Achordion and custom_shift_keys, it's really neat :) |
Beta Was this translation helpful? Give feedback.
-
A similar issue is also happening when the mod-tap key is a layer tap (LT), and the following patch to custom_shift_keys fixed the issue: diff --git a/features/custom_shift_keys.c b/features/custom_shift_keys.c
index 728e53e..a947a13 100644
--- a/features/custom_shift_keys.c
+++ b/features/custom_shift_keys.c
@@ -40,11 +40,11 @@ bool process_custom_shift_keys(uint16_t keycode, keyrecord_t *record) {
#else
if ((mods | get_weak_mods()) & MOD_MASK_SHIFT) { // Shift is held.
#endif // NO_ACTION_ONESHOT
- // Continue default handling if this is a tap-hold key being held.
- if ((IS_QK_MOD_TAP(keycode) || IS_QK_LAYER_TAP(keycode)) &&
- record->tap.count == 0) {
- return true;
- }
+ // Skip mod-tap handling because my shift key is standalone.
+ // if ((IS_QK_MOD_TAP(keycode) || IS_QK_LAYER_TAP(keycode)) &&
+ // record->tap.count == 0) {
+ // return true;
+ // }
// Search for a custom shift key whose keycode is `keycode`.
for (int i = 0; i < NUM_CUSTOM_SHIFT_KEYS; ++i) { Hope that's useful :) |
Beta Was this translation helpful? Give feedback.
-
Hello,
I'm using Achordion for ctrl on d. That works like a charm, thanks, however it seems like this is also affecting the shift key which is on a regular dedicated key. The following sequence doesn't produce the desired
D
:I tried adding these overrides, but that doesn't make the above sequence works:
and/or:
In other words, is there a way to make regular shift disables the achordion logic to make it produce the home row key directly as a capitalized letter?
Thanks in advance,
-Tristan
Beta Was this translation helpful? Give feedback.
All reactions