diff options
| author | Xyverz <xyverz@gmail.com> | 2017-02-20 23:54:09 -0800 |
|---|---|---|
| committer | Xyverz <xyverz@gmail.com> | 2017-02-20 23:54:09 -0800 |
| commit | bf6f7a623dbe4e3bba4bcc6d86ac28b842226825 (patch) | |
| tree | 59ce47b0d4b21a2606e1f6d367317af8bdbd06ae /quantum/process_keycode/process_ucis.h | |
| parent | ca1ec7b121c973fae614e69093f40ee9ba25e629 (diff) | |
| parent | 7ff41df32c29bca4e3a6efc3047b8fa93bb99b92 (diff) | |
| download | qmk_firmware-bf6f7a623dbe4e3bba4bcc6d86ac28b842226825.tar.gz qmk_firmware-bf6f7a623dbe4e3bba4bcc6d86ac28b842226825.zip | |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'quantum/process_keycode/process_ucis.h')
| -rw-r--r-- | quantum/process_keycode/process_ucis.h | 35 |
1 files changed, 35 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..4332f57b3 --- /dev/null +++ b/quantum/process_keycode/process_ucis.h | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | #ifndef PROCESS_UCIS_H | ||
| 2 | #define PROCESS_UCIS_H | ||
| 3 | |||
| 4 | #include "quantum.h" | ||
| 5 | #include "process_unicode_common.h" | ||
| 6 | |||
| 7 | #ifndef UCIS_MAX_SYMBOL_LENGTH | ||
| 8 | #define UCIS_MAX_SYMBOL_LENGTH 32 | ||
| 9 | #endif | ||
| 10 | |||
| 11 | typedef struct { | ||
| 12 | char *symbol; | ||
| 13 | char *code; | ||
| 14 | } qk_ucis_symbol_t; | ||
| 15 | |||
| 16 | typedef struct { | ||
| 17 | uint8_t count; | ||
| 18 | uint16_t codes[UCIS_MAX_SYMBOL_LENGTH]; | ||
| 19 | bool in_progress:1; | ||
| 20 | } qk_ucis_state_t; | ||
| 21 | |||
| 22 | extern qk_ucis_state_t qk_ucis_state; | ||
| 23 | |||
| 24 | #define UCIS_TABLE(...) {__VA_ARGS__, {NULL, NULL}} | ||
| 25 | #define UCIS_SYM(name, code) {name, #code} | ||
| 26 | |||
| 27 | extern const qk_ucis_symbol_t ucis_symbol_table[]; | ||
| 28 | |||
| 29 | void qk_ucis_start(void); | ||
| 30 | void qk_ucis_start_user(void); | ||
| 31 | void qk_ucis_symbol_fallback (void); | ||
| 32 | void register_ucis(const char *hex); | ||
| 33 | bool process_ucis (uint16_t keycode, keyrecord_t *record); | ||
| 34 | |||
| 35 | #endif | ||
