diff options
Diffstat (limited to 'quantum/process_keycode/process_unicode.h')
| -rw-r--r-- | quantum/process_keycode/process_unicode.h | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/quantum/process_keycode/process_unicode.h b/quantum/process_keycode/process_unicode.h index ca17f8f66..85364e8eb 100644 --- a/quantum/process_keycode/process_unicode.h +++ b/quantum/process_keycode/process_unicode.h | |||
| @@ -8,10 +8,46 @@ | |||
| 8 | #define UC_WIN 2 | 8 | #define UC_WIN 2 |
| 9 | #define UC_BSD 3 | 9 | #define UC_BSD 3 |
| 10 | 10 | ||
| 11 | #ifndef UNICODE_TYPE_DELAY | ||
| 12 | #define UNICODE_TYPE_DELAY 10 | ||
| 13 | #endif | ||
| 14 | |||
| 11 | void set_unicode_input_mode(uint8_t os_target); | 15 | void set_unicode_input_mode(uint8_t os_target); |
| 16 | void unicode_input_start(void); | ||
| 17 | void unicode_input_finish(void); | ||
| 18 | void register_hex(uint16_t hex); | ||
| 12 | 19 | ||
| 13 | bool process_unicode(uint16_t keycode, keyrecord_t *record); | 20 | bool process_unicode(uint16_t keycode, keyrecord_t *record); |
| 14 | 21 | ||
| 22 | #ifdef UCIS_ENABLE | ||
| 23 | #ifndef UCIS_MAX_SYMBOL_LENGTH | ||
| 24 | #define UCIS_MAX_SYMBOL_LENGTH 32 | ||
| 25 | #endif | ||
| 26 | |||
| 27 | typedef struct { | ||
| 28 | char *symbol; | ||
| 29 | char *code; | ||
| 30 | } qk_ucis_symbol_t; | ||
| 31 | |||
| 32 | struct { | ||
| 33 | uint8_t count; | ||
| 34 | uint16_t codes[UCIS_MAX_SYMBOL_LENGTH]; | ||
| 35 | bool in_progress:1; | ||
| 36 | } qk_ucis_state; | ||
| 37 | |||
| 38 | #define UCIS_TABLE(...) {__VA_ARGS__, {NULL, NULL}} | ||
| 39 | #define UCIS_SYM(name, code) {name, #code} | ||
| 40 | |||
| 41 | extern const qk_ucis_symbol_t ucis_symbol_table[]; | ||
| 42 | |||
| 43 | void qk_ucis_start(void); | ||
| 44 | void qk_ucis_start_user(void); | ||
| 45 | void qk_ucis_symbol_fallback (void); | ||
| 46 | void register_ucis(const char *hex); | ||
| 47 | bool process_ucis (uint16_t keycode, keyrecord_t *record); | ||
| 48 | |||
| 49 | #endif | ||
| 50 | |||
| 15 | #define UC_BSPC UC(0x0008) | 51 | #define UC_BSPC UC(0x0008) |
| 16 | 52 | ||
| 17 | #define UC_SPC UC(0x0020) | 53 | #define UC_SPC UC(0x0020) |
| @@ -119,4 +155,4 @@ bool process_unicode(uint16_t keycode, keyrecord_t *record); | |||
| 119 | #define UC_TILD UC(0x007E) | 155 | #define UC_TILD UC(0x007E) |
| 120 | #define UC_DEL UC(0x007F) | 156 | #define UC_DEL UC(0x007F) |
| 121 | 157 | ||
| 122 | #endif \ No newline at end of file | 158 | #endif |
