Hi,
I'm Toni, the guy who is helping Pukka in creation of the M.A.C.E. environment mentioned above. I noticed this discussion earlier, and wanted to share some of the experience with SDL key input, in case it might be helpful for you guys...
So, basically old version of SDL was using "IOHIDManager" to poll keyboard status for the modifier keys, and using that API triggered the permission popup in Catalina. The SDL 2.0.10 fixes this by removing dependency on IOHIDManager. In the new version, SDL monitors caps lock state through "flagsChanged:" selector in "Cocoa_WindowListener" class, which gets triggered by Cocoa each time modifier keys are changed, and the application is active.
However, there was major drawback of this feature, that if caps lock state was switched while application was in background, the new state would not get notified at all. So far the quick workaround we did for this, was for now manually polling the caps lock state on SDL idle events, and generating the caps lock state change manually if caps lock state change would be detected. For that, we used this simple snippet of code:
Code:
SDL_Keymod mods = SDL_GetModState();
if ((mods ^ oldMods) & KMOD_CAPS) { ... /* state changed */ oldMods = mods; }
in the idle loop, and would use (mods & KMOD_CAPS) as only source for the caps lock state. I hope this information might help you guys.