diff options
| author | Jason Janse van Rensburg <l33tjas.0n@gmail.com> | 2016-08-30 14:54:00 +0200 |
|---|---|---|
| committer | Jason Janse van Rensburg <l33tjas.0n@gmail.com> | 2016-08-30 14:54:00 +0200 |
| commit | fc2ca62a3b9552175eb7c27cc11f3a5af6cfae50 (patch) | |
| tree | 59b2f2406f472a9fd2af4946420d1a1c880929c0 /quantum/process_keycode/process_unicode.h | |
| parent | a41a7a9100b9f4c6bfdf49b39b05e626ffd95397 (diff) | |
| parent | 8e00c464e6f488d86e0768a77a2ad5ee238dba6d (diff) | |
| download | qmk_firmware-fc2ca62a3b9552175eb7c27cc11f3a5af6cfae50.tar.gz qmk_firmware-fc2ca62a3b9552175eb7c27cc11f3a5af6cfae50.zip | |
Merge branch 'master'
Conflicts:
keyboards/planck/keymaps/bone2planck/keymap.c
Diffstat (limited to 'quantum/process_keycode/process_unicode.h')
| -rw-r--r-- | quantum/process_keycode/process_unicode.h | 40 |
1 files changed, 39 insertions, 1 deletions
diff --git a/quantum/process_keycode/process_unicode.h b/quantum/process_keycode/process_unicode.h index ca17f8f66..02ce3dd7e 100644 --- a/quantum/process_keycode/process_unicode.h +++ b/quantum/process_keycode/process_unicode.h | |||
| @@ -8,10 +8,48 @@ | |||
| 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 | typedef struct { | ||
| 33 | uint8_t count; | ||
| 34 | uint16_t codes[UCIS_MAX_SYMBOL_LENGTH]; | ||
| 35 | bool in_progress:1; | ||
| 36 | } qk_ucis_state_t; | ||
| 37 | |||
| 38 | extern qk_ucis_state_t qk_ucis_state; | ||
| 39 | |||
| 40 | #define UCIS_TABLE(...) {__VA_ARGS__, {NULL, NULL}} | ||
| 41 | #define UCIS_SYM(name, code) {name, #code} | ||
| 42 | |||
| 43 | extern const qk_ucis_symbol_t ucis_symbol_table[]; | ||
| 44 | |||
| 45 | void qk_ucis_start(void); | ||
| 46 | void qk_ucis_start_user(void); | ||
| 47 | void qk_ucis_symbol_fallback (void); | ||
| 48 | void register_ucis(const char *hex); | ||
| 49 | bool process_ucis (uint16_t keycode, keyrecord_t *record); | ||
| 50 | |||
| 51 | #endif | ||
| 52 | |||
| 15 | #define UC_BSPC UC(0x0008) | 53 | #define UC_BSPC UC(0x0008) |
| 16 | 54 | ||
| 17 | #define UC_SPC UC(0x0020) | 55 | #define UC_SPC UC(0x0020) |
| @@ -119,4 +157,4 @@ bool process_unicode(uint16_t keycode, keyrecord_t *record); | |||
| 119 | #define UC_TILD UC(0x007E) | 157 | #define UC_TILD UC(0x007E) |
| 120 | #define UC_DEL UC(0x007F) | 158 | #define UC_DEL UC(0x007F) |
| 121 | 159 | ||
| 122 | #endif \ No newline at end of file | 160 | #endif |
