diff options
author | precondition <57645186+precondition@users.noreply.github.com> | 2023-04-03 07:32:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-03 15:32:47 +1000 |
commit | 1899793f27c9b165b55b28b086bd989f12baf137 (patch) | |
tree | e7b366bd5f04daa69387738b1de322f39d6bd304 /quantum | |
parent | 47a51fda5dea81775ade0c936aeccc1ed6ebc53a (diff) |
Make IGNORE_MOD_TAP_INTERRUPT the default behaviour for mod-taps (#20211)
Diffstat (limited to 'quantum')
-rw-r--r-- | quantum/action.c | 2 | ||||
-rw-r--r-- | quantum/action_tapping.c | 17 | ||||
-rw-r--r-- | quantum/process_keycode/process_auto_shift.c | 14 |
3 files changed, 9 insertions, 24 deletions
diff --git a/quantum/action.c b/quantum/action.c index a601737376..21fa98dc54 100644 --- a/quantum/action.c +++ b/quantum/action.c @@ -487,7 +487,7 @@ void process_action(keyrecord_t *record, action_t action) { default: if (event.pressed) { if (tap_count > 0) { -# if !defined(IGNORE_MOD_TAP_INTERRUPT) || defined(HOLD_ON_OTHER_KEY_PRESS_PER_KEY) +# ifdef HOLD_ON_OTHER_KEY_PRESS_PER_KEY if ( # ifdef HOLD_ON_OTHER_KEY_PRESS_PER_KEY get_hold_on_other_key_press(get_event_keycode(record->event, false), record) && diff --git a/quantum/action_tapping.c b/quantum/action_tapping.c index 5a38bf96e3..dbb5b8d4e5 100644 --- a/quantum/action_tapping.c +++ b/quantum/action_tapping.c @@ -11,10 +11,8 @@ # 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 +# elif defined(IGNORE_MOD_TAP_INTERRUPT) +# error "IGNORE_MOD_TAP_INTERRUPT is no longer necessary as it is now the default behavior of mod-tap keys. Please remove it from your config." # endif # define IS_TAPPING() IS_EVENT(tapping_key.event) @@ -162,12 +160,6 @@ void action_tapping_process(keyrecord_t record) { # define TAP_GET_HOLD_ON_OTHER_KEY_PRESS false # endif -# if defined(IGNORE_MOD_TAP_INTERRUPT) -# define TAP_GET_IGNORE_MOD_TAP_INTERRUPT true -# else -# define TAP_GET_IGNORE_MOD_TAP_INTERRUPT false -# endif - /** \brief Tapping * * Rule: Tap key is typed(pressed and released) within TAPPING_TERM. @@ -217,9 +209,8 @@ bool process_tapping(keyrecord_t *keyp) { (TAP_IS_MT && TAP_GET_HOLD_ON_OTHER_KEY_PRESS) ) ) - // Makes Retro Shift ignore [IGNORE_MOD_TAP_INTERRUPT's - // effects on nested taps for MTs and the default - // behavior of LTs] below TAPPING_TERM or RETRO_SHIFT. + // Makes Retro Shift ignore the default behavior of + // MTs and LTs on nested taps below TAPPING_TERM or RETRO_SHIFT || ( TAP_IS_RETRO && (event.key.col != tapping_key.event.key.col || event.key.row != tapping_key.event.key.row) diff --git a/quantum/process_keycode/process_auto_shift.c b/quantum/process_keycode/process_auto_shift.c index aad1a164ae..62c347ae0c 100644 --- a/quantum/process_keycode/process_auto_shift.c +++ b/quantum/process_keycode/process_auto_shift.c @@ -400,12 +400,10 @@ bool process_auto_shift(uint16_t keycode, keyrecord_t *record) { // If Retro Shift is disabled, possible custom actions shouldn't happen. // clang-format off # if defined(RETRO_SHIFT) && !defined(NO_ACTION_TAPPING) -# if defined(HOLD_ON_OTHER_KEY_PRESS_PER_KEY) +# ifdef HOLD_ON_OTHER_KEY_PRESS_PER_KEY const bool is_hold_on_interrupt = get_hold_on_other_key_press(keycode, record); -# elif defined(IGNORE_MOD_TAP_INTERRUPT) - const bool is_hold_on_interrupt = false; # else - const bool is_hold_on_interrupt = IS_QK_MOD_TAP(keycode); + const bool is_hold_on_interrupt = false; # endif # endif if (IS_RETRO(keycode) @@ -443,12 +441,8 @@ bool process_auto_shift(uint16_t keycode, keyrecord_t *record) { # endif ) { // Fixes modifiers not being applied to rolls with AUTO_SHIFT_MODIFIERS set. -# if !defined(IGNORE_MOD_TAP_INTERRUPT) || defined(HOLD_ON_OTHER_KEY_PRESS_PER_KEY) - if (autoshift_flags.in_progress -# ifdef HOLD_ON_OTHER_KEY_PRESS_PER_KEY - && get_hold_on_other_key_press(keycode, record) -# endif - ) { +# ifdef HOLD_ON_OTHER_KEY_PRESS_PER_KEY + if (autoshift_flags.in_progress && get_hold_on_other_key_press(keycode, record)) { autoshift_end(KC_NO, now, false, &autoshift_lastrecord); } # endif |