aboutsummaryrefslogtreecommitdiff
path: root/docs/tap_dance.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/tap_dance.md')
-rw-r--r--docs/tap_dance.md8
1 files changed, 7 insertions, 1 deletions
diff --git a/docs/tap_dance.md b/docs/tap_dance.md
index 25827a648..38b2ee999 100644
--- a/docs/tap_dance.md
+++ b/docs/tap_dance.md
@@ -1,5 +1,7 @@
1# Tap Dance: A single key can do 3, 5, or 100 different things 1# Tap Dance: A single key can do 3, 5, or 100 different things
2 2
3<!-- FIXME: Break this up into multiple sections -->
4
3Hit the semicolon key once, send a semicolon. Hit it twice, rapidly -- send a colon. Hit it three times, and your keyboard's LEDs do a wild dance. That's just one example of what Tap Dance can do. It's one of the nicest community-contributed features in the firmware, conceived and created by [algernon](https://github.com/algernon) in [#451](https://github.com/qmk/qmk_firmware/pull/451). Here's how algernon describes the feature: 5Hit the semicolon key once, send a semicolon. Hit it twice, rapidly -- send a colon. Hit it three times, and your keyboard's LEDs do a wild dance. That's just one example of what Tap Dance can do. It's one of the nicest community-contributed features in the firmware, conceived and created by [algernon](https://github.com/algernon) in [#451](https://github.com/qmk/qmk_firmware/pull/451). Here's how algernon describes the feature:
4 6
5With this feature one can specify keys that behave differently, based on the amount of times they have been tapped, and when interrupted, they get handled before the interrupter. 7With this feature one can specify keys that behave differently, based on the amount of times they have been tapped, and when interrupted, they get handled before the interrupter.
@@ -34,7 +36,9 @@ Our next stop is `matrix_scan_tap_dance()`. This handles the timeout of tap-danc
34 36
35For the sake of flexibility, tap-dance actions can be either a pair of keycodes, or a user function. The latter allows one to handle higher tap counts, or do extra things, like blink the LEDs, fiddle with the backlighting, and so on. This is accomplished by using an union, and some clever macros. 37For the sake of flexibility, tap-dance actions can be either a pair of keycodes, or a user function. The latter allows one to handle higher tap counts, or do extra things, like blink the LEDs, fiddle with the backlighting, and so on. This is accomplished by using an union, and some clever macros.
36 38
37### Examples 39# Examples
40
41## Simple Example
38 42
39Here's a simple example for a single definition: 43Here's a simple example for a single definition:
40 44
@@ -59,6 +63,8 @@ qk_tap_dance_action_t tap_dance_actions[] = {
59TD(TD_ESC_CAPS) 63TD(TD_ESC_CAPS)
60``` 64```
61 65
66## Complex Example
67
62Here's a more complex example involving custom actions: 68Here's a more complex example involving custom actions:
63 69
64```c 70```c