aboutsummaryrefslogtreecommitdiffstats
path: root/users/zer09/tap_dance.h
blob: 555c15924858b5480241a0992ad9b3138b5e81f0 (plain) (blame)
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#ifndef TAP_DANCE_H
#define TAP_DANCE_H

#include "zer09.h"

typedef struct {
  int state;
} tap;

enum {
  DEFAULT_TAP,
  DEFAULT_HOLD,
  SINGLE_TAP,
  SINGLE_HOLD,
  DOUBLE_TAP,
  DOUBLE_HOLD,
  TRIPLE_TAP,
  TRIPLE_HOLD
};

enum {
  DA_SAFE_START,
  DA_LCTL,
  DA_LSPR,
  DA_RCTL,
  DA_RALT,
  DA_UPLY,
  DA_DWLY,
  DA_SAFE_END
};

extern volatile uint8_t active_layer;

void layer_switcher_tap(uint8_t);
int cur_dance(qk_tap_dance_state_t *);

void dance_lctl_finished(qk_tap_dance_state_t *, void *);
void dance_lctl_reset(qk_tap_dance_state_t *, void *);

void dance_lspr_finished(qk_tap_dance_state_t *, void *);
void dance_lspr_reset(qk_tap_dance_state_t *, void *);

void dance_rctl_finished(qk_tap_dance_state_t *, void *);
void dance_rctl_reset(qk_tap_dance_state_t *, void *);

void dance_ralt_finished(qk_tap_dance_state_t *, void *);
void dance_ralt_reset(qk_tap_dance_state_t *, void *);

void dance_uply_finished(qk_tap_dance_state_t *, void *);
void dance_uply_reset(qk_tap_dance_state_t *, void *);

void dance_dwly_finished(qk_tap_dance_state_t *, void *);
void dance_dwly_reset(qk_tap_dance_state_t *, void *);

#endif