From 8aea6a254de3e922ddc1d43e286448ec21d41164 Mon Sep 17 00:00:00 2001 From: Stefan Kerkmann Date: Wed, 5 Apr 2023 22:02:47 +0200 Subject: [PATCH 1/2] Remove stray defines and per key functions --- docs/zh-cn/mod_tap.md | 2 -- .../crkbd/keymaps/cameronjlarsen/config.h | 1 - .../split_5x7/keymaps/stef9998/keymap.c | 10 +++--- keyboards/karn/keymaps/colemak/keymap.c | 32 ------------------- .../aurora/sweep/keymaps/default/keymap.json | 1 - .../kyria/keymaps/cameronjlarsen/config.h | 2 -- 6 files changed, 5 insertions(+), 43 deletions(-) diff --git a/docs/zh-cn/mod_tap.md b/docs/zh-cn/mod_tap.md index 5bf18a152787..9dc59bfb79fd 100644 --- a/docs/zh-cn/mod_tap.md +++ b/docs/zh-cn/mod_tap.md @@ -117,8 +117,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } ``` -在数字及字母键上使用Mod-Tap时推荐启用 `IGNORE_MOD_TAP_INTERRUPT`,以避免在快速按下下一个键时保持功能优先级。参见[忽略Mod Tap中断](zh-cn/tap_hold.md#ignore-mod-tap-interrupt)。 - ### 同时改变点击和按住功能 最后一个例子通过 `LT(0,KC_NO)` 实现了点击复制,按住粘贴的功能: diff --git a/keyboards/crkbd/keymaps/cameronjlarsen/config.h b/keyboards/crkbd/keymaps/cameronjlarsen/config.h index f0f4fb14db41..1d83214a7779 100644 --- a/keyboards/crkbd/keymaps/cameronjlarsen/config.h +++ b/keyboards/crkbd/keymaps/cameronjlarsen/config.h @@ -25,7 +25,6 @@ #define TAPPING_FORCE_HOLD #define TAPPING_TERM 135 -#define IGNORE_MOD_TAP_INTERRUPT #define CAPS_WORD_IDLE_TIMEOUT 5000 // Turn off Caps Word after 5 seconds. #ifdef RGBLIGHT_ENABLE diff --git a/keyboards/handwired/stef9998/split_5x7/keymaps/stef9998/keymap.c b/keyboards/handwired/stef9998/split_5x7/keymaps/stef9998/keymap.c index 5b74c3567e35..833a245c5437 100644 --- a/keyboards/handwired/stef9998/split_5x7/keymaps/stef9998/keymap.c +++ b/keyboards/handwired/stef9998/split_5x7/keymaps/stef9998/keymap.c @@ -39,20 +39,20 @@ enum custom_keycodes { // Shortcut to make keymap more readable #define KC_FN MO(_FN) -bool get_ignore_mod_tap_interrupt(uint16_t keycode, keyrecord_t *record) { +bool get_hold_on_other_key_press(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case SC_LSPO: // Do not force the mod-tap key press to be handled as a modifier // if any other key was pressed while the mod-tap key is held down. - return false; + return true; // case MT(MOD_LSFT,KC_9): // return false; case SC_RSPC: - return false; + return true; default: // Force the mod-tap key press to be handled as a modifier if any // other key was pressed while the mod-tap key is held down. - return true; + return false; } } @@ -185,4 +185,4 @@ _______ ,_______ ,RALT_T(KC_S),LCTL_T(KC_D),LSFT_T(KC_F),LT(_SYM,KC_G),_______ , _______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,_______ ,_______ ,_______ // └────────┴────────┴──────────┴──────────┴─────────────┴────────┘ └────────┴─────────────┴──────────┴──────────┴────────┴────────┘ ), - */ \ No newline at end of file + */ diff --git a/keyboards/karn/keymaps/colemak/keymap.c b/keyboards/karn/keymaps/colemak/keymap.c index dbe78c0dada5..63b34f785e5e 100644 --- a/keyboards/karn/keymaps/colemak/keymap.c +++ b/keyboards/karn/keymaps/colemak/keymap.c @@ -27,37 +27,6 @@ bool get_hold_on_other_key_press(uint16_t keycode, keyrecord_t *record) { } } -bool get_ignore_mod_tap_interrupt(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case CTL_T(KC_X): - return true; - case ALT_T(KC_C): - return true; - case CMD_T(KC_V): - return true; - case CMD_T(KC_M): - return true; - case ALT_T(KC_COMM): - return true; - case CTL_T(KC_DOT): - return true; - case KC_X: - return true; - case KC_C: - return true; - case KC_V: - return true; - case KC_M: - return true; - case KC_COMM: - return true; - case KC_DOT: - return true; - default: - return false; - } -} - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -93,4 +62,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______ ) }; - diff --git a/keyboards/splitkb/aurora/sweep/keymaps/default/keymap.json b/keyboards/splitkb/aurora/sweep/keymaps/default/keymap.json index b62202d2b4c0..ade21d5ece15 100644 --- a/keyboards/splitkb/aurora/sweep/keymaps/default/keymap.json +++ b/keyboards/splitkb/aurora/sweep/keymaps/default/keymap.json @@ -79,7 +79,6 @@ "tapping": { "term": 200, "permissive_hold": true, - "ignore_mod_tap_interrupt": true, "force_hold": true } } diff --git a/keyboards/splitkb/kyria/keymaps/cameronjlarsen/config.h b/keyboards/splitkb/kyria/keymaps/cameronjlarsen/config.h index efd8c8fe24dd..bcbdbac9e243 100644 --- a/keyboards/splitkb/kyria/keymaps/cameronjlarsen/config.h +++ b/keyboards/splitkb/kyria/keymaps/cameronjlarsen/config.h @@ -33,8 +33,6 @@ # define RGBLIGHT_LIMIT_VAL 150 #endif -// Lets you roll mod-tap keys -#define IGNORE_MOD_TAP_INTERRUPT // Enable rapid switch from tap to hold, disables double tap hold auto-repeat. #define TAPPING_FORCE_HOLD // Configure the global tapping term (default: 200ms) From 2e7e16d96984140d626f4e0fd0d848a8b2893e74 Mon Sep 17 00:00:00 2001 From: Stefan Kerkmann Date: Wed, 5 Apr 2023 22:03:15 +0200 Subject: [PATCH 2/2] Remove defunct get_ignore_mod_tap_interrupt declaration --- quantum/action_tapping.h | 1 - 1 file changed, 1 deletion(-) diff --git a/quantum/action_tapping.h b/quantum/action_tapping.h index 6099d80d6d05..6b518b829880 100644 --- a/quantum/action_tapping.h +++ b/quantum/action_tapping.h @@ -43,7 +43,6 @@ void action_tapping_process(keyrecord_t record); uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record); uint16_t get_quick_tap_term(uint16_t keycode, keyrecord_t *record); bool get_permissive_hold(uint16_t keycode, keyrecord_t *record); -bool get_ignore_mod_tap_interrupt(uint16_t keycode, keyrecord_t *record); bool get_retro_tapping(uint16_t keycode, keyrecord_t *record); bool get_hold_on_other_key_press(uint16_t keycode, keyrecord_t *record);