Skip to content

Commit

Permalink
Allowing Pressing the Start Buttons Again to Stop Dynamic Macro Recor…
Browse files Browse the repository at this point in the history
…ding (qmk#9446)

format code according to conventions [skip ci]
  • Loading branch information
blockader authored and drashna committed Aug 9, 2020
1 parent 8ddee61 commit 6ac9422
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions quantum/process_keycode/process_dynamic_macro.c
Original file line number Diff line number Diff line change
Expand Up @@ -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, &macro_end);
Expand Down

0 comments on commit 6ac9422

Please sign in to comment.