diff --git a/keyboards/keychron/q5_max/ansi_encoder/keymaps/via/config.h b/keyboards/keychron/q5_max/ansi_encoder/keymaps/via/config.h index e9fd63dd8e..e341c556f3 100644 --- a/keyboards/keychron/q5_max/ansi_encoder/keymaps/via/config.h +++ b/keyboards/keychron/q5_max/ansi_encoder/keymaps/via/config.h @@ -16,3 +16,8 @@ // Always resolve combo keycodes from BASE (layer 0) so the // COMM+DOT+SLSH fallback combo fires regardless of the active layer. #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 diff --git a/keyboards/keychron/q5_max/ansi_encoder/keymaps/via/keymap.c b/keyboards/keychron/q5_max/ansi_encoder/keymaps/via/keymap.c index 9e08e26ed6..a2ba6f9f51 100644 --- a/keyboards/keychron/q5_max/ansi_encoder/keymaps/via/keymap.c +++ b/keyboards/keychron/q5_max/ansi_encoder/keymaps/via/keymap.c @@ -438,6 +438,15 @@ bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { } #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_action_t tap_dance_actions[] = { // Tap once for Home, twice for End