One way or another, I will make this happen, but I won’t bet on it being pretty or easy to duplicate. And I won’t be able to do much until I have hardware, which will be January for me.
Why does the report get cleared every cycle? It’s really odd to have a function named isModifierPressed() that sometimes tells you the key isn’t pressed when it actually is.
The report gets cleared so we can avoid having to do manual bookeeping, which can very, very easily lead to a whole lot of bugs. And yes, it is odd to have it named like that, and it is something I want to fix. It’s not a trivial task (and switching to manual bookeeping is not an option, not in my book).
Perhaps it could build the new report without clearing the old one first, and replace the old report by overwriting a pointer in a single step? Or is that what the was*Pressed() functions have access to? (Forgive me; I don’t have time to search the code to figure that out myself right now.)
(The main use case for the isModifierPressed code right now, is a workaround for a chromeos bug. When called late enough in the flow, it is accurate and useful. I’d argue that the failures folks are seeing with it are due to me not documenting its intended use and what behaviour you should expect from it)
As luck will have it, I just sent in a PR to improve that error message. Jesse wanted it to read slightly differently; I should clean that up and send it back in…
Can you try if the commented out isModifierActive stuff works, if you change it to wasModifierActive? You can then change the case statements to also have an if (shifted) { /* send uppercase */ } else { /* send lowercase */ } body.
Now I got my initial layout figured and working on my macbook pro, and I have trasitioned to using the model1 instead of the mbp keyboard. It is fun but still learning…
I am going to bring my keyboard to work, where we use windows, so i tweaked it a bit towards that and started testing on my W10 box.
But alas! The unicode input is giving me problems again…
i disabled os guessing
Hardcoded to use windows in the setup
Found and added a registration key to enable the unicode input
I had issues, it worked in some programs, failed miserably in others. I read somewhere that WinCompose might be of help here. It’s also worth checking how the Unicode plugin tries to input Unicode on Windows. I may have screwed that up (I don’t use Windows often).