diff options
author | Jonathan Lucas <CommandLineDesign@gmail.com> | 2016-07-23 18:44:01 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-23 18:44:01 -0700 |
commit | 4059a16118e3abbc9eab2241693c60a1f19811b5 (patch) | |
tree | ce711e757ab87d6d0b408d477b49e719b6d8f687 /quantum/process_keycode/process_tap_dance.h | |
parent | 9ecf9073b96799e52a1f1c0d35b57177382902ce (diff) | |
parent | 8e1d96983aad19b3e4e72ece5db822e92d91342b (diff) | |
download | firmware-4059a16118e3abbc9eab2241693c60a1f19811b5.tar.gz firmware-4059a16118e3abbc9eab2241693c60a1f19811b5.tar.bz2 firmware-4059a16118e3abbc9eab2241693c60a1f19811b5.zip |
Merge pull request #1 from jackhumbert/master
Update from parent
Diffstat (limited to 'quantum/process_keycode/process_tap_dance.h')
-rw-r--r-- | quantum/process_keycode/process_tap_dance.h | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/quantum/process_keycode/process_tap_dance.h b/quantum/process_keycode/process_tap_dance.h index b9d7c7fcf..7b820584a 100644 --- a/quantum/process_keycode/process_tap_dance.h +++ b/quantum/process_keycode/process_tap_dance.h @@ -31,18 +31,27 @@ typedef struct uint16_t kc1; uint16_t kc2; } pair; - qk_tap_dance_user_fn_t fn; + struct { + qk_tap_dance_user_fn_t on_each_tap; + qk_tap_dance_user_fn_t on_dance_finished; + qk_tap_dance_user_fn_t on_reset; + } fn; }; } qk_tap_dance_action_t; #define ACTION_TAP_DANCE_DOUBLE(kc1, kc2) { \ - .type = QK_TAP_DANCE_TYPE_PAIR, \ - .pair = { kc1, kc2 } \ + .type = QK_TAP_DANCE_TYPE_PAIR, \ + .pair = { kc1, kc2 } \ } -#define ACTION_TAP_DANCE_FN(user_fn) { \ +#define ACTION_TAP_DANCE_FN(user_fn) { \ .type = QK_TAP_DANCE_TYPE_FN, \ - .fn = user_fn \ + .fn = { NULL, user_fn, NULL } \ + } + +#define ACTION_TAP_DANCE_FN_ADVANCED(user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_reset) { \ + .type = QK_TAP_DANCE_TYPE_FN, \ + .fn = { user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_reset } \ } extern const qk_tap_dance_action_t tap_dance_actions[]; |