diff options
author | Dongfeng Yu <60870777+blockader@users.noreply.github.com> | 2020-07-08 04:59:13 +0800 |
---|---|---|
committer | Drashna Jael're <drashna@live.com> | 2020-08-08 22:20:54 -0700 |
commit | 6ac9422d0380273c05284dbca9e08a8a6b0437a2 (patch) | |
tree | a47edaaea397696f5b4ae886a16830e49a02d6de /quantum | |
parent | 8ddee611800c2683a805f41cba499fee9d943fec (diff) |
Allowing Pressing the Start Buttons Again to Stop Dynamic Macro Recording (#9446)
format code according to conventions [skip ci]
Diffstat (limited to 'quantum')
-rw-r--r-- | quantum/process_keycode/process_dynamic_macro.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/quantum/process_keycode/process_dynamic_macro.c b/quantum/process_keycode/process_dynamic_macro.c index 2065f242db..18c8d7ca2e 100644 --- a/quantum/process_keycode/process_dynamic_macro.c +++ b/quantum/process_keycode/process_dynamic_macro.c @@ -216,11 +216,13 @@ bool process_dynamic_macro(uint16_t keycode, keyrecord_t *record) { } else { /* A macro is being recorded right now. */ switch (keycode) { + case DYN_REC_START1: + case DYN_REC_START2: case DYN_REC_STOP: /* Stop the macro recording. */ - if (record->event.pressed) { /* Ignore the initial release - * just after the recoding - * starts. */ + if (record->event.pressed ^ (keycode != DYN_REC_STOP)) { /* Ignore the initial release + * just after the recording + * starts for DYN_REC_STOP. */ switch (macro_id) { case 1: dynamic_macro_record_end(macro_buffer, macro_pointer, +1, ¯o_end); |