aboutsummaryrefslogtreecommitdiff
path: root/docs/feature_macros.md
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2021-02-17 07:26:52 +1100
committerGitHub <noreply@github.com>2021-02-17 07:26:52 +1100
commit3345ce268610edbca8f53bc2909c547485531603 (patch)
tree9d984734f8aa5f2aa964e0151ab48eee936ef34b /docs/feature_macros.md
parentcdb9d55956c67e1e2a9209522c1a2b30a7d9fb67 (diff)
downloadqmk_firmware-3345ce268610edbca8f53bc2909c547485531603.tar.gz
qmk_firmware-3345ce268610edbca8f53bc2909c547485531603.zip
Add `tap_code_delay(code, delay)` (#11913)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Diffstat (limited to 'docs/feature_macros.md')
-rw-r--r--docs/feature_macros.md10
1 files changed, 8 insertions, 2 deletions
diff --git a/docs/feature_macros.md b/docs/feature_macros.md
index aa1ebc337..6e69ad642 100644
--- a/docs/feature_macros.md
+++ b/docs/feature_macros.md
@@ -233,9 +233,15 @@ Parallel to `register_code` function, this sends the `<kc>` keyup event to the c
233 233
234### `tap_code(<kc>);` 234### `tap_code(<kc>);`
235 235
236This will send `register_code(<kc>)` and then `unregister_code(<kc>)`. This is useful if you want to send both the press and release events ("tap" the key, rather than hold it). 236Sends `register_code(<kc>)` and then `unregister_code(<kc>)`. This is useful if you want to send both the press and release events ("tap" the key, rather than hold it).
237 237
238If you're having issues with taps (un)registering, you can add a delay between the register and unregister events by setting `#define TAP_CODE_DELAY 100` in your `config.h` file. The value is in milliseconds. 238If `TAP_CODE_DELAY` is defined (default 0), this function waits that many milliseconds before calling `unregister_code(<kc>)`. This can be useful when you are having issues with taps (un)registering.
239
240If the keycode is `KC_CAPS`, it waits `TAP_HOLD_CAPS_DELAY` milliseconds instead (default 80), as macOS prevents accidental Caps Lock activation by waiting for the key to be held for a certain amount of time.
241
242### `tap_code_delay(<kc>, <delay>);`
243
244Like `tap_code(<kc>)`, but with a `delay` parameter for specifying arbitrary intervals before sending the unregister event.
239 245
240### `register_code16(<kc>);`, `unregister_code16(<kc>);` and `tap_code16(<kc>);` 246### `register_code16(<kc>);`, `unregister_code16(<kc>);` and `tap_code16(<kc>);`
241 247