Fix Macros tap sequence parsing

Both Macros and DynamicMacros were only reading one byte for each `Key` object
in a tap sequence, so it would first read the flags byte of each key in the
sequence and treat it as a keycode byte, using a flags byte of `0`.  As soon as
an unmodified keyboard key was encountered, this would be recognized as the end
of the sequence.  This change fixes the bug by reading and using the flags byte
of each key in the sequence as intended.

Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
pull/1172/head
Michael Richters 3 years ago
parent 7d08de5d23
commit 7dd8527aab
No known key found for this signature in database
GPG Key ID: 1288FD13E4EEF0C0

@ -188,7 +188,7 @@ void DynamicMacros::play(uint8_t macro_id) {
case MACRO_ACTION_STEP_TAP_SEQUENCE: {
while (true) {
key.setFlags(0);
key.setFlags(Runtime.storage().read(pos++));
key.setKeyCode(Runtime.storage().read(pos++));
if (key == Key_NoKey)
break;

@ -154,7 +154,7 @@ void Macros::play(const macro_t *macro_p) {
case MACRO_ACTION_STEP_TAP_SEQUENCE: {
while (true) {
key.setFlags(0);
key.setFlags(pgm_read_byte(macro_p++));
key.setKeyCode(pgm_read_byte(macro_p++));
if (key == Key_NoKey)
break;

Loading…
Cancel
Save