blob: 6debc1ce4562df9828951f6df481a60fb8ba2a0e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
//instanalize an instance of 'tap' for the None - Lead tap dance.
static tap none_lead_state = {
.is_press_action = true,
.state = 0
};
void none_lead_finished(qk_tap_dance_state_t *state, void *user_data) {
none_lead_state.state = current_dance(state);
switch (none_lead_state.state) {
case SINGLE_TAP:
register_code(KC_NO);
break;
case SINGLE_HOLD:
register_code(KC_LALT);
register_code(KC_LSFT);
break;
case DOUBLE_TAP:
qk_leader_start();
break;
}
}
void none_lead_reset(qk_tap_dance_state_t *state, void *user_data) {
switch (none_lead_state.state) {
case SINGLE_TAP:
unregister_code(KC_NO);
break;
case SINGLE_HOLD:
unregister_code(KC_LALT);
unregister_code(KC_LSFT);
break;
case DOUBLE_TAP:
break;
}
none_lead_state.state = 0;
}
|