Skip to content
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

Fix tap-hold per key callback invocations. #16058

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions quantum/action_tapping.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ bool process_tapping(keyrecord_t *keyp) {
# if defined(AUTO_SHIFT_ENABLE) && defined(RETRO_SHIFT)
|| (
# ifdef RETRO_TAPPING_PER_KEY
get_retro_tapping(tapping_keycode, keyp) &&
get_retro_tapping(tapping_keycode, &tapping_key) &&
# endif
(RETRO_SHIFT + 0) != 0 && TIMER_DIFF_16(event.time, tapping_key.event.time) < (RETRO_SHIFT + 0)
)
Expand Down Expand Up @@ -158,15 +158,15 @@ bool process_tapping(keyrecord_t *keyp) {
(
(
# ifdef TAPPING_TERM_PER_KEY
get_tapping_term(tapping_keycode, keyp)
get_tapping_term(tapping_keycode, &tapping_key)
# else
g_tapping_term
# endif
>= 500
)

# ifdef PERMISSIVE_HOLD_PER_KEY
|| get_permissive_hold(tapping_keycode, keyp)
|| get_permissive_hold(tapping_keycode, &tapping_key)
# elif defined(PERMISSIVE_HOLD)
|| true
# endif
Expand All @@ -177,7 +177,7 @@ bool process_tapping(keyrecord_t *keyp) {
# if defined(AUTO_SHIFT_ENABLE) && defined(RETRO_SHIFT)
|| (
# ifdef RETRO_TAPPING_PER_KEY
get_retro_tapping(tapping_keycode, keyp) &&
get_retro_tapping(tapping_keycode, &tapping_key) &&
# endif
(
// Rolled over the two keys.
Expand All @@ -188,15 +188,15 @@ bool process_tapping(keyrecord_t *keyp) {
|| (
IS_LT(tapping_keycode)
# ifdef HOLD_ON_OTHER_KEY_PRESS_PER_KEY
&& get_hold_on_other_key_press(tapping_keycode, keyp)
&& get_hold_on_other_key_press(tapping_keycode, &tapping_key)
# endif
)
# endif
# if !defined(IGNORE_MOD_TAP_INTERRUPT) || defined(IGNORE_MOD_TAP_INTERRUPT_PER_KEY)
|| (
IS_MT(tapping_keycode)
# ifdef IGNORE_MOD_TAP_INTERRUPT_PER_KEY
&& !get_ignore_mod_tap_interrupt(tapping_keycode, keyp)
&& !get_ignore_mod_tap_interrupt(tapping_keycode, &tapping_key)
# endif
)
# endif
Expand Down Expand Up @@ -252,7 +252,7 @@ bool process_tapping(keyrecord_t *keyp) {
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(tapping_keycode, keyp))
if (get_hold_on_other_key_press(tapping_keycode, &tapping_key))
# endif
{
debug("Tapping: End. No tap. Interfered by pressed key\n");
Expand Down Expand Up @@ -360,7 +360,7 @@ bool process_tapping(keyrecord_t *keyp) {
# if defined(AUTO_SHIFT_ENABLE) && defined(RETRO_SHIFT)
|| (
# ifdef RETRO_TAPPING_PER_KEY
get_retro_tapping(tapping_keycode, keyp) &&
get_retro_tapping(tapping_keycode, &tapping_key) &&
# endif
(RETRO_SHIFT + 0) != 0 && TIMER_DIFF_16(event.time, tapping_key.event.time) < (RETRO_SHIFT + 0)
)
Expand All @@ -373,7 +373,7 @@ bool process_tapping(keyrecord_t *keyp) {
# if !defined(TAPPING_FORCE_HOLD) || defined(TAPPING_FORCE_HOLD_PER_KEY)
if (
# ifdef TAPPING_FORCE_HOLD_PER_KEY
!get_tapping_force_hold(tapping_keycode, keyp) &&
!get_tapping_force_hold(tapping_keycode, &tapping_key) &&
# endif
!tapping_key.tap.interrupted && tapping_key.tap.count > 0) {
// sequential tap.
Expand Down