aboutsummaryrefslogtreecommitdiff
path: root/tmk_core/common/action.h
diff options
context:
space:
mode:
Diffstat (limited to 'tmk_core/common/action.h')
-rw-r--r--tmk_core/common/action.h37
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
29extern "C" { 28extern "C" {
30#endif 29#endif
31 30
32/* tapping count and state */ 31/* tapping count and state */
33typedef struct { 32typedef 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 */
42typedef struct { 41typedef 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
71extern bool swap_hands; 70extern bool swap_hands;
72extern const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS]; 71extern const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS];
73#if (MATRIX_COLS <= 8) 72# if (MATRIX_COLS <= 8)
74typedef uint8_t swap_state_row_t; 73typedef uint8_t swap_state_row_t;
75#elif (MATRIX_COLS <= 16) 74# elif (MATRIX_COLS <= 16)
76typedef uint16_t swap_state_row_t; 75typedef uint16_t swap_state_row_t;
77#elif (MATRIX_COLS <= 32) 76# elif (MATRIX_COLS <= 32)
78typedef uint32_t swap_state_row_t; 77typedef 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
83void process_hand_swap(keyevent_t *record); 82void process_hand_swap(keyevent_t *record);
84#endif 83#endif
@@ -91,7 +90,7 @@ void unregister_code(uint8_t code);
91void tap_code(uint8_t code); 90void tap_code(uint8_t code);
92void register_mods(uint8_t mods); 91void register_mods(uint8_t mods);
93void unregister_mods(uint8_t mods); 92void unregister_mods(uint8_t mods);
94//void set_mods(uint8_t mods); 93// void set_mods(uint8_t mods);
95void clear_keyboard(void); 94void clear_keyboard(void);
96void clear_keyboard_but_mods(void); 95void clear_keyboard_but_mods(void);
97void clear_keyboard_but_mods_and_keys(void); 96void 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 */