summary refs log tree commit diff
path: root/quantum/process_keycode/process_tap_dance.h
diff options
context:
space:
mode:
authorPavlos Vinieratos <pvinis@gmail.com>2016-07-15 23:54:08 +0200
committerPavlos Vinieratos <pvinis@gmail.com>2016-07-17 08:28:03 +0200
commitd3091faf363afc8fef73ddf4948f872439b0e827 (patch)
tree8741f3b0cf7ab54e3943598eafcef052faab30be /quantum/process_keycode/process_tap_dance.h
parentf3b56701ed7e6c622dc48e429780124ba5fde172 (diff)
change naming, and remove extraneous definition
Diffstat (limited to 'quantum/process_keycode/process_tap_dance.h')
-rw-r--r--quantum/process_keycode/process_tap_dance.h27
1 files changed, 8 insertions, 19 deletions
diff --git a/quantum/process_keycode/process_tap_dance.h b/quantum/process_keycode/process_tap_dance.h
index bf925df0f6..7b820584a8 100644
--- a/quantum/process_keycode/process_tap_dance.h
+++ b/quantum/process_keycode/process_tap_dance.h
@@ -22,7 +22,6 @@ typedef enum
 } qk_tap_dance_type_t;
 
 typedef void (*qk_tap_dance_user_fn_t) (qk_tap_dance_state_t *state);
-typedef void (*qk_tap_dance_user_fn_reset_t) (void);
 
 typedef struct
 {
@@ -33,9 +32,9 @@ typedef struct
       uint16_t kc2;
     } pair;
     struct {
-      qk_tap_dance_user_fn_t regular;
-      qk_tap_dance_user_fn_t anyway;
-      qk_tap_dance_user_fn_reset_t reset;
+      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;
@@ -45,24 +44,14 @@ typedef struct
     .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, NULL, NULL } \
+    .fn = { NULL, user_fn, NULL } \
   }
 
-#define ACTION_TAP_DANCE_FN_ANYWAY(user_fn, user_fn_anyway) { \
-    .type = QK_TAP_DANCE_TYPE_FN,           \
-    .fn = { user_fn, user_fn_anyway, NULL } \
-  }
-
-#define ACTION_TAP_DANCE_FN_RESET(user_fn, user_fn_reset) { \
-    .type = QK_TAP_DANCE_TYPE_FN,          \
-    .fn = { user_fn, NULL, user_fn_reset } \
-  }
-
-#define ACTION_TAP_DANCE_FN_ANYWAY_RESET(user_fn, user_fn_anyway, user_fn_reset) { \
-    .type = QK_TAP_DANCE_TYPE_FN,                    \
-    .fn = { user_fn, user_fn_anyway, user_fn_reset } \
+#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[];