diff options
author | wheredoesyourmindgo <moemanchu@icloud.com> | 2021-11-29 00:17:07 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-29 00:17:07 -0800 |
commit | 7f67504993f96936145a48f5cee7dcc1e2645a47 (patch) | |
tree | 7207835f736f3208affc051099a44eb5087787e0 /quantum/process_keycode | |
parent | 4461355cce04750f021d0351939a35b1f7fdf5d5 (diff) |
Added cancel_key_lock function (#15321)
Diffstat (limited to 'quantum/process_keycode')
-rw-r--r-- | quantum/process_keycode/process_key_lock.c | 5 | ||||
-rw-r--r-- | quantum/process_keycode/process_key_lock.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/quantum/process_keycode/process_key_lock.c b/quantum/process_keycode/process_key_lock.c index 4bd58f0c1e..941a2c5780 100644 --- a/quantum/process_keycode/process_key_lock.c +++ b/quantum/process_keycode/process_key_lock.c @@ -56,6 +56,11 @@ static inline uint16_t translate_keycode(uint16_t keycode) { } } +void cancel_key_lock(void) { + watching = false; + UNSET_KEY_STATE(0x0); +} + bool process_key_lock(uint16_t *keycode, keyrecord_t *record) { // We start by categorizing the keypress event. In the event of a down // event, there are several possibilities: diff --git a/quantum/process_keycode/process_key_lock.h b/quantum/process_keycode/process_key_lock.h index baa0b39077..5159b0ba02 100644 --- a/quantum/process_keycode/process_key_lock.h +++ b/quantum/process_keycode/process_key_lock.h @@ -18,4 +18,5 @@ #include "quantum.h" +void cancel_key_lock(void); bool process_key_lock(uint16_t *keycode, keyrecord_t *record); |