aboutsummaryrefslogtreecommitdiff
path: root/users/danielo515/tap_dance.h
diff options
context:
space:
mode:
Diffstat (limited to 'users/danielo515/tap_dance.h')
-rw-r--r--users/danielo515/tap_dance.h80
1 files changed, 80 insertions, 0 deletions
diff --git a/users/danielo515/tap_dance.h b/users/danielo515/tap_dance.h
new file mode 100644
index 000000000..6ec4fe13c
--- /dev/null
+++ b/users/danielo515/tap_dance.h
@@ -0,0 +1,80 @@
1#include "quantum.h"
2extern bool CMD(uint16_t kc);
3extern bool onMac;
4
5
6#define ACTION_TAP_DANCE_DOUBLE_SAFE(kc1, kc2) { \
7 .fn = { NULL, qk_tap_dance_pair_finished_safe, qk_tap_dance_pair_reset_safe }, \
8 .user_data = (void *)&((qk_tap_dance_pair_t) { kc1, kc2 }), \
9 }
10
11#ifdef QUAD_DANCE
12//Enums used to clearly convey the state of the tap dance
13enum {
14 SINGLE_TAP = 1,
15 SINGLE_HOLD = 2,
16 DOUBLE_TAP = 3,
17 DOUBLE_HOLD = 4,
18 DOUBLE_SINGLE_TAP = 5 //send SINGLE_TAP twice - NOT DOUBLE_TAP
19 // Add more enums here if you want for triple, quadruple, etc.
20};
21int cur_dance (qk_tap_dance_state_t *state);
22# endif
23
24enum tap_dance {
25 COPY_CUT,
26 PASTE_DANCE,
27 _TD_F1,
28 _TD_F2,
29 _TD_F3,
30 _TD_F4,
31 _TD_F5,
32 _TD_F6,
33 _TD_F7,
34 _TD_F8,
35 _TD_F9,
36 _TD_F10,
37 _TD_F11,
38 _TD_F12,
39 _TD_H_ENTER,
40 _TD_CLN,
41 _TD_SLASH,
42 // old ones
43 LEFT_HOME,
44 J_ENT,
45 H_MINS,
46 RGT_HOME,
47 _TD_COPY,
48 _TD_CUT,
49 _TD_PASTE,
50};
51void qk_tap_dance_pair_finished_safe(qk_tap_dance_state_t *state, void *user_data);
52void qk_tap_dance_pair_reset_safe(qk_tap_dance_state_t *state, void *user_data);
53void td_copy_cut (qk_tap_dance_state_t *state, void *user_data);
54void td_paste(qk_tap_dance_state_t *state, void *user_data);
55int cur_dance (qk_tap_dance_state_t *state);
56void dance_cut (qk_tap_dance_state_t *state, void *user_data);
57void dance_copy (qk_tap_dance_state_t *state, void *user_data);
58void dance_paste (qk_tap_dance_state_t *state, void *user_data);
59
60#define TD_COPY TD(_TD_COPY)
61#define TD_CUT TD(_TD_CUT)
62#define KC_TD_COPY TD(_TD_COPY) // Declarations for macros that add KC_
63#define KC_TD_CUT TD(_TD_CUT)
64#define KC_TD_PASTE TD(_TD_PASTE)
65#define KC_E_GRV ES_GRV
66#define TD_F1 TD(_TD_F1)
67#define TD_F2 TD(_TD_F2)
68#define TD_F3 TD(_TD_F3)
69#define TD_F4 TD(_TD_F4)
70#define TD_F5 TD(_TD_F5)
71#define TD_F6 TD(_TD_F6)
72#define TD_F7 TD(_TD_F7)
73#define TD_F8 TD(_TD_F8)
74#define TD_F9 TD(_TD_F9)
75#define TD_F10 TD(_TD_F10)
76#define TD_F11 TD(_TD_F11)
77#define TD_F12 TD(_TD_F12)
78#define H_ENTER TD(_TD_H_ENTER)
79#define TD_CLN TD(_TD_CLN)
80#define TD_SLASH TD(_TD_SLASH)