diff options
author | Ryan <fauxpark@gmail.com> | 2023-08-27 16:51:19 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-27 16:51:19 +1000 |
commit | 66b744b63b6328a206f9ab463b4acb44002e4bb0 (patch) | |
tree | 8a5d4a8b4222301ec9145a4bbd799cc72e33de41 /users/rupa | |
parent | 70e34e491c297231a3f987fd69760d38e79dbfa4 (diff) |
Clean up Unicode API usage in user keymaps (#21849)
Diffstat (limited to 'users/rupa')
-rw-r--r-- | users/rupa/unicode.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/users/rupa/unicode.c b/users/rupa/unicode.c index f99e6d0832..56b4509813 100644 --- a/users/rupa/unicode.c +++ b/users/rupa/unicode.c @@ -125,12 +125,14 @@ bool u_xp(bool is_shifted, const char *shifted, const char *plain) { }; void zalgo(void) { + unicode_input_start(); int number = (rand() % (8 + 1 - 2)) + 2; unsigned int index; for (index=0; index<number; index++) { uint16_t hex = (rand() % (0x036F + 1 - 0x0300)) + 0x0300; register_hex(hex); } + unicode_input_finish(); } bool combined_text(uint16_t keycode) { @@ -138,16 +140,16 @@ bool combined_text(uint16_t keycode) { return false; } tap_code(keycode); - unicode_input_start(); + switch (combined_mode) { case CM_CIRCLE: - register_hex(0x20DD); + register_unicode(0x20DD); break; case CM_NO: - register_hex(0x20E0); + register_unicode(0x20E0); break; case CM_KEYCAP: - register_hex(0x20E3); + register_unicode(0x20E3); break; case CM_ZALGO: zalgo(); @@ -155,7 +157,6 @@ bool combined_text(uint16_t keycode) { default: break; } - unicode_input_finish(); return true; } |