summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGergely Nagy <algernon@madhouse-project.org>2016-08-14 10:37:51 +0200
committerGergely Nagy <algernon@madhouse-project.org>2016-08-15 10:08:53 +0200
commit234dd276cf03be6fd6961473e9d9c8f35deec682 (patch)
treeb944f3d4dd6763c0a1a8682f42ccc77a10b7c86f
parent857aa5bef6a74f8785a7039feea5286c07bf7067 (diff)
process_unicode: Make the startup overridable
Extract out the part of `qk_ucis_start` that inputs the placeholder symbol, and make it weak, so it can be overridden. Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
-rw-r--r--quantum/process_keycode/process_unicode.c5
-rw-r--r--quantum/process_keycode/process_unicode.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/quantum/process_keycode/process_unicode.c b/quantum/process_keycode/process_unicode.c
index d714344117..c474483e7f 100644
--- a/quantum/process_keycode/process_unicode.c
+++ b/quantum/process_keycode/process_unicode.c
@@ -75,6 +75,11 @@ void qk_ucis_start(void) {
qk_ucis_state.count = 0;
qk_ucis_state.in_progress = true;
+ qk_ucis_start_user();
+}
+
+__attribute__((weak))
+void qk_ucis_start_user(void) {
unicode_input_start();
register_hex(0x2328);
unicode_input_finish();
diff --git a/quantum/process_keycode/process_unicode.h b/quantum/process_keycode/process_unicode.h
index c5005897e0..75607e40e8 100644
--- a/quantum/process_keycode/process_unicode.h
+++ b/quantum/process_keycode/process_unicode.h
@@ -37,6 +37,7 @@ struct {
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);
bool process_ucis (uint16_t keycode, keyrecord_t *record);