-
-
Notifications
You must be signed in to change notification settings - Fork 39.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
[Bug] get_permissive_hold() logic is reversed #8999
Comments
Another potential problem with that block of code is that if # if defined(TAPPING_TERM_PER_KEY) || (TAPPING_TERM >= 500) || defined(PERMISSIVE_HOLD) || defined(PERMISSIVE_HOLD_PER_KEY)
else if (
# ifdef PERMISSIVE_HOLD_PER_KEY
get_permissive_hold(get_event_keycode(tapping_key.event, false), keyp) &&
# else
# ifdef TAPPING_TERM_PER_KEY
(get_tapping_term(get_event_keycode(tapping_key.event, false)) >= 500) &&
# endif
# endif
IS_RELEASED(event) && waiting_buffer_typed(event)) {
debug("Tapping: End. No tap. Interfered by typing key\n");
process_record(&tapping_key);
tapping_key = (keyrecord_t){};
debug_tapping_key();
// enqueue
return false;
}
# endif (I see that PR #8348 touches the same code, so I should probably base my PR on it.) |
Is this closed by #12125? |
Yes, this appears to be addressed by it - please close it if you can. |
In my testing keymap I added this to
config.h
:Then I added a very simple implementation of
get_permissive_hold()
tokeymap.c
:The above should be equivalent to having
#define PERMISSIVE_HOLD
; however, testing with bothMT(MOD_LCTL, KC_CAPS)
andLT(1, KC_APP)
shows that they behave as ifPERMISSIVE_HOLD
was not enabled.However, if I make
get_permissive_hold()
always returnfalse
:then the behavior of
MT(MOD_LCTL, KC_CAPS)
andLT(1, KC_APP)
changes to the behavior which is documented forPERMISSIVE_HOLD
.So it seems that the logic to handle
get_permissive_hold()
is reversed from what it should be.Looking at the code in question:
it seems that because the whole block is enabled by defining
PERMISSIVE_HOLD
, it should also be enabled whenget_permissive_hold()
returnstrue
, and notfalse
as it is coded currently.System Information
id80
The text was updated successfully, but these errors were encountered: