diff options
Diffstat (limited to 'tmk_core/common/action.h')
-rw-r--r-- | tmk_core/common/action.h | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/tmk_core/common/action.h b/tmk_core/common/action.h index 799e3bb0e..633cedb06 100644 --- a/tmk_core/common/action.h +++ b/tmk_core/common/action.h | |||
@@ -24,23 +24,22 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
24 | #include "action_code.h" | 24 | #include "action_code.h" |
25 | #include "action_macro.h" | 25 | #include "action_macro.h" |
26 | 26 | ||
27 | |||
28 | #ifdef __cplusplus | 27 | #ifdef __cplusplus |
29 | extern "C" { | 28 | extern "C" { |
30 | #endif | 29 | #endif |
31 | 30 | ||
32 | /* tapping count and state */ | 31 | /* tapping count and state */ |
33 | typedef struct { | 32 | typedef struct { |
34 | bool interrupted :1; | 33 | bool interrupted : 1; |
35 | bool reserved2 :1; | 34 | bool reserved2 : 1; |
36 | bool reserved1 :1; | 35 | bool reserved1 : 1; |
37 | bool reserved0 :1; | 36 | bool reserved0 : 1; |
38 | uint8_t count :4; | 37 | uint8_t count : 4; |
39 | } tap_t; | 38 | } tap_t; |
40 | 39 | ||
41 | /* Key event container for recording */ | 40 | /* Key event container for recording */ |
42 | typedef struct { | 41 | typedef struct { |
43 | keyevent_t event; | 42 | keyevent_t event; |
44 | #ifndef NO_ACTION_TAPPING | 43 | #ifndef NO_ACTION_TAPPING |
45 | tap_t tap; | 44 | tap_t tap; |
46 | #endif | 45 | #endif |
@@ -68,17 +67,17 @@ extern bool disable_action_cache; | |||
68 | 67 | ||
69 | /* Code for handling one-handed key modifiers. */ | 68 | /* Code for handling one-handed key modifiers. */ |
70 | #ifdef SWAP_HANDS_ENABLE | 69 | #ifdef SWAP_HANDS_ENABLE |
71 | extern bool swap_hands; | 70 | extern bool swap_hands; |
72 | extern const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS]; | 71 | extern const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS]; |
73 | #if (MATRIX_COLS <= 8) | 72 | # if (MATRIX_COLS <= 8) |
74 | typedef uint8_t swap_state_row_t; | 73 | typedef uint8_t swap_state_row_t; |
75 | #elif (MATRIX_COLS <= 16) | 74 | # elif (MATRIX_COLS <= 16) |
76 | typedef uint16_t swap_state_row_t; | 75 | typedef uint16_t swap_state_row_t; |
77 | #elif (MATRIX_COLS <= 32) | 76 | # elif (MATRIX_COLS <= 32) |
78 | typedef uint32_t swap_state_row_t; | 77 | typedef uint32_t swap_state_row_t; |
79 | #else | 78 | # else |
80 | #error "MATRIX_COLS: invalid value" | 79 | # error "MATRIX_COLS: invalid value" |
81 | #endif | 80 | # endif |
82 | 81 | ||
83 | void process_hand_swap(keyevent_t *record); | 82 | void process_hand_swap(keyevent_t *record); |
84 | #endif | 83 | #endif |
@@ -91,7 +90,7 @@ void unregister_code(uint8_t code); | |||
91 | void tap_code(uint8_t code); | 90 | void tap_code(uint8_t code); |
92 | void register_mods(uint8_t mods); | 91 | void register_mods(uint8_t mods); |
93 | void unregister_mods(uint8_t mods); | 92 | void unregister_mods(uint8_t mods); |
94 | //void set_mods(uint8_t mods); | 93 | // void set_mods(uint8_t mods); |
95 | void clear_keyboard(void); | 94 | void clear_keyboard(void); |
96 | void clear_keyboard_but_mods(void); | 95 | void clear_keyboard_but_mods(void); |
97 | void clear_keyboard_but_mods_and_keys(void); | 96 | void clear_keyboard_but_mods_and_keys(void); |
@@ -112,4 +111,4 @@ void debug_action(action_t action); | |||
112 | } | 111 | } |
113 | #endif | 112 | #endif |
114 | 113 | ||
115 | #endif /* ACTION_H */ | 114 | #endif /* ACTION_H */ |