1 // Written by konstantin: vomindoraan
2 #include "send_unicode.h"
7 void send_unicode_hex_string(const char* str) {
8 if (!str) { return; } // Safety net
11 // Find the next code point (token) in the string
12 for (; *str == ' '; str++);
13 size_t n = strcspn(str, " "); // Length of the current token
15 strncpy(code_point, str, n);
16 code_point[n] = '\0'; // Make sure it's null-terminated
18 // Normalize the code point: make all hex digits lowercase
19 for (char *p = code_point; *p; p++) {
20 *p = tolower((unsigned char)*p);
23 // Send the code point as a Unicode input string
24 unicode_input_start();
25 send_string(code_point);
26 unicode_input_finish();
28 str += n; // Move to the first ' ' (or '\0') after the current token
33 // send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B");
38 register_code(KC_RSFT);
40 unregister_code(KC_RSFT);
41 process_unicode((0x256F | QK_UNICODE), record); // Arm
42 process_unicode((0x00B0 | QK_UNICODE), record); // Eye
43 process_unicode((0x25A1 | QK_UNICODE), record); // Mouth
44 process_unicode((0x00B0 | QK_UNICODE), record); // Eye
45 register_code(KC_RSFT);
47 unregister_code(KC_RSFT);
48 process_unicode((0x256F | QK_UNICODE), record); // Arm
50 process_unicode((0x0361 | QK_UNICODE), record); // Flippy
52 process_unicode((0x253B | QK_UNICODE), record); // Table
53 process_unicode((0x2501 | QK_UNICODE), record); // Table
54 process_unicode((0x253B | QK_UNICODE), record); // Table
58 // If you need a good converter: https://r12a.github.io/app-conversion/