Closed kivikakk closed 6 months ago
I have the same problem on my Keychron K10 PRO
Same issue seen on Keychron K8 Pro, using firmware v1.02 ANSI.
Used web version of app on 2023-08-14. It's unclear what release version is, but the HTML's
section contains the following string:<style data-styled="active" data-styled-version="6.0.0-beta.6"></style>
Hi there! I noticed I was unable to manually write a macro like the following for my "Keychron Q10 ANSI Knob":
Recording it is fine (and produces the above sequence when read), but I can't write that myself and save it; I get:
I figure it must be because the invalid keycode detection at work here is this code:
https://github.com/the-via/app/blob/3467ca79f07ca7f98513e7e9992112c79ee83bbe/src/utils/macro-api/macro-api.ts#L52-L57
Whereas
macro-api.v11.ts
has this extra.replace
:https://github.com/the-via/app/blob/3467ca79f07ca7f98513e7e9992112c79ee83bbe/src/utils/macro-api/macro-api.v11.ts#L67-L73
I think it should be safe to add the
.replace
to the pre-11 one, too, though I can't be sure. Does that sound about right?I'm happy to open a PR with the change if so; just wanted to sound it out first. I'd also be happy to write a state machine-based parser for the macro language, which might be a little easier to modify and maintain, if there's any interest.