The basis for cancelling Via macros in progress and for making Via macros repeat
The idea is capture the Via macro execution in function dynamic_keymap_macro_send() (in file quantum/dynamic_keymap.c) and instead feed the information into an existing QMK macro engine that has cancelling macros and repeating macros as features.
Introduction
It is relatively straightforward to write a macro engine that will both allow cancelling macros in progress and by extension also allow repeating macros. I have implemented one and have been using it on Keychron keyboards for many months without ill effects.
There are sometimes problems in wireless mode, but they are probably unrelated to the macro execution engine as there are general problems with wireless Keychron keyboards, and the macros work without any problems in wired mode.
The nature of these problems are not known at this time, but it may be related to keyboard sleep. The problem is intermittent; sometimes it works fine and sometimes not (for example, does not work at all—nothing happens when macro keys are pressed).
Analysis
The (binary) format of the buffer built up by the interpretation of the raw (emulated) EEPROM data was previously covered. That is the output from dynamic_keymap_macro_send() and we need to handle the input, not the output.
Leave a Reply