[Chore] Remove stray mod tap interrupt defines and per key functions (#20347)

* Remove stray defines and per key functions

* Remove defunct get_ignore_mod_tap_interrupt declaration
master
Stefan Kerkmann 2023-04-06 01:04:23 +02:00 committed by GitHub
parent 7115927559
commit 73b376a881
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 5 additions and 44 deletions

View File

@ -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)` 实现了点击复制,按住粘贴的功能:

View File

@ -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

View File

@ -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;
}
}

View File

@ -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] = {
_______, _______, _______, _______, _______, _______
)
};

View File

@ -79,7 +79,6 @@
"tapping": {
"term": 200,
"permissive_hold": true,
"ignore_mod_tap_interrupt": true,
"force_hold": true
}
}

View File

@ -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)

View File

@ -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);