diff options
author | Aapo Saaristo <aapo.saaristo@gmail.com> | 2019-07-16 08:53:04 +0300 |
---|---|---|
committer | Florian Didron <fdidron@users.noreply.github.com> | 2019-07-19 10:07:51 +0900 |
commit | 3dd97c383b8c1acd0a0706df9f8bf270aea89ca1 (patch) | |
tree | 8af70b49229c049d591955303d4d394ad7318832 /quantum/process_keycode/process_ucis.c | |
parent | ffc273b14aac51f906d5c6d88fc69a2e3a393487 (diff) |
Add user-overridable callback for cancelling UCIS input (#5564)
* Add user-overridable callback for cancelling UCIS input
To clean up things from qk_ucis_start_user() for instance.
* restore lost newline to quantum/process_keycode/process_ucis.c
Co-Authored-By: shinmai <aapo.saaristo@gmail.com>
Diffstat (limited to 'quantum/process_keycode/process_ucis.c')
-rw-r--r-- | quantum/process_keycode/process_ucis.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/quantum/process_keycode/process_ucis.c b/quantum/process_keycode/process_ucis.c index 5de2e41fc3..fd4508b535 100644 --- a/quantum/process_keycode/process_ucis.c +++ b/quantum/process_keycode/process_ucis.c @@ -64,6 +64,10 @@ void qk_ucis_symbol_fallback (void) { } } +__attribute__((weak)) +void qk_ucis_cancel(void) { +} + void register_ucis(const char *hex) { for(int i = 0; hex[i]; i++) { uint8_t kc = 0; @@ -130,6 +134,7 @@ bool process_ucis (uint16_t keycode, keyrecord_t *record) { if (keycode == KC_ESC) { qk_ucis_state.in_progress = false; + qk_ucis_cancel(); return false; } |