diff options
-rw-r--r-- | quantum/process_keycode/process_tap_dance.h | 8 | ||||
-rw-r--r-- | readme.md | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/quantum/process_keycode/process_tap_dance.h b/quantum/process_keycode/process_tap_dance.h index d7b857bdc..49b06e450 100644 --- a/quantum/process_keycode/process_tap_dance.h +++ b/quantum/process_keycode/process_tap_dance.h | |||
@@ -39,15 +39,15 @@ typedef struct | |||
39 | 39 | ||
40 | #define ACTION_TAP_DANCE_DOUBLE(kc1, kc2) { \ | 40 | #define ACTION_TAP_DANCE_DOUBLE(kc1, kc2) { \ |
41 | .fn = { NULL, qk_tap_dance_pair_finished, qk_tap_dance_pair_reset }, \ | 41 | .fn = { NULL, qk_tap_dance_pair_finished, qk_tap_dance_pair_reset }, \ |
42 | .user_data = (void *)&((qk_tap_dance_pair_t) { kc1, kc2 }) \ | 42 | .user_data = (void *)&((qk_tap_dance_pair_t) { kc1, kc2 }), \ |
43 | } | 43 | } |
44 | 44 | ||
45 | #define ACTION_TAP_DANCE_FN(user_fn) { \ | 45 | #define ACTION_TAP_DANCE_FN(user_fn) { \ |
46 | .fn = { NULL, user_fn, NULL } \ | 46 | .fn = { NULL, user_fn, NULL }, \ |
47 | } | 47 | } |
48 | 48 | ||
49 | #define ACTION_TAP_DANCE_FN_ADVANCED(user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_reset) { \ | 49 | #define ACTION_TAP_DANCE_FN_ADVANCED(user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_dance_reset) { \ |
50 | .fn = { user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_reset } \ | 50 | .fn = { user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_dance_reset }, \ |
51 | } | 51 | } |
52 | 52 | ||
53 | extern qk_tap_dance_action_t tap_dance_actions[]; | 53 | extern qk_tap_dance_action_t tap_dance_actions[]; |
@@ -526,7 +526,7 @@ This array specifies what actions shall be taken when a tap-dance key is in acti | |||
526 | 526 | ||
527 | * `ACTION_TAP_DANCE_DOUBLE(kc1, kc2)`: Sends the `kc1` keycode when tapped once, `kc2` otherwise. When the key is held, the appropriate keycode is registered: `kc1` when pressed and held, `kc2` when tapped once, then pressed and held. | 527 | * `ACTION_TAP_DANCE_DOUBLE(kc1, kc2)`: Sends the `kc1` keycode when tapped once, `kc2` otherwise. When the key is held, the appropriate keycode is registered: `kc1` when pressed and held, `kc2` when tapped once, then pressed and held. |
528 | * `ACTION_TAP_DANCE_FN(fn)`: Calls the specified function - defined in the user keymap - with the final tap count of the tap dance action. | 528 | * `ACTION_TAP_DANCE_FN(fn)`: Calls the specified function - defined in the user keymap - with the final tap count of the tap dance action. |
529 | * `ACTION_TAP_DANCE_FN_ADVANCED(on_each_tap_fn, on_dance_finished_fn, on_reset_fn)`: Calls the first specified function - defined in the user keymap - on every tap, the second function on when the dance action finishes (like the previous option), and the last function when the tap dance action resets. | 529 | * `ACTION_TAP_DANCE_FN_ADVANCED(on_each_tap_fn, on_dance_finished_fn, on_dance_reset_fn)`: Calls the first specified function - defined in the user keymap - on every tap, the second function on when the dance action finishes (like the previous option), and the last function when the tap dance action resets. |
530 | 530 | ||
531 | The first option is enough for a lot of cases, that just want dual roles. For example, `ACTION_TAP_DANCE(KC_SPC, KC_ENT)` will result in `Space` being sent on single-tap, `Enter` otherwise. | 531 | The first option is enough for a lot of cases, that just want dual roles. For example, `ACTION_TAP_DANCE(KC_SPC, KC_ENT)` will result in `Space` being sent on single-tap, `Enter` otherwise. |
532 | 532 | ||