summaryrefslogtreecommitdiffstats
path: root/quantum/process_keycode/process_tap_dance.h
diff options
context:
space:
mode:
authorJason Janse van Rensburg <l33tjas.0n@gmail.com>2016-07-24 04:08:01 +0200
committerJason Janse van Rensburg <l33tjas.0n@gmail.com>2016-07-24 04:08:01 +0200
commit62d4ce73ecd191e66934a1882dc63971bcf338cb (patch)
treece711e757ab87d6d0b408d477b49e719b6d8f687 /quantum/process_keycode/process_tap_dance.h
parentb0e9dbecee209a40ff1fc93ce4415d96cb0cdaba (diff)
parent8e1d96983aad19b3e4e72ece5db822e92d91342b (diff)
Merged branch master into bone2planck
Diffstat (limited to 'quantum/process_keycode/process_tap_dance.h')
-rw-r--r--quantum/process_keycode/process_tap_dance.h19
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 b9d7c7fcf4..7b820584a8 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[];