summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAapo Saaristo <aapo.saaristo@gmail.com>2019-07-16 08:53:04 +0300
committerskullydazed <skullydazed@users.noreply.github.com>2019-07-15 22:53:04 -0700
commit2a231457bd494079c36cf3e07c9b887016adb491 (patch)
tree012d22782fde1cf6df49b0274510a47f7779e1c5
parent0f95c0865cec9cefde37dcb1bca32360a6741f0d (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>
-rw-r--r--quantum/process_keycode/process_ucis.c5
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;
}