-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathadaptive_trailer.c
171 lines (169 loc) · 4.75 KB
/
adaptive_trailer.c
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
//
// adaptive_trailer.c
//
//
// Created by Alan on 1/22/24.
//
//
// embedded in the switch in adaptive.c
//
// Using Adaptives for macros (like a flexible LeaderKey)
case ADAPTIVE_TRAILER:
if (preprior_keycode) // allow only 1 deep
break;
return_state = false; // presume we do something.
switch (prior_keycode) {
#ifdef adaptAHASH
case KC_A: //
tap_code(KC_BSPC); // and may have been lowercase
send_string(adaptAHASH); //
break;
#endif
#ifdef adaptBHASH
case KC_B: //
tap_code(KC_BSPC); // and may have been lowercase
send_string(adaptBHASH); //
break;
#endif
#ifdef adaptCHASH
case KC_C: //
tap_code(KC_BSPC); // and may have been lowercase
send_string(adaptCHASH); //
break;
#endif
#ifdef adaptDHASH
case KC_D: //
tap_code(KC_BSPC); // and may have been lowercase
send_string(adaptDHASH); //
break;
#endif
#ifdef adaptEHASH
case KC_E: //
tap_code(KC_BSPC); // and may have been lowercase
send_string(adaptEHASH); //
break;
#endif
#ifdef adaptFHASH
case KC_F: //
tap_code(KC_BSPC); // and may have been lowercase
send_string(adaptFHASH); //
break;
#endif
#ifdef adaptGHASH
case KC_G: //
tap_code(KC_BSPC); // and may have been lowercase
send_string(adaptGHASH); //
break;
#endif
#ifdef adaptHHASH
case KC_H: //
tap_code(KC_BSPC); // and may have been lowercase
send_string(adaptHHASH); //
break;
#endif
#ifdef adaptIHASH
case KC_I: //
tap_code(KC_BSPC); // and may have been lowercase
send_string(adaptIHASH); //
break;
#endif
#ifdef adaptJHASH
case KC_J: //
tap_code(KC_BSPC); // and may have been lowercase
send_string(adaptJHASH); //
break;
#endif
#ifdef adaptKHASH
case KC_K: //
tap_code(KC_BSPC); // and may have been lowercase
send_string(adaptKHASH); //
break;
#endif
#ifdef adaptLHASH
case KC_L: //
tap_code(KC_BSPC); // and may have been lowercase
send_string(adaptLHASH); //
break;
#endif
#ifdef adaptMHASH
case KC_M: //
tap_code(KC_BSPC); // and may have been lowercase
send_string(adaptMHASH); //
break;
#endif
#ifdef adaptNHASH
case KC_N: //
tap_code(KC_BSPC); // and may have been lowercase
send_string(adaptNHASH); //
break;
#endif
#ifdef adaptOHASH
case KC_O: //
tap_code(KC_BSPC); // and may have been lowercase
send_string(adaptOHASH); //
break;
#endif
#ifdef adaptPHASH
case KC_P: //
tap_code(KC_BSPC); // and may have been lowercase
send_string(adaptPHASH); //
break;
#endif
#ifdef adaptRHASH
case KC_R: //
tap_code(KC_BSPC); // and may have been lowercase
send_string(adaptRHASH); //
break;
#endif
#ifdef adaptSHASH
case KC_S: //
tap_code(KC_BSPC); // and may have been lowercase
send_string(adaptSHASH); //
break;
#endif
#ifdef adaptTHASH
case KC_T: //
tap_code(KC_BSPC); // and may have been lowercase
send_string(adaptTHASH); //
break;
#endif
#ifdef adaptUHASH
case KC_U: //
tap_code(KC_BSPC); // and may have been lowercase
send_string(adaptUHASH); //
break;
#endif
#ifdef adaptVHASH
case KC_V: //
tap_code(KC_BSPC); // and may have been lowercase
send_string(adaptVHASH); //
break;
#endif
#ifdef adaptWHASH
case KC_W: //
tap_code(KC_BSPC); // and may have been lowercase
send_string(adaptWHASH); //
break;
#endif
#ifdef adaptXHASH
case KC_X: //
tap_code(KC_BSPC); // and may have been lowercase
send_string(adaptXHASH); //
break;
#endif
#ifdef adaptYHASH
case KC_Y: //
tap_code(KC_BSPC); // and may have been lowercase
send_string(adaptYHASH); //
break;
#endif
#ifdef adaptZHASH
case KC_Z: //
tap_code(KC_BSPC); // and may have been lowercase
send_string(adaptZHASH); //
break;
#endif
default: //
return_state = true; // didn't end up doing anything.
}
break;