From b949343b783da729b1dfebd38507cc56a8cd12e3 Mon Sep 17 00:00:00 2001 From: ridingqwerty Date: Tue, 25 Feb 2020 13:25:52 -0500 Subject: New feature: PERMISSIVE_HOLD_PER_KEY (#7994) * Implement 'PERMISSIVE_HOLD_PER_KEY' * Document 'PERMISSIVE_HOLD_PER_KEY' Co-authored-by: GeorgeKoenig <35542036+GeorgeKoenig@users.noreply.github.com> --- docs/config_options.md | 2 ++ docs/feature_advanced_keycodes.md | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) (limited to 'docs') diff --git a/docs/config_options.md b/docs/config_options.md index d048d17678..df4b67dc16 100644 --- a/docs/config_options.md +++ b/docs/config_options.md @@ -142,6 +142,8 @@ If you define these options you will enable the associated feature, which may in * `#define PERMISSIVE_HOLD` * makes tap and hold keys trigger the hold if another key is pressed before releasing, even if it hasn't hit the `TAPPING_TERM` * See [Permissive Hold](feature_advanced_keycodes.md#permissive-hold) for details +* `#define PERMISSIVE_HOLD_PER_KEY` + * enabled handling for per key `PERMISSIVE_HOLD` settings * `#define IGNORE_MOD_TAP_INTERRUPT` * makes it possible to do rolling combos (zx) with keys that convert to other keys on hold, by enforcing the `TAPPING_TERM` for both keys. * See [Mod tap interrupt](feature_advanced_keycodes.md#ignore-mod-tap-interrupt) for details diff --git a/docs/feature_advanced_keycodes.md b/docs/feature_advanced_keycodes.md index ebb24dc990..8c34494605 100644 --- a/docs/feature_advanced_keycodes.md +++ b/docs/feature_advanced_keycodes.md @@ -265,6 +265,25 @@ Normally, if you do all this within the `TAPPING_TERM` (default: 200ms) this wil ?> If you have `Ignore Mod Tap Interrupt` enabled, as well, this will modify how both work. The regular key has the modifier added if the first key is released first or if both keys are held longer than the `TAPPING_TERM`. +For more granular control of this feature, you can add the following to your `config.h`: + +```c +#define PERMISSIVE_HOLD_PER_KEY +``` + +You can then add the following function to your keymap: + +```c +bool get_permissive_hold(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_T(KC_A): + return true; + default: + return false; + } +} +``` + ## Ignore Mod Tap Interrupt To enable this setting, add this to your `config.h`: -- cgit v1.2.3