aboutsummaryrefslogtreecommitdiffstats
path: root/quantum/process_keycode/process_unicodemap.c
diff options
context:
space:
mode:
Diffstat (limited to 'quantum/process_keycode/process_unicodemap.c')
-rw-r--r--quantum/process_keycode/process_unicodemap.c21
1 files changed, 2 insertions, 19 deletions
diff --git a/quantum/process_keycode/process_unicodemap.c b/quantum/process_keycode/process_unicodemap.c
index 2f402a2fd..789a90445 100644
--- a/quantum/process_keycode/process_unicodemap.c
+++ b/quantum/process_keycode/process_unicodemap.c
@@ -36,25 +36,8 @@ __attribute__((weak)) uint16_t unicodemap_index(uint16_t keycode) {
bool process_unicodemap(uint16_t keycode, keyrecord_t *record) {
if (keycode >= QK_UNICODEMAP && keycode <= QK_UNICODEMAP_PAIR_MAX && record->event.pressed) {
- unicode_input_start();
-
- uint32_t code = pgm_read_dword(unicode_map + unicodemap_index(keycode));
- uint8_t input_mode = get_unicode_input_mode();
-
- if (code > 0x10FFFF || (code > 0xFFFF && input_mode == UC_WIN)) {
- // Character is out of range supported by the platform
- unicode_input_cancel();
- } else if (code > 0xFFFF && input_mode == UC_MAC) {
- // Convert to UTF-16 surrogate pair on Mac
- code -= 0x10000;
- uint32_t lo = code & 0x3FF, hi = (code & 0xFFC00) >> 10;
- register_hex32(hi + 0xD800);
- register_hex32(lo + 0xDC00);
- unicode_input_finish();
- } else {
- register_hex32(code);
- unicode_input_finish();
- }
+ uint32_t code_point = pgm_read_dword(unicode_map + unicodemap_index(keycode));
+ register_unicode(code_point);
}
return true;
}