feat(q5_max): add per-key tapping term with 50ms for home/end tap-dance

Define TAPPING_TERM (200ms default) and TAPPING_TERM_PER_KEY in config.h,
then implement get_tapping_term() to set a tight 50ms window for TD_HOME_END
so a single Home tap never accidentally resolves as End.
This commit is contained in:
2026-04-11 00:24:24 -04:00
parent 52e75ecc6a
commit 49af06fcac
2 changed files with 14 additions and 0 deletions
@@ -16,3 +16,8 @@
// Always resolve combo keycodes from BASE (layer 0) so the // Always resolve combo keycodes from BASE (layer 0) so the
// COMM+DOT+SLSH fallback combo fires regardless of the active layer. // COMM+DOT+SLSH fallback combo fires regardless of the active layer.
#define COMBO_ONLY_FROM_LAYER 0 #define COMBO_ONLY_FROM_LAYER 0
// Default tapping term for mod-tap, layer-tap, and tap-dance keys.
#define TAPPING_TERM 200
// Allow per-key overrides via get_tapping_term() in keymap.c.
#define TAPPING_TERM_PER_KEY
@@ -438,6 +438,15 @@ bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
} }
#endif // RGB_MATRIX_ENABLE #endif // RGB_MATRIX_ENABLE
uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case TD(TD_HOME_END):
return 175;
default:
return TAPPING_TERM;
}
}
// Tap Dance definitions // Tap Dance definitions
tap_dance_action_t tap_dance_actions[] = { tap_dance_action_t tap_dance_actions[] = {
// Tap once for Home, twice for End // Tap once for Home, twice for End