summaryrefslogtreecommitdiffstats
path: root/quantum/process_keycode/process_unicode.h
diff options
context:
space:
mode:
authorGergely Nagy <algernon@madhouse-project.org>2016-08-15 10:02:05 +0200
committerGergely Nagy <algernon@madhouse-project.org>2016-08-15 10:08:53 +0200
commit43d08629cf275d0b32281ffe8785258fff226b49 (patch)
tree35d116efeb3557d7b7e59276d7d53c450ebe9de9 /quantum/process_keycode/process_unicode.h
parenta312cbf712764277e0dbbbb99410c2f6fc6c7484 (diff)
downloadqmk_firmware-43d08629cf275d0b32281ffe8785258fff226b49.tar.gz
qmk_firmware-43d08629cf275d0b32281ffe8785258fff226b49.tar.xz
process_unicode: Replace register_hex32
It turns out that register_hex32 did not work reliably, and some systems only allow 7 chars after the unicode magic sequence, while others allow 8. To remedy the situation, store the codes as strings, and type those in instead of doing bit shifting magic. Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
Diffstat (limited to 'quantum/process_keycode/process_unicode.h')
-rw-r--r--quantum/process_keycode/process_unicode.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/quantum/process_keycode/process_unicode.h b/quantum/process_keycode/process_unicode.h
index dd6dd7138..be24ddc2b 100644
--- a/quantum/process_keycode/process_unicode.h
+++ b/quantum/process_keycode/process_unicode.h
@@ -12,7 +12,6 @@ void set_unicode_input_mode(uint8_t os_target);
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);
@@ -23,7 +22,7 @@ bool process_unicode(uint16_t keycode, keyrecord_t *record);
typedef struct {
char *symbol;
- uint32_t code;
+ char *code;
} qk_ucis_symbol_t;
struct {
@@ -32,14 +31,15 @@ struct {
bool in_progress:1;
} qk_ucis_state;
-#define UCIS_TABLE(...) {__VA_ARGS__, {NULL, 0}}
-#define UCIS_SYM(name, code) {name, code}
+#define UCIS_TABLE(...) {__VA_ARGS__, {NULL, NULL}}
+#define UCIS_SYM(name, code) {name, #code}
extern const qk_ucis_symbol_t ucis_symbol_table[];
void qk_ucis_start(void);
void qk_ucis_start_user(void);
void qk_ucis_symbol_fallback (void);
+void register_ucis(const char *hex);
bool process_ucis (uint16_t keycode, keyrecord_t *record);
#endif