Kaleidoscope
MacroSteps.h
Go to the documentation of this file.
1 #pragma once
2 
3 typedef enum {
5 
8 
12 
17 
18 typedef uint8_t macro_t;
19 
20 #define MACRO_NONE 0
21 #define MACRO(...) ({static const macro_t __m[] PROGMEM = { __VA_ARGS__, MACRO_ACTION_END }; &__m[0]; })
22 #define MACRODOWN(...) (keyToggledOn(keyState) ? MACRO(__VA_ARGS__) : MACRO_NONE)
23 
24 #define I(n) MACRO_ACTION_STEP_INTERVAL, n
25 #define W(n) MACRO_ACTION_STEP_WAIT, n
26 
27 #define Dr(k) MACRO_ACTION_STEP_KEYDOWN, (k).flags, (k).keyCode
28 #define D(k) Dr(Key_ ## k)
29 #define Ur(k) MACRO_ACTION_STEP_KEYUP, (k).flags, (k).keyCode
30 #define U(k) Ur(Key_ ## k)
31 #define Tr(k) MACRO_ACTION_STEP_TAP, (k).flags, (k).keyCode
32 #define T(k) Tr(Key_ ## k)
33 
34 #define Dc(k) MACRO_ACTION_STEP_KEYCODEDOWN, (Key_ ## k).keyCode
35 #define Uc(k) MACRO_ACTION_STEP_KEYCODEUP, (Key_ ## k).keyCode
36 #define Tc(k) MACRO_ACTION_STEP_TAPCODE, (Key_ ## k).keyCode
37 
38 #define END MACRO_ACTION_END
Definition: MacroSteps.h:7
Definition: MacroSteps.h:10
uint8_t macro_t
Definition: MacroSteps.h:18
Definition: MacroSteps.h:9
MacroActionStepType
Definition: MacroSteps.h:3
Definition: MacroSteps.h:15
Definition: MacroSteps.h:13
Definition: MacroSteps.h:14
Definition: MacroSteps.h:11
Definition: MacroSteps.h:6
Definition: MacroSteps.h:4