From 515dd18c2801663bbac0e59f683c2a93e4bd9b1a Mon Sep 17 00:00:00 2001 From: precondition <57645186+precondition@users.noreply.github.com> Date: Tue, 13 Dec 2022 12:20:07 +0100 Subject: Remove IGNORE_MOD_TAP_INTERRUPT_PER_KEY in favour of HOLD_ON_OTHER_KEY_PRESS_PER_KEY (#15741) --- quantum/action_tapping.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'quantum/action_tapping.c') diff --git a/quantum/action_tapping.c b/quantum/action_tapping.c index 0350495ae5..ca0f31f12e 100644 --- a/quantum/action_tapping.c +++ b/quantum/action_tapping.c @@ -15,6 +15,14 @@ #ifndef NO_ACTION_TAPPING +# if defined(IGNORE_MOD_TAP_INTERRUPT_PER_KEY) +# error "IGNORE_MOD_TAP_INTERRUPT_PER_KEY has been removed; the code needs to be ported to use HOLD_ON_OTHER_KEY_PRESS_PER_KEY instead." +# elif !defined(IGNORE_MOD_TAP_INTERRUPT) +# if !defined(PERMISSIVE_HOLD) && !defined(PERMISSIVE_HOLD_PER_KEY) && !defined(HOLD_ON_OTHER_KEY_PRESS) && !defined(HOLD_ON_OTHER_KEY_PRESS_PER_KEY) +# pragma message "The default behavior of mod-taps will change to mimic IGNORE_MOD_TAP_INTERRUPT in the future.\nIf you wish to keep the old default behavior of mod-taps, please use HOLD_ON_OTHER_KEY_PRESS." +# endif +# endif + # define IS_TAPPING() !IS_NOEVENT(tapping_key.event) # define IS_TAPPING_PRESSED() (IS_TAPPING() && tapping_key.event.pressed) # define IS_TAPPING_RELEASED() (IS_TAPPING() && !tapping_key.event.pressed) @@ -162,9 +170,7 @@ void action_tapping_process(keyrecord_t record) { # define TAP_GET_HOLD_ON_OTHER_KEY_PRESS false # endif -# ifdef IGNORE_MOD_TAP_INTERRUPT_PER_KEY -# define TAP_GET_IGNORE_MOD_TAP_INTERRUPT get_ignore_mod_tap_interrupt(tapping_keycode, &tapping_key) -# elif defined(IGNORE_MOD_TAP_INTERRUPT) +# if defined(IGNORE_MOD_TAP_INTERRUPT) # define TAP_GET_IGNORE_MOD_TAP_INTERRUPT true # else # define TAP_GET_IGNORE_MOD_TAP_INTERRUPT false @@ -216,7 +222,7 @@ bool process_tapping(keyrecord_t *keyp) { // Rolled over the two keys. (tapping_key.tap.interrupted == true && ( (TAP_IS_LT && TAP_GET_HOLD_ON_OTHER_KEY_PRESS) || - (TAP_IS_MT && !TAP_GET_IGNORE_MOD_TAP_INTERRUPT) + (TAP_IS_MT && TAP_GET_HOLD_ON_OTHER_KEY_PRESS) ) ) // Makes Retro Shift ignore [IGNORE_MOD_TAP_INTERRUPT's -- cgit v1.2.3