1
0
Fork 0

Prevent the recording of looping dynamic macros.

If a macro play key is inadvertently recorded in a dynamic macro
a loop is created and the macro will not terminate when played.

This should be prevented.
This commit is contained in:
Daniel Shields 2017-05-11 09:46:11 +01:00
parent ec3e684123
commit 606e13a47e

View file

@ -274,6 +274,10 @@ bool process_record_dynamic_macro(uint16_t keycode, keyrecord_t *record)
macro_id = 0; macro_id = 0;
} }
return false; return false;
case DYN_MACRO_PLAY1:
case DYN_MACRO_PLAY2:
dprintln("dynamic macro: ignoring macro play key while recording");
return false;
default: default:
/* Store the key in the macro buffer and process it normally. */ /* Store the key in the macro buffer and process it normally. */
switch (macro_id) { switch (macro_id) {