diff options
| author | Aapo Saaristo <aapo.saaristo@gmail.com> | 2019-07-16 08:53:04 +0300 |
|---|---|---|
| committer | skullydazed <skullydazed@users.noreply.github.com> | 2019-07-15 22:53:04 -0700 |
| commit | 2a231457bd494079c36cf3e07c9b887016adb491 (patch) | |
| tree | 012d22782fde1cf6df49b0274510a47f7779e1c5 | |
| parent | 0f95c0865cec9cefde37dcb1bca32360a6741f0d (diff) | |
| download | qmk_firmware-2a231457bd494079c36cf3e07c9b887016adb491.tar.gz qmk_firmware-2a231457bd494079c36cf3e07c9b887016adb491.zip | |
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.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 5de2e41fc..fd4508b53 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) { | |||
| 64 | } | 64 | } |
| 65 | } | 65 | } |
| 66 | 66 | ||
| 67 | __attribute__((weak)) | ||
| 68 | void qk_ucis_cancel(void) { | ||
| 69 | } | ||
| 70 | |||
| 67 | void register_ucis(const char *hex) { | 71 | void register_ucis(const char *hex) { |
| 68 | for(int i = 0; hex[i]; i++) { | 72 | for(int i = 0; hex[i]; i++) { |
| 69 | uint8_t kc = 0; | 73 | uint8_t kc = 0; |
| @@ -130,6 +134,7 @@ bool process_ucis (uint16_t keycode, keyrecord_t *record) { | |||
| 130 | 134 | ||
| 131 | if (keycode == KC_ESC) { | 135 | if (keycode == KC_ESC) { |
| 132 | qk_ucis_state.in_progress = false; | 136 | qk_ucis_state.in_progress = false; |
| 137 | qk_ucis_cancel(); | ||
| 133 | return false; | 138 | return false; |
| 134 | } | 139 | } |
| 135 | 140 | ||
