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>
This commit is contained in:
Gergely Nagy 2016-08-14 10:37:51 +02:00
parent 857aa5bef6
commit 234dd276cf
2 changed files with 6 additions and 0 deletions

View File

@ -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();

View File

@ -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);