summaryrefslogtreecommitdiff
path: root/quantum/process_keycode/process_unicode.h
diff options
context:
space:
mode:
authorJoshua T <joshua@sonofone.net>2016-08-24 23:46:52 -0500
committerJoshua T <joshua@sonofone.net>2016-08-24 23:46:52 -0500
commit42fa91a57dad18ccc3f6bf308f50b3f1e882dadd (patch)
treedae1290be66b6af1d498b0cf68fbef44f90d02be /quantum/process_keycode/process_unicode.h
parentcac69cb58029bf246b22038f034205afbedbc695 (diff)
parentad206155aa6f87de3fb9f0aefe60685ec12905a8 (diff)
downloadqmk_firmware-42fa91a57dad18ccc3f6bf308f50b3f1e882dadd.tar.gz
qmk_firmware-42fa91a57dad18ccc3f6bf308f50b3f1e882dadd.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'quantum/process_keycode/process_unicode.h')
-rw-r--r--quantum/process_keycode/process_unicode.h40
1 files changed, 39 insertions, 1 deletions
diff --git a/quantum/process_keycode/process_unicode.h b/quantum/process_keycode/process_unicode.h
index ca17f8f669..02ce3dd7e0 100644
--- a/quantum/process_keycode/process_unicode.h
+++ b/quantum/process_keycode/process_unicode.h
@@ -8,10 +8,48 @@
#define UC_WIN 2
#define UC_BSD 3
+#ifndef UNICODE_TYPE_DELAY
+#define UNICODE_TYPE_DELAY 10
+#endif
+
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);
bool process_unicode(uint16_t keycode, keyrecord_t *record);
+#ifdef UCIS_ENABLE
+#ifndef UCIS_MAX_SYMBOL_LENGTH
+#define UCIS_MAX_SYMBOL_LENGTH 32
+#endif
+
+typedef struct {
+ char *symbol;
+ char *code;
+} qk_ucis_symbol_t;
+
+typedef struct {
+ uint8_t count;
+ uint16_t codes[UCIS_MAX_SYMBOL_LENGTH];
+ bool in_progress:1;
+} qk_ucis_state_t;
+
+extern qk_ucis_state_t qk_ucis_state;
+
+#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
+
#define UC_BSPC UC(0x0008)
#define UC_SPC UC(0x0020)
@@ -119,4 +157,4 @@ bool process_unicode(uint16_t keycode, keyrecord_t *record);
#define UC_TILD UC(0x007E)
#define UC_DEL UC(0x007F)
-#endif \ No newline at end of file
+#endif