summaryrefslogtreecommitdiff
path: root/quantum/process_keycode/process_auto_shift.c
diff options
context:
space:
mode:
authorprecondition <57645186+precondition@users.noreply.github.com>2022-12-13 12:20:07 +0100
committerGitHub <noreply@github.com>2022-12-13 22:20:07 +1100
commit515dd18c2801663bbac0e59f683c2a93e4bd9b1a (patch)
treea60fa641a1d5e0e3ff08fbb0a6718c8aa5280f15 /quantum/process_keycode/process_auto_shift.c
parentca13734f912e64c632daf816e700b1b176d0ac8e (diff)
Remove IGNORE_MOD_TAP_INTERRUPT_PER_KEY in favour of HOLD_ON_OTHER_KEY_PRESS_PER_KEY (#15741)
Diffstat (limited to 'quantum/process_keycode/process_auto_shift.c')
-rw-r--r--quantum/process_keycode/process_auto_shift.c41
1 files changed, 15 insertions, 26 deletions
diff --git a/quantum/process_keycode/process_auto_shift.c b/quantum/process_keycode/process_auto_shift.c
index 35d4851ee5..b7ac449198 100644
--- a/quantum/process_keycode/process_auto_shift.c
+++ b/quantum/process_keycode/process_auto_shift.c
@@ -397,8 +397,17 @@ bool process_auto_shift(uint16_t keycode, keyrecord_t *record) {
397 break; 397 break;
398# endif 398# endif
399 } 399 }
400 // If Retro Shift is disabled, possible custom actions shouldn't happen. 400 // If Retro Shift is disabled, possible custom actions shouldn't happen.
401 // clang-format off 401 // clang-format off
402# if defined(RETRO_SHIFT) && !defined(NO_ACTION_TAPPING)
403# if defined(HOLD_ON_OTHER_KEY_PRESS_PER_KEY)
404 const bool is_hold_on_interrupt = get_hold_on_other_key_press(keycode, record);
405# elif defined(IGNORE_MOD_TAP_INTERRUPT)
406 const bool is_hold_on_interrupt = false;
407# else
408 const bool is_hold_on_interrupt = IS_MT(keycode);
409# endif
410# endif
402 if (IS_RETRO(keycode) 411 if (IS_RETRO(keycode)
403# if defined(RETRO_SHIFT) && !defined(NO_ACTION_TAPPING) 412# if defined(RETRO_SHIFT) && !defined(NO_ACTION_TAPPING)
404 // Not tapped or #defines mean that rolls should use hold action. 413 // Not tapped or #defines mean that rolls should use hold action.
@@ -407,27 +416,7 @@ bool process_auto_shift(uint16_t keycode, keyrecord_t *record) {
407# ifdef RETRO_TAPPING_PER_KEY 416# ifdef RETRO_TAPPING_PER_KEY
408 || !get_retro_tapping(keycode, record) 417 || !get_retro_tapping(keycode, record)
409# endif 418# endif
410 || (record->tap.interrupted && (IS_LT(keycode) 419 || (record->tap.interrupted && is_hold_on_interrupt))
411# if defined(HOLD_ON_OTHER_KEY_PRESS) || defined(HOLD_ON_OTHER_KEY_PRESS_PER_KEY)
412# ifdef HOLD_ON_OTHER_KEY_PRESS_PER_KEY
413 ? get_hold_on_other_key_press(keycode, record)
414# else
415 ? true
416# endif
417# else
418 ? false
419# endif
420# if defined(IGNORE_MOD_TAP_INTERRUPT) || defined(IGNORE_MOD_TAP_INTERRUPT_PER_KEY)
421# ifdef IGNORE_MOD_TAP_INTERRUPT_PER_KEY
422 : !get_ignore_mod_tap_interrupt(keycode, record)
423# else
424 : false
425# endif
426# else
427 : true
428# endif
429 ))
430 )
431# endif 420# endif
432 ) { 421 ) {
433 // clang-format on 422 // clang-format on
@@ -454,10 +443,10 @@ bool process_auto_shift(uint16_t keycode, keyrecord_t *record) {
454# endif 443# endif
455 ) { 444 ) {
456 // Fixes modifiers not being applied to rolls with AUTO_SHIFT_MODIFIERS set. 445 // Fixes modifiers not being applied to rolls with AUTO_SHIFT_MODIFIERS set.
457# if !defined(IGNORE_MOD_TAP_INTERRUPT) || defined(IGNORE_MOD_TAP_INTERRUPT_PER_KEY) 446# if !defined(IGNORE_MOD_TAP_INTERRUPT) || defined(HOLD_ON_OTHER_KEY_PRESS_PER_KEY)
458 if (autoshift_flags.in_progress 447 if (autoshift_flags.in_progress
459# ifdef IGNORE_MOD_TAP_INTERRUPT_PER_KEY 448# ifdef HOLD_ON_OTHER_KEY_PRESS_PER_KEY
460 && !get_ignore_mod_tap_interrupt(keycode, record) 449 && get_hold_on_other_key_press(keycode, record)
461# endif 450# endif
462 ) { 451 ) {
463 autoshift_end(KC_NO, now, false, &autoshift_lastrecord); 452 autoshift_end(KC_NO, now, false, &autoshift_lastrecord);