-
-
Notifications
You must be signed in to change notification settings - Fork 39.3k
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
[Feature Request] Permissive Hold and Ignore Mod Tap Interrupt for LT #8971
Comments
Can I work on this? |
please do |
From my testing it seems that The However, I cannot obtain the documented effect of the ”no What is missing now is the mode for |
@sigprof I think @ShadowProgr was referring to the combination of PERMISSIVE_HOLD and IGNORE_MOD_TAP_INTERRUPT. This combination is supposed to affect the sequence where the first key down (MT) is also the first key up (and both keys are up before the TAPPING_TERM.) This "down down up up" sequence (based on the documentation) sends the modified key even though the modifier was not held for the TAPPING_TERM. I do not see this effect even with MT, though! If I am interpreting the documentation correctly, this entire "combination functionality" is broken. @ShadowProgr, have you tried this functionality with MT? This is further confused by incorrect documentation. For the following sequence without PERMISSIVE_HOLD or IGNORE_MOD_TAP: SFT_T(KC_A) Down the documentation says that a capital "X" is sent, when lowercase "ax" is actually sent. |
@nathanvercaemert I tried the suggested sequence with the current QMK master and without I think that |
@nathanvercaemert I was referring to all 3 cases where Seems like right now the "problem" is that LT and MT behaves differently and those options also affect them differently. Which is very confusing to understand how LT and MT actually work |
There are also other more obscure keycodes which use the same
The swap hands actions are unique in that they also have the |
@sigprof and @ShadowProgr , are you experiencing any difference between PERMISSIVE_HOLD and PERMISSIVE_HOLD/IGNORE_MOD_TAP_INTERRUPT combo (with the TAPPING_TERM @499?) What is the difference that you are observing? |
I configured Caps Lock as Without any extra options except
With just
With
With both
|
Trying to summarize the above wall of text:
Or, if we want to look at the changes from
|
I made another series of tests for Caps Lock mapped to Without any extra options except
With
|
Summarizing the above:
|
I tried to make this hack, but don't have the time to test it properly at the moment: diff --git a/tmk_core/common/action_tapping.c b/tmk_core/common/action_tapping.c
index 34f08d890..4d5202d1b 100644
--- a/tmk_core/common/action_tapping.c
+++ b/tmk_core/common/action_tapping.c
@@ -35,6 +35,10 @@ __attribute__((weak)) bool get_tapping_force_hold(uint16_t keycode, keyrecord_t
__attribute__((weak)) bool get_permissive_hold(uint16_t keycode, keyrecord_t *record) { return false; }
# endif
+# ifdef HOLD_ON_OTHER_KEY_PRESS_PER_KEY
+__attribute__((weak)) bool get_hold_on_other_key_press(uint16_t keycode, keyrecord_t *record) { return false; }
+# endif
+
static keyrecord_t tapping_key = {};
static keyrecord_t waiting_buffer[WAITING_BUFFER_SIZE] = {};
static uint8_t waiting_buffer_head = 0;
@@ -163,6 +167,19 @@ bool process_tapping(keyrecord_t *keyp) {
// set interrupted flag when other key preesed during tapping
if (event.pressed) {
tapping_key.tap.interrupted = true;
+# if defined(HOLD_ON_OTHER_KEY_PRESS) || defined(HOLD_ON_OTHER_KEY_PRESS_PER_KEY)
+# if defined(HOLD_ON_OTHER_KEY_PRESS_PER_KEY)
+ if (get_hold_on_other_key_press(get_event_keycode(tapping_key.event, false), &tapping_key))
+# endif
+ {
+ debug("Tapping: End. No tap. Interfered by pressed key\n");
+ process_record(&tapping_key);
+ tapping_key = (keyrecord_t){};
+ debug_tapping_key();
+ // enqueue
+ return false;
+ }
+# endif
}
// enqueue
return false; |
Testing With just
With both
|
What the above patch does for
|
Testing the patch with Caps Lock mapped to With just
|
What the above patch does for
|
The situation with tap-hold configuration options with the above patch would be as follows:
Enabling the |
Yes, a table is a good idea here. I decided to make another table, where I rearranged the columns in a more logical order (first 6 columns show the proposed “new style” modes, last 3 columns show the “legacy mod-tap” behavior), and added the Summary sheet to show the tap/hold decisions done in various cases. |
I pushed the commit adding |
FWIW, from the perspective of someone new to QMK, "PERMISSIVE_HOLD" is not a particularly intuitive name for this configuration option. "HOLD_ON_OTHER_KEY_PRESS", although not perfect, is definitely better (for me personally, I think "PERFORM_HOLD_ACTION_ON_OTHER_KEY_PRESS" is a little easier to understand). I'm really looking forward to making use of your changes, and think it makes sense pushing since it is both more aligned with the user's expected behavior, and also improves on the status quo configuration option naming (even if its not perfect). A case of "don't let perfect be the enemy of good." |
I'm testing the |
I opened PR #9404 with this code and some hopefully understandable documentation, |
This issue has been automatically marked as stale because it has not had activity in the last 90 days. It will be closed in the next 30 days unless it is tagged properly or other activity occurs. |
This issue has been automatically closed because it has not had activity in the last 30 days. If this issue is still valid, re-open the issue and let us know. |
What is the status of this? Will it be pulled into QMK at some point, or are there conflicts? and does it still work? |
Feature Request Type
Description
Currently Permissive Hold and Ignore Mod Tap Interrupt only affects MT() and not LT(). It would be nice to have that functionality extended to LT() since it's very similar to MT()
The text was updated successfully, but these errors were encountered: