diff options
author | skullY <skullydazed@gmail.com> | 2019-08-30 11:19:03 -0700 |
---|---|---|
committer | skullydazed <skullydazed@users.noreply.github.com> | 2019-08-30 15:01:52 -0700 |
commit | b624f32f944acdc59dcb130674c09090c5c404cb (patch) | |
tree | bc13adbba137d122d9a2c2fb2fafcbb08ac10e25 /tmk_core/common/action_code.h | |
parent | 61af76a10d00aba185b8338604171de490a13e3b (diff) | |
download | qmk_firmware-b624f32f944acdc59dcb130674c09090c5c404cb.tar.gz qmk_firmware-b624f32f944acdc59dcb130674c09090c5c404cb.zip |
clang-format changes
Diffstat (limited to 'tmk_core/common/action_code.h')
-rw-r--r-- | tmk_core/common/action_code.h | 239 |
1 files changed, 114 insertions, 125 deletions
diff --git a/tmk_core/common/action_code.h b/tmk_core/common/action_code.h index 5b5d0e566..03fcb3382 100644 --- a/tmk_core/common/action_code.h +++ b/tmk_core/common/action_code.h | |||
@@ -98,30 +98,29 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
98 | */ | 98 | */ |
99 | enum action_kind_id { | 99 | enum action_kind_id { |
100 | /* Key Actions */ | 100 | /* Key Actions */ |
101 | ACT_MODS = 0b0000, | 101 | ACT_MODS = 0b0000, |
102 | ACT_LMODS = 0b0000, | 102 | ACT_LMODS = 0b0000, |
103 | ACT_RMODS = 0b0001, | 103 | ACT_RMODS = 0b0001, |
104 | ACT_MODS_TAP = 0b0010, | 104 | ACT_MODS_TAP = 0b0010, |
105 | ACT_LMODS_TAP = 0b0010, | 105 | ACT_LMODS_TAP = 0b0010, |
106 | ACT_RMODS_TAP = 0b0011, | 106 | ACT_RMODS_TAP = 0b0011, |
107 | /* Other Keys */ | 107 | /* Other Keys */ |
108 | ACT_USAGE = 0b0100, | 108 | ACT_USAGE = 0b0100, |
109 | ACT_MOUSEKEY = 0b0101, | 109 | ACT_MOUSEKEY = 0b0101, |
110 | /* One-hand Support */ | 110 | /* One-hand Support */ |
111 | ACT_SWAP_HANDS = 0b0110, | 111 | ACT_SWAP_HANDS = 0b0110, |
112 | /* Layer Actions */ | 112 | /* Layer Actions */ |
113 | ACT_LAYER = 0b1000, | 113 | ACT_LAYER = 0b1000, |
114 | ACT_LAYER_MODS = 0b1001, | 114 | ACT_LAYER_MODS = 0b1001, |
115 | ACT_LAYER_TAP = 0b1010, /* Layer 0-15 */ | 115 | ACT_LAYER_TAP = 0b1010, /* Layer 0-15 */ |
116 | ACT_LAYER_TAP_EXT = 0b1011, /* Layer 16-31 */ | 116 | ACT_LAYER_TAP_EXT = 0b1011, /* Layer 16-31 */ |
117 | /* Extensions */ | 117 | /* Extensions */ |
118 | ACT_MACRO = 0b1100, | 118 | ACT_MACRO = 0b1100, |
119 | ACT_BACKLIGHT = 0b1101, | 119 | ACT_BACKLIGHT = 0b1101, |
120 | ACT_COMMAND = 0b1110, | 120 | ACT_COMMAND = 0b1110, |
121 | ACT_FUNCTION = 0b1111 | 121 | ACT_FUNCTION = 0b1111 |
122 | }; | 122 | }; |
123 | 123 | ||
124 | |||
125 | /** \brief Action Code Struct | 124 | /** \brief Action Code Struct |
126 | * | 125 | * |
127 | * NOTE: | 126 | * NOTE: |
@@ -139,66 +138,63 @@ enum action_kind_id { | |||
139 | typedef union { | 138 | typedef union { |
140 | uint16_t code; | 139 | uint16_t code; |
141 | struct action_kind { | 140 | struct action_kind { |
142 | uint16_t param :12; | 141 | uint16_t param : 12; |
143 | uint8_t id :4; | 142 | uint8_t id : 4; |
144 | } kind; | 143 | } kind; |
145 | struct action_key { | 144 | struct action_key { |
146 | uint8_t code :8; | 145 | uint8_t code : 8; |
147 | uint8_t mods :4; | 146 | uint8_t mods : 4; |
148 | uint8_t kind :4; | 147 | uint8_t kind : 4; |
149 | } key; | 148 | } key; |
150 | struct action_layer_bitop { | 149 | struct action_layer_bitop { |
151 | uint8_t bits :4; | 150 | uint8_t bits : 4; |
152 | uint8_t xbit :1; | 151 | uint8_t xbit : 1; |
153 | uint8_t part :3; | 152 | uint8_t part : 3; |
154 | uint8_t on :2; | 153 | uint8_t on : 2; |
155 | uint8_t op :2; | 154 | uint8_t op : 2; |
156 | uint8_t kind :4; | 155 | uint8_t kind : 4; |
157 | } layer_bitop; | 156 | } layer_bitop; |
158 | struct action_layer_mods | 157 | struct action_layer_mods { |
159 | { | 158 | uint8_t mods : 8; |
160 | uint8_t mods :8; | 159 | uint8_t layer : 4; |
161 | uint8_t layer :4; | 160 | uint8_t kind : 4; |
162 | uint8_t kind :4; | ||
163 | } layer_mods; | 161 | } layer_mods; |
164 | struct action_layer_tap { | 162 | struct action_layer_tap { |
165 | uint8_t code :8; | 163 | uint8_t code : 8; |
166 | uint8_t val :5; | 164 | uint8_t val : 5; |
167 | uint8_t kind :3; | 165 | uint8_t kind : 3; |
168 | } layer_tap; | 166 | } layer_tap; |
169 | struct action_usage { | 167 | struct action_usage { |
170 | uint16_t code :10; | 168 | uint16_t code : 10; |
171 | uint8_t page :2; | 169 | uint8_t page : 2; |
172 | uint8_t kind :4; | 170 | uint8_t kind : 4; |
173 | } usage; | 171 | } usage; |
174 | struct action_backlight { | 172 | struct action_backlight { |
175 | uint8_t level :8; | 173 | uint8_t level : 8; |
176 | uint8_t opt :4; | 174 | uint8_t opt : 4; |
177 | uint8_t kind :4; | 175 | uint8_t kind : 4; |
178 | } backlight; | 176 | } backlight; |
179 | struct action_command { | 177 | struct action_command { |
180 | uint8_t id :8; | 178 | uint8_t id : 8; |
181 | uint8_t opt :4; | 179 | uint8_t opt : 4; |
182 | uint8_t kind :4; | 180 | uint8_t kind : 4; |
183 | } command; | 181 | } command; |
184 | struct action_function { | 182 | struct action_function { |
185 | uint8_t id :8; | 183 | uint8_t id : 8; |
186 | uint8_t opt :4; | 184 | uint8_t opt : 4; |
187 | uint8_t kind :4; | 185 | uint8_t kind : 4; |
188 | } func; | 186 | } func; |
189 | struct action_swap { | 187 | struct action_swap { |
190 | uint8_t code :8; | 188 | uint8_t code : 8; |
191 | uint8_t opt :4; | 189 | uint8_t opt : 4; |
192 | uint8_t kind :4; | 190 | uint8_t kind : 4; |
193 | } swap; | 191 | } swap; |
194 | } action_t; | 192 | } action_t; |
195 | 193 | ||
196 | |||
197 | /* action utility */ | 194 | /* action utility */ |
198 | #define ACTION_NO 0 | 195 | #define ACTION_NO 0 |
199 | #define ACTION_TRANSPARENT 1 | 196 | #define ACTION_TRANSPARENT 1 |
200 | #define ACTION(kind, param) ((kind)<<12 | (param)) | 197 | #define ACTION(kind, param) ((kind) << 12 | (param)) |
201 | |||
202 | 198 | ||
203 | /** \brief Key Actions | 199 | /** \brief Key Actions |
204 | * | 200 | * |
@@ -220,35 +216,29 @@ enum mods_bit { | |||
220 | MOD_RGUI = 0x18, | 216 | MOD_RGUI = 0x18, |
221 | }; | 217 | }; |
222 | enum mods_codes { | 218 | enum mods_codes { |
223 | MODS_ONESHOT = 0x00, | 219 | MODS_ONESHOT = 0x00, |
224 | MODS_TAP_TOGGLE = 0x01, | 220 | MODS_TAP_TOGGLE = 0x01, |
225 | }; | 221 | }; |
226 | #define ACTION_KEY(key) ACTION(ACT_MODS, (key)) | 222 | #define ACTION_KEY(key) ACTION(ACT_MODS, (key)) |
227 | #define ACTION_MODS(mods) ACTION(ACT_MODS, ((mods)&0x1f)<<8 | 0) | 223 | #define ACTION_MODS(mods) ACTION(ACT_MODS, ((mods)&0x1f) << 8 | 0) |
228 | #define ACTION_MODS_KEY(mods, key) ACTION(ACT_MODS, ((mods)&0x1f)<<8 | (key)) | 224 | #define ACTION_MODS_KEY(mods, key) ACTION(ACT_MODS, ((mods)&0x1f) << 8 | (key)) |
229 | #define ACTION_MODS_TAP_KEY(mods, key) ACTION(ACT_MODS_TAP, ((mods)&0x1f)<<8 | (key)) | 225 | #define ACTION_MODS_TAP_KEY(mods, key) ACTION(ACT_MODS_TAP, ((mods)&0x1f) << 8 | (key)) |
230 | #define ACTION_MODS_ONESHOT(mods) ACTION(ACT_MODS_TAP, ((mods)&0x1f)<<8 | MODS_ONESHOT) | 226 | #define ACTION_MODS_ONESHOT(mods) ACTION(ACT_MODS_TAP, ((mods)&0x1f) << 8 | MODS_ONESHOT) |
231 | #define ACTION_MODS_TAP_TOGGLE(mods) ACTION(ACT_MODS_TAP, ((mods)&0x1f)<<8 | MODS_TAP_TOGGLE) | 227 | #define ACTION_MODS_TAP_TOGGLE(mods) ACTION(ACT_MODS_TAP, ((mods)&0x1f) << 8 | MODS_TAP_TOGGLE) |
232 | |||
233 | 228 | ||
234 | /** \brief Other Keys | 229 | /** \brief Other Keys |
235 | */ | 230 | */ |
236 | enum usage_pages { | 231 | enum usage_pages { PAGE_SYSTEM, PAGE_CONSUMER }; |
237 | PAGE_SYSTEM, | 232 | #define ACTION_USAGE_SYSTEM(id) ACTION(ACT_USAGE, PAGE_SYSTEM << 10 | (id)) |
238 | PAGE_CONSUMER | 233 | #define ACTION_USAGE_CONSUMER(id) ACTION(ACT_USAGE, PAGE_CONSUMER << 10 | (id)) |
239 | }; | 234 | #define ACTION_MOUSEKEY(key) ACTION(ACT_MOUSEKEY, key) |
240 | #define ACTION_USAGE_SYSTEM(id) ACTION(ACT_USAGE, PAGE_SYSTEM<<10 | (id)) | ||
241 | #define ACTION_USAGE_CONSUMER(id) ACTION(ACT_USAGE, PAGE_CONSUMER<<10 | (id)) | ||
242 | #define ACTION_MOUSEKEY(key) ACTION(ACT_MOUSEKEY, key) | ||
243 | |||
244 | |||
245 | 235 | ||
246 | /** \brief Layer Actions | 236 | /** \brief Layer Actions |
247 | */ | 237 | */ |
248 | enum layer_param_on { | 238 | enum layer_param_on { |
249 | ON_PRESS = 1, | 239 | ON_PRESS = 1, |
250 | ON_RELEASE = 2, | 240 | ON_RELEASE = 2, |
251 | ON_BOTH = 3, | 241 | ON_BOTH = 3, |
252 | }; | 242 | }; |
253 | 243 | ||
254 | /** \brief Layer Actions | 244 | /** \brief Layer Actions |
@@ -269,37 +259,36 @@ enum layer_param_tap_op { | |||
269 | OP_SET_CLEAR, | 259 | OP_SET_CLEAR, |
270 | OP_ONESHOT, | 260 | OP_ONESHOT, |
271 | }; | 261 | }; |
272 | #define ACTION_LAYER_BITOP(op, part, bits, on) ACTION(ACT_LAYER, (op)<<10 | (on)<<8 | (part)<<5 | ((bits)&0x1f)) | 262 | #define ACTION_LAYER_BITOP(op, part, bits, on) ACTION(ACT_LAYER, (op) << 10 | (on) << 8 | (part) << 5 | ((bits)&0x1f)) |
273 | #define ACTION_LAYER_TAP(layer, key) ACTION(ACT_LAYER_TAP, (layer)<<8 | (key)) | 263 | #define ACTION_LAYER_TAP(layer, key) ACTION(ACT_LAYER_TAP, (layer) << 8 | (key)) |
274 | /* Default Layer */ | 264 | /* Default Layer */ |
275 | #define ACTION_DEFAULT_LAYER_SET(layer) ACTION_DEFAULT_LAYER_BIT_SET((layer)/4, 1<<((layer)%4)) | 265 | #define ACTION_DEFAULT_LAYER_SET(layer) ACTION_DEFAULT_LAYER_BIT_SET((layer) / 4, 1 << ((layer) % 4)) |
276 | /* Layer Operation */ | 266 | /* Layer Operation */ |
277 | #define ACTION_LAYER_CLEAR(on) ACTION_LAYER_BIT_AND(0, 0, (on)) | 267 | #define ACTION_LAYER_CLEAR(on) ACTION_LAYER_BIT_AND(0, 0, (on)) |
278 | #define ACTION_LAYER_MOMENTARY(layer) ACTION_LAYER_ON_OFF(layer) | 268 | #define ACTION_LAYER_MOMENTARY(layer) ACTION_LAYER_ON_OFF(layer) |
279 | #define ACTION_LAYER_TOGGLE(layer) ACTION_LAYER_INVERT(layer, ON_RELEASE) | 269 | #define ACTION_LAYER_TOGGLE(layer) ACTION_LAYER_INVERT(layer, ON_RELEASE) |
280 | #define ACTION_LAYER_INVERT(layer, on) ACTION_LAYER_BIT_XOR((layer)/4, 1<<((layer)%4), (on)) | 270 | #define ACTION_LAYER_INVERT(layer, on) ACTION_LAYER_BIT_XOR((layer) / 4, 1 << ((layer) % 4), (on)) |
281 | #define ACTION_LAYER_ON(layer, on) ACTION_LAYER_BIT_OR( (layer)/4, 1<<((layer)%4), (on)) | 271 | #define ACTION_LAYER_ON(layer, on) ACTION_LAYER_BIT_OR((layer) / 4, 1 << ((layer) % 4), (on)) |
282 | #define ACTION_LAYER_OFF(layer, on) ACTION_LAYER_BIT_AND((layer)/4, ~(1<<((layer)%4)), (on)) | 272 | #define ACTION_LAYER_OFF(layer, on) ACTION_LAYER_BIT_AND((layer) / 4, ~(1 << ((layer) % 4)), (on)) |
283 | #define ACTION_LAYER_SET(layer, on) ACTION_LAYER_BIT_SET((layer)/4, 1<<((layer)%4), (on)) | 273 | #define ACTION_LAYER_SET(layer, on) ACTION_LAYER_BIT_SET((layer) / 4, 1 << ((layer) % 4), (on)) |
284 | #define ACTION_LAYER_ON_OFF(layer) ACTION_LAYER_TAP((layer), OP_ON_OFF) | 274 | #define ACTION_LAYER_ON_OFF(layer) ACTION_LAYER_TAP((layer), OP_ON_OFF) |
285 | #define ACTION_LAYER_OFF_ON(layer) ACTION_LAYER_TAP((layer), OP_OFF_ON) | 275 | #define ACTION_LAYER_OFF_ON(layer) ACTION_LAYER_TAP((layer), OP_OFF_ON) |
286 | #define ACTION_LAYER_SET_CLEAR(layer) ACTION_LAYER_TAP((layer), OP_SET_CLEAR) | 276 | #define ACTION_LAYER_SET_CLEAR(layer) ACTION_LAYER_TAP((layer), OP_SET_CLEAR) |
287 | #define ACTION_LAYER_ONESHOT(layer) ACTION_LAYER_TAP((layer), OP_ONESHOT) | 277 | #define ACTION_LAYER_ONESHOT(layer) ACTION_LAYER_TAP((layer), OP_ONESHOT) |
288 | #define ACTION_LAYER_MODS(layer, mods) ACTION(ACT_LAYER_MODS, (layer) << 8 | (mods)) | 278 | #define ACTION_LAYER_MODS(layer, mods) ACTION(ACT_LAYER_MODS, (layer) << 8 | (mods)) |
289 | /* With Tapping */ | 279 | /* With Tapping */ |
290 | #define ACTION_LAYER_TAP_KEY(layer, key) ACTION_LAYER_TAP((layer), (key)) | 280 | #define ACTION_LAYER_TAP_KEY(layer, key) ACTION_LAYER_TAP((layer), (key)) |
291 | #define ACTION_LAYER_TAP_TOGGLE(layer) ACTION_LAYER_TAP((layer), OP_TAP_TOGGLE) | 281 | #define ACTION_LAYER_TAP_TOGGLE(layer) ACTION_LAYER_TAP((layer), OP_TAP_TOGGLE) |
292 | /* Bitwise Operation */ | 282 | /* Bitwise Operation */ |
293 | #define ACTION_LAYER_BIT_AND(part, bits, on) ACTION_LAYER_BITOP(OP_BIT_AND, (part), (bits), (on)) | 283 | #define ACTION_LAYER_BIT_AND(part, bits, on) ACTION_LAYER_BITOP(OP_BIT_AND, (part), (bits), (on)) |
294 | #define ACTION_LAYER_BIT_OR( part, bits, on) ACTION_LAYER_BITOP(OP_BIT_OR, (part), (bits), (on)) | 284 | #define ACTION_LAYER_BIT_OR(part, bits, on) ACTION_LAYER_BITOP(OP_BIT_OR, (part), (bits), (on)) |
295 | #define ACTION_LAYER_BIT_XOR(part, bits, on) ACTION_LAYER_BITOP(OP_BIT_XOR, (part), (bits), (on)) | 285 | #define ACTION_LAYER_BIT_XOR(part, bits, on) ACTION_LAYER_BITOP(OP_BIT_XOR, (part), (bits), (on)) |
296 | #define ACTION_LAYER_BIT_SET(part, bits, on) ACTION_LAYER_BITOP(OP_BIT_SET, (part), (bits), (on)) | 286 | #define ACTION_LAYER_BIT_SET(part, bits, on) ACTION_LAYER_BITOP(OP_BIT_SET, (part), (bits), (on)) |
297 | /* Default Layer Bitwise Operation */ | 287 | /* Default Layer Bitwise Operation */ |
298 | #define ACTION_DEFAULT_LAYER_BIT_AND(part, bits) ACTION_LAYER_BITOP(OP_BIT_AND, (part), (bits), 0) | 288 | #define ACTION_DEFAULT_LAYER_BIT_AND(part, bits) ACTION_LAYER_BITOP(OP_BIT_AND, (part), (bits), 0) |
299 | #define ACTION_DEFAULT_LAYER_BIT_OR( part, bits) ACTION_LAYER_BITOP(OP_BIT_OR, (part), (bits), 0) | 289 | #define ACTION_DEFAULT_LAYER_BIT_OR(part, bits) ACTION_LAYER_BITOP(OP_BIT_OR, (part), (bits), 0) |
300 | #define ACTION_DEFAULT_LAYER_BIT_XOR(part, bits) ACTION_LAYER_BITOP(OP_BIT_XOR, (part), (bits), 0) | 290 | #define ACTION_DEFAULT_LAYER_BIT_XOR(part, bits) ACTION_LAYER_BITOP(OP_BIT_XOR, (part), (bits), 0) |
301 | #define ACTION_DEFAULT_LAYER_BIT_SET(part, bits) ACTION_LAYER_BITOP(OP_BIT_SET, (part), (bits), 0) | 291 | #define ACTION_DEFAULT_LAYER_BIT_SET(part, bits) ACTION_LAYER_BITOP(OP_BIT_SET, (part), (bits), 0) |
302 | |||
303 | 292 | ||
304 | /** \brief Extensions | 293 | /** \brief Extensions |
305 | */ | 294 | */ |
@@ -313,25 +302,25 @@ enum backlight_opt { | |||
313 | }; | 302 | }; |
314 | 303 | ||
315 | /* Macro */ | 304 | /* Macro */ |
316 | #define ACTION_MACRO(id) ACTION(ACT_MACRO, (id)) | 305 | #define ACTION_MACRO(id) ACTION(ACT_MACRO, (id)) |
317 | #define ACTION_MACRO_TAP(id) ACTION(ACT_MACRO, FUNC_TAP<<8 | (id)) | 306 | #define ACTION_MACRO_TAP(id) ACTION(ACT_MACRO, FUNC_TAP << 8 | (id)) |
318 | #define ACTION_MACRO_OPT(id, opt) ACTION(ACT_MACRO, (opt)<<8 | (id)) | 307 | #define ACTION_MACRO_OPT(id, opt) ACTION(ACT_MACRO, (opt) << 8 | (id)) |
319 | /* Backlight */ | 308 | /* Backlight */ |
320 | #define ACTION_BACKLIGHT_INCREASE() ACTION(ACT_BACKLIGHT, BACKLIGHT_INCREASE << 8) | 309 | #define ACTION_BACKLIGHT_INCREASE() ACTION(ACT_BACKLIGHT, BACKLIGHT_INCREASE << 8) |
321 | #define ACTION_BACKLIGHT_DECREASE() ACTION(ACT_BACKLIGHT, BACKLIGHT_DECREASE << 8) | 310 | #define ACTION_BACKLIGHT_DECREASE() ACTION(ACT_BACKLIGHT, BACKLIGHT_DECREASE << 8) |
322 | #define ACTION_BACKLIGHT_TOGGLE() ACTION(ACT_BACKLIGHT, BACKLIGHT_TOGGLE << 8) | 311 | #define ACTION_BACKLIGHT_TOGGLE() ACTION(ACT_BACKLIGHT, BACKLIGHT_TOGGLE << 8) |
323 | #define ACTION_BACKLIGHT_STEP() ACTION(ACT_BACKLIGHT, BACKLIGHT_STEP << 8) | 312 | #define ACTION_BACKLIGHT_STEP() ACTION(ACT_BACKLIGHT, BACKLIGHT_STEP << 8) |
324 | #define ACTION_BACKLIGHT_ON() ACTION(ACT_BACKLIGHT, BACKLIGHT_ON << 8) | 313 | #define ACTION_BACKLIGHT_ON() ACTION(ACT_BACKLIGHT, BACKLIGHT_ON << 8) |
325 | #define ACTION_BACKLIGHT_OFF() ACTION(ACT_BACKLIGHT, BACKLIGHT_OFF << 8) | 314 | #define ACTION_BACKLIGHT_OFF() ACTION(ACT_BACKLIGHT, BACKLIGHT_OFF << 8) |
326 | /* Command */ | 315 | /* Command */ |
327 | #define ACTION_COMMAND(id, opt) ACTION(ACT_COMMAND, (opt)<<8 | (id)) | 316 | #define ACTION_COMMAND(id, opt) ACTION(ACT_COMMAND, (opt) << 8 | (id)) |
328 | /* Function */ | 317 | /* Function */ |
329 | enum function_opts { | 318 | enum function_opts { |
330 | FUNC_TAP = 0x8, /* indciates function is tappable */ | 319 | FUNC_TAP = 0x8, /* indciates function is tappable */ |
331 | }; | 320 | }; |
332 | #define ACTION_FUNCTION(id) ACTION(ACT_FUNCTION, (id)) | 321 | #define ACTION_FUNCTION(id) ACTION(ACT_FUNCTION, (id)) |
333 | #define ACTION_FUNCTION_TAP(id) ACTION(ACT_FUNCTION, FUNC_TAP<<8 | (id)) | 322 | #define ACTION_FUNCTION_TAP(id) ACTION(ACT_FUNCTION, FUNC_TAP << 8 | (id)) |
334 | #define ACTION_FUNCTION_OPT(id, opt) ACTION(ACT_FUNCTION, (opt)<<8 | (id)) | 323 | #define ACTION_FUNCTION_OPT(id, opt) ACTION(ACT_FUNCTION, (opt) << 8 | (id)) |
335 | /* OneHand Support */ | 324 | /* OneHand Support */ |
336 | enum swap_hands_param_tap_op { | 325 | enum swap_hands_param_tap_op { |
337 | OP_SH_TOGGLE = 0xF0, | 326 | OP_SH_TOGGLE = 0xF0, |
@@ -342,13 +331,13 @@ enum swap_hands_param_tap_op { | |||
342 | OP_SH_ON, | 331 | OP_SH_ON, |
343 | }; | 332 | }; |
344 | 333 | ||
345 | #define ACTION_SWAP_HANDS() ACTION_SWAP_HANDS_ON_OFF() | 334 | #define ACTION_SWAP_HANDS() ACTION_SWAP_HANDS_ON_OFF() |
346 | #define ACTION_SWAP_HANDS_TOGGLE() ACTION(ACT_SWAP_HANDS, OP_SH_TOGGLE) | 335 | #define ACTION_SWAP_HANDS_TOGGLE() ACTION(ACT_SWAP_HANDS, OP_SH_TOGGLE) |
347 | #define ACTION_SWAP_HANDS_TAP_TOGGLE() ACTION(ACT_SWAP_HANDS, OP_SH_TAP_TOGGLE) | 336 | #define ACTION_SWAP_HANDS_TAP_TOGGLE() ACTION(ACT_SWAP_HANDS, OP_SH_TAP_TOGGLE) |
348 | #define ACTION_SWAP_HANDS_TAP_KEY(key) ACTION(ACT_SWAP_HANDS, key) | 337 | #define ACTION_SWAP_HANDS_TAP_KEY(key) ACTION(ACT_SWAP_HANDS, key) |
349 | #define ACTION_SWAP_HANDS_ON_OFF() ACTION(ACT_SWAP_HANDS, OP_SH_ON_OFF) | 338 | #define ACTION_SWAP_HANDS_ON_OFF() ACTION(ACT_SWAP_HANDS, OP_SH_ON_OFF) |
350 | #define ACTION_SWAP_HANDS_OFF_ON() ACTION(ACT_SWAP_HANDS, OP_SH_OFF_ON) | 339 | #define ACTION_SWAP_HANDS_OFF_ON() ACTION(ACT_SWAP_HANDS, OP_SH_OFF_ON) |
351 | #define ACTION_SWAP_HANDS_ON() ACTION(ACT_SWAP_HANDS, OP_SH_ON) | 340 | #define ACTION_SWAP_HANDS_ON() ACTION(ACT_SWAP_HANDS, OP_SH_ON) |
352 | #define ACTION_SWAP_HANDS_OFF() ACTION(ACT_SWAP_HANDS, OP_SH_OFF) | 341 | #define ACTION_SWAP_HANDS_OFF() ACTION(ACT_SWAP_HANDS, OP_SH_OFF) |
353 | 342 | ||
354 | #endif /* ACTION_CODE_H */ | 343 | #endif /* ACTION_CODE_H */ |