diff options
Diffstat (limited to 'quantum/process_keycode/process_ucis.h')
| -rw-r--r-- | quantum/process_keycode/process_ucis.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/quantum/process_keycode/process_ucis.h b/quantum/process_keycode/process_ucis.h new file mode 100644 index 000000000..520db8042 --- /dev/null +++ b/quantum/process_keycode/process_ucis.h | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | #ifndef PROCESS_UCIS_H | ||
| 2 | #define PROCESS_UCIS_H | ||
| 3 | |||
| 4 | #include "quantum.h" | ||
| 5 | |||
| 6 | #ifndef UCIS_MAX_SYMBOL_LENGTH | ||
| 7 | #define UCIS_MAX_SYMBOL_LENGTH 32 | ||
| 8 | #endif | ||
| 9 | |||
| 10 | typedef struct { | ||
| 11 | char *symbol; | ||
| 12 | char *code; | ||
| 13 | } qk_ucis_symbol_t; | ||
| 14 | |||
| 15 | typedef struct { | ||
| 16 | uint8_t count; | ||
| 17 | uint16_t codes[UCIS_MAX_SYMBOL_LENGTH]; | ||
| 18 | bool in_progress:1; | ||
| 19 | } qk_ucis_state_t; | ||
| 20 | |||
| 21 | extern qk_ucis_state_t qk_ucis_state; | ||
| 22 | |||
| 23 | #define UCIS_TABLE(...) {__VA_ARGS__, {NULL, NULL}} | ||
| 24 | #define UCIS_SYM(name, code) {name, #code} | ||
| 25 | |||
| 26 | extern const qk_ucis_symbol_t ucis_symbol_table[]; | ||
| 27 | |||
| 28 | void qk_ucis_start(void); | ||
| 29 | void qk_ucis_start_user(void); | ||
| 30 | void qk_ucis_symbol_fallback (void); | ||
| 31 | void register_ucis(const char *hex); | ||
| 32 | bool process_ucis (uint16_t keycode, keyrecord_t *record); | ||
| 33 | |||
| 34 | #endif | ||
