}
}
+void register_hex32(uint32_t hex) {
+ for(int i = 7; i >= 0; i--) {
+ uint8_t digit = ((hex >> (i*8)) & 0xF);
+ register_code(hex_to_keycode(digit));
+ unregister_code(hex_to_keycode(digit));
+ }
+}
+
bool process_unicode(uint16_t keycode, keyrecord_t *record) {
if (keycode > QK_UNICODE && record->event.pressed) {
uint16_t unicode = keycode & 0x7FFF;
for (i = 0; ucis_symbol_table[i].symbol; i++) {
if (is_uni_seq (ucis_symbol_table[i].symbol)) {
symbol_found = true;
- for (uint8_t j = 0; ucis_symbol_table[i].codes[j]; j++) {
- register_hex(ucis_symbol_table[i].codes[j]);
- }
+ register_hex32(ucis_symbol_table[i].code);
break;
}
}
void unicode_input_start(void);
void unicode_input_finish(void);
void register_hex(uint16_t hex);
+void register_hex32(uint32_t hex);
bool process_unicode(uint16_t keycode, keyrecord_t *record);
typedef struct {
char *symbol;
- uint16_t codes[4];
+ uint32_t code;
} qk_ucis_symbol_t;
struct {
bool in_progress:1;
} qk_ucis_state;
-#define UCIS_TABLE(...) {__VA_ARGS__, {NULL, {}}}
-#define UCIS_SYM(name, ...) {name, {__VA_ARGS__, 0}}
+#define UCIS_TABLE(...) {__VA_ARGS__, {NULL, 0}}
+#define UCIS_SYM(name, code) {name, code}
extern const qk_ucis_symbol_t ucis_symbol_table[];