aboutsummaryrefslogtreecommitdiffstats
path: root/quantum/process_keycode/process_unicode.h
diff options
context:
space:
mode:
authorStanley Lai <stanleylai.sg@gmail.com>2016-12-17 13:49:13 -0800
committerStanley Lai <stanleylai.sg@gmail.com>2016-12-17 13:49:13 -0800
commitb49d7800aeae1009b39b2bff2121864425e73ce9 (patch)
treef73447fc32940c7bc6b691a83567186d1afbc991 /quantum/process_keycode/process_unicode.h
parent9ecf9073b96799e52a1f1c0d35b57177382902ce (diff)
parentae95834f5af7404c04e6fe3446019046278d814b (diff)
downloadfirmware-b49d7800aeae1009b39b2bff2121864425e73ce9.tar.gz
firmware-b49d7800aeae1009b39b2bff2121864425e73ce9.tar.bz2
firmware-b49d7800aeae1009b39b2bff2121864425e73ce9.zip
Merge remote-tracking branch 'refs/remotes/jackhumbert/master'
Diffstat (limited to 'quantum/process_keycode/process_unicode.h')
-rw-r--r--quantum/process_keycode/process_unicode.h55
1 files changed, 50 insertions, 5 deletions
diff --git a/quantum/process_keycode/process_unicode.h b/quantum/process_keycode/process_unicode.h
index ca17f8f66..f17cfa6cf 100644
--- a/quantum/process_keycode/process_unicode.h
+++ b/quantum/process_keycode/process_unicode.h
@@ -3,15 +3,60 @@
#include "quantum.h"
-#define UC_OSX 0
-#define UC_LNX 1
-#define UC_WIN 2
-#define UC_BSD 3
+#define UC_OSX 0 // Mac OS X
+#define UC_LNX 1 // Linux
+#define UC_WIN 2 // Windows 'HexNumpad'
+#define UC_BSD 3 // BSD (not implemented)
+#define UC_WINC 4 // WinCompose https://github.com/samhocevar/wincompose
+
+#ifndef UNICODE_TYPE_DELAY
+#define UNICODE_TYPE_DELAY 10
+#endif
void set_unicode_input_mode(uint8_t os_target);
+uint8_t get_unicode_input_mode(void);
+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 UNICODEMAP_ENABLE
+void unicode_map_input_error(void);
+bool process_unicode_map(uint16_t keycode, keyrecord_t *record);
+#endif
+
+#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 +164,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