summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/config_options.md2
-rw-r--r--docs/custom_quantum_functions.md29
2 files changed, 31 insertions, 0 deletions
diff --git a/docs/config_options.md b/docs/config_options.md
index ad42e97802..c5131a8414 100644
--- a/docs/config_options.md
+++ b/docs/config_options.md
@@ -126,6 +126,8 @@ If you define these options you will enable the associated feature, which may in
* `#define TAPPING_TERM 200`
* how long before a tap becomes a hold, if set above 500, a key tapped during the tapping term will turn it into a hold too
+* `#define TAPPING_TERM_PER_KEY`
+ * enables handling for per key `TAPPING_TERM` settings
* `#define RETRO_TAPPING`
* tap anyway, even after TAPPING_TERM, if there was no other key interruption between press and release
* See [Retro Tapping](feature_advanced_keycodes.md#retro-tapping) for details
diff --git a/docs/custom_quantum_functions.md b/docs/custom_quantum_functions.md
index 418faf3494..6287b95309 100644
--- a/docs/custom_quantum_functions.md
+++ b/docs/custom_quantum_functions.md
@@ -323,6 +323,7 @@ uint32_t layer_state_set_user(uint32_t state) {
* Keyboard/Revision: `uint32_t layer_state_set_kb(uint32_t state)`
* Keymap: `uint32_t layer_state_set_user(uint32_t state)`
+
The `state` is the bitmask of the active layers, as explained in the [Keymap Overview](keymap.md#keymap-layer-status)
@@ -460,3 +461,31 @@ And you're done. The RGB layer indication will only work if you want it to. And
* Keymap: `void eeconfig_init_user(void)`, `uint32_t eeconfig_read_user(void)` and `void eeconfig_update_user(uint32_t val)`
The `val` is the value of the data that you want to write to EEPROM. And the `eeconfig_read_*` function return a 32 bit (DWORD) value from the EEPROM.
+
+# Custom Tapping Term
+
+By default, the tapping term is defined globally, and is not configurable by key. For most users, this is perfectly fine. But in come cases, dual function keys would be greatly improved by different timeouts than `LT` keys, or because some keys may be easier to hold than others. Instead of using custom key codes for each, this allows for per key configurable `TAPPING_TERM`.
+
+To enable this functionality, you need to add `#define TAPPING_TERM_PER_KEY` to your `config.h`, first.
+
+
+## Example `get_tapping_term` Implementation
+
+To change the `TAPPING TERM` based on the keycode, you'd want to add something like the following to your `keymap.c` file:
+
+```c
+uint16_t get_tapping_term(uint16_t keycode) {
+ switch (keycode) {
+ case SFT_T(KC_SPC):
+ return TAPPING_TERM + 1250;
+ case LT(1, KC_GRV):
+ return 130;
+ default:
+ return TAPPING_TERM;
+ }
+}
+```
+
+### `get_tapping_term` Function Documentation
+
+Unlike many of the other functions here, there isn't a need (or even reason) to have a quantum or keyboard level function. Only a user level function is useful here, so no need to mark it as such.