[Core] Replace Tapping Force Hold feature with Quick Tap Term (#17007)
* Replace Tapping Force Hold feature with Quick Tap Term * Replace keyboard level TAPPING_FORCE_HOLD with QUICK_TAP_TERM 0 * Deprecate force hold in info_config.json * Before and after quick tap term unit tests * Quick tap unit tests iteration * Keymap config.h correction * Remove TAPPING_FORCE_HOLD_PER_KEY macros that were missed * Add two more test cases for quick tap * Replace TAPPING_FORCE_HOLD with QUICK_TAP_TERM in configs #2 * Replace TAPPING_FORCE_HOLD_PER_KEY with QUICK_TAP_TERM_PER_KEY in configs #2 * Add function declaration for get_quick_tap_term Co-authored-by: Stefan Kerkmann <karlk90@pm.me>
This commit is contained in:
parent
8698d109d7
commit
cbabc8dbe6
226 changed files with 462 additions and 380 deletions
|
@ -35,7 +35,7 @@
|
|||
/* Turn off key repeat support of the tap keycode for tap-hold keys, enabling
|
||||
* holds to work correctly in quick succession after taps.
|
||||
*/
|
||||
#define TAPPING_FORCE_HOLD
|
||||
#define QUICK_TAP_TERM 0
|
||||
|
||||
#if defined(OLED_ENABLE)
|
||||
/* The built-in OLED timeout wakes the OLED screen every time the buffer is
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#define TAPPING_TOGGLE 1
|
||||
#define TAPPING_TERM 200
|
||||
#define TAPPING_TERM_PER_KEY
|
||||
//#define TAPPING_FORCE_HOLD
|
||||
//#define QUICK_TAP_TERM 0
|
||||
#undef PERMISSIVE_HOLD
|
||||
#define IGNORE_MOD_TAP_INTERRUPT
|
||||
#define NO_ACTION_ONESHOT
|
||||
|
|
|
@ -83,7 +83,7 @@
|
|||
#if defined(PER_KEY_TAPPING)
|
||||
# define IGNORE_MOD_TAP_INTERRUPT_PER_KEY
|
||||
# define PERMISSIVE_HOLD_PER_KEY
|
||||
# define TAPPING_FORCE_HOLD_PER_KEY
|
||||
# define QUICK_TAP_TERM_PER_KEY
|
||||
# define HOLD_ON_OTHER_KEY
|
||||
# define RETRO_TAPPING_PER_KEY
|
||||
# define HOLD_ON_OTHER_KEY_PRESS_PER_KEY
|
||||
|
|
|
@ -57,14 +57,14 @@ __attribute__((weak)) bool get_ignore_mod_tap_interrupt(uint16_t keycode, keyrec
|
|||
}
|
||||
#endif // IGNORE_MOD_TAP_INTERRUPT_PER_KEY
|
||||
|
||||
#ifdef TAPPING_FORCE_HOLD_PER_KEY
|
||||
__attribute__((weak)) bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) {
|
||||
#ifdef QUICK_TAP_TERM_PER_KEY
|
||||
__attribute__((weak)) uint16_t get_quick_tap_term(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
default:
|
||||
return false;
|
||||
return QUICK_TAP_TERM;
|
||||
}
|
||||
}
|
||||
#endif // TAPPING_FORCE_HOLD_PER_KEY
|
||||
#endif // QUICK_TAP_TERM_PER_KEY
|
||||
|
||||
#ifdef RETRO_TAPPING_PER_KEY
|
||||
__attribute__((weak)) bool get_retro_tapping(uint16_t keycode, keyrecord_t *record) {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#define ONESHOT_TIMEOUT 3000
|
||||
#define IGNORE_MOD_TAP_INTERRUPT
|
||||
#define PERMISSIVE_HOLD_PER_KEY
|
||||
#define TAPPING_FORCE_HOLD_PER_KEY
|
||||
#define QUICK_TAP_TERM_PER_KEY
|
||||
#define TAPPING_TERM 200
|
||||
#define BACKLIGHT_BREATHING
|
||||
#define DYNAMIC_MACRO_NO_NESTING
|
||||
|
|
|
@ -29,7 +29,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||
return true;
|
||||
}
|
||||
|
||||
bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) {
|
||||
uint16_t get_quick_tap_term(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case MT_A:
|
||||
case MT_S:
|
||||
|
@ -39,9 +39,9 @@ bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) {
|
|||
case MT_K:
|
||||
case MT_L:
|
||||
case MT_SCLN:
|
||||
return true;
|
||||
return 0;
|
||||
default:
|
||||
return false;
|
||||
return QUICK_TAP_TERM;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -55,4 +55,3 @@ bool get_permissive_hold(uint16_t keycode, keyrecord_t *record) {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
// actually sends Ctrl-x. That's bad.)
|
||||
#define IGNORE_MOD_TAP_INTERRUPT
|
||||
#undef PERMISSIVE_HOLD
|
||||
//#define TAPPING_FORCE_HOLD
|
||||
//#define QUICK_TAP_TERM 0
|
||||
//#define RETRO_TAPPING
|
||||
|
||||
#ifndef TAPPING_TOGGLE
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#define IGNORE_MOD_TAP_INTERRUPT
|
||||
|
||||
// Enable rapid switch from tap to hold, disables double tap hold auto-repeat.
|
||||
#define TAPPING_FORCE_HOLD
|
||||
#define QUICK_TAP_TERM 0
|
||||
|
||||
// Auto Shift
|
||||
#define NO_AUTO_SHIFT_ALPHA
|
||||
|
@ -40,4 +40,3 @@
|
|||
#define COMBO_TERM 200
|
||||
#define EXTRA_SHORT_COMBOS
|
||||
#endif
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
# define IGNORE_MOD_TAP_INTERRUPT
|
||||
|
||||
// Enable rapid switch from tap to hold, disables double tap hold auto-repeat.
|
||||
# define TAPPING_FORCE_HOLD
|
||||
# define QUICK_TAP_TERM 0
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
#define TAPPING_TERM 175
|
||||
#define MACRO_TIMER 5
|
||||
#define TAPPING_FORCE_HOLD_PER_KEY
|
||||
#define QUICK_TAP_TERM_PER_KEY
|
||||
// testing
|
||||
#define TAPPING_TERM_PER_KEY
|
||||
//#define IGNORE_MOD_TAP_INTERRUPT // rolling R3 "zxcv", etc...
|
||||
|
|
|
@ -55,11 +55,11 @@ uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) {
|
|||
}
|
||||
};
|
||||
|
||||
bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case NM(SCLN):
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
uint16_t get_quick_tap_term(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case NM(SCLN):
|
||||
return 0;
|
||||
default:
|
||||
return QUICK_TAP_TERM;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#define TAPPING_TOGGLE 2 // number of taps for a toggle-on-tap
|
||||
#define TAPPING_TERM 170 // ms to trigger tap
|
||||
// https://precondition.github.io/home-row-mods
|
||||
#define TAPPING_FORCE_HOLD // make tap-then-hold _not_ do key auto repeat
|
||||
#define QUICK_TAP_TERM 0 // make tap-then-hold _not_ do key auto repeat
|
||||
#define IGNORE_MOD_TAP_INTERRUPT
|
||||
#define PERMISSIVE_HOLD // I don't think this works for me, hence I rolled my own implementation.
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
// actually sends Ctrl-x. That's bad.)
|
||||
#define IGNORE_MOD_TAP_INTERRUPT
|
||||
#undef PERMISSIVE_HOLD
|
||||
//#define TAPPING_FORCE_HOLD
|
||||
//#define QUICK_TAP_TERM 0
|
||||
//#define RETRO_TAPPING
|
||||
|
||||
#ifndef TAPPING_TOGGLE
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
#pragma once
|
||||
|
||||
#undef TAPPING_FORCE_HOLD
|
||||
|
||||
#undef TAPPING_TERM
|
||||
#define TAPPING_TERM 175
|
||||
|
||||
#undef QUICK_TAP_TERM
|
||||
#define QUICK_TAP_TERM TAPPING_TERM
|
||||
|
||||
#define SPACE_CADET_MODIFIER_CARRYOVER
|
||||
#define LSPO_KEYS KC_LSFT, KC_TRNS, KC_LBRC
|
||||
#define RSPC_KEYS KC_RSFT, KC_TRNS, KC_RBRC
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
// actually sends Ctrl-x. That's bad.)
|
||||
#define IGNORE_MOD_TAP_INTERRUPT
|
||||
#undef PERMISSIVE_HOLD
|
||||
//#define TAPPING_FORCE_HOLD
|
||||
//#define QUICK_TAP_TERM 0
|
||||
//#define RETRO_TAPPING
|
||||
|
||||
#ifndef TAPPING_TOGGLE
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue