diff options
Diffstat (limited to 'quantum/process_keycode/process_unicode.c')
-rw-r--r-- | quantum/process_keycode/process_unicode.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/quantum/process_keycode/process_unicode.c b/quantum/process_keycode/process_unicode.c index c474483e7..698cc3c02 100644 --- a/quantum/process_keycode/process_unicode.c +++ b/quantum/process_keycode/process_unicode.c | |||
@@ -60,6 +60,14 @@ void register_hex(uint16_t hex) { | |||
60 | } | 60 | } |
61 | } | 61 | } |
62 | 62 | ||
63 | void register_hex32(uint32_t hex) { | ||
64 | for(int i = 7; i >= 0; i--) { | ||
65 | uint8_t digit = ((hex >> (i*8)) & 0xF); | ||
66 | register_code(hex_to_keycode(digit)); | ||
67 | unregister_code(hex_to_keycode(digit)); | ||
68 | } | ||
69 | } | ||
70 | |||
63 | bool process_unicode(uint16_t keycode, keyrecord_t *record) { | 71 | bool process_unicode(uint16_t keycode, keyrecord_t *record) { |
64 | if (keycode > QK_UNICODE && record->event.pressed) { | 72 | if (keycode > QK_UNICODE && record->event.pressed) { |
65 | uint16_t unicode = keycode & 0x7FFF; | 73 | uint16_t unicode = keycode & 0x7FFF; |
@@ -156,9 +164,7 @@ bool process_ucis (uint16_t keycode, keyrecord_t *record) { | |||
156 | for (i = 0; ucis_symbol_table[i].symbol; i++) { | 164 | for (i = 0; ucis_symbol_table[i].symbol; i++) { |
157 | if (is_uni_seq (ucis_symbol_table[i].symbol)) { | 165 | if (is_uni_seq (ucis_symbol_table[i].symbol)) { |
158 | symbol_found = true; | 166 | symbol_found = true; |
159 | for (uint8_t j = 0; ucis_symbol_table[i].codes[j]; j++) { | 167 | register_hex32(ucis_symbol_table[i].code); |
160 | register_hex(ucis_symbol_table[i].codes[j]); | ||
161 | } | ||
162 | break; | 168 | break; |
163 | } | 169 | } |
164 | } | 170 | } |