macOS 10.15 new permission prompts


Has anyone tried their SDL programs on macOS 10.15 beta and did it ask you for permissions? I tried with the SDL2 version of my program Photosounder and it gives me this:

The SDL 1.2 version of my program doesn’t seem to require that. Is anybody else getting this too and is there a way to suppress this? It’s inconvenient and I don’t want people to think I log their keystrokes. Maybe it’s relevant that I use SDL_GetGlobalMouseState()?

For context macOS 10.15’s Gatekeeper is changing to ask for permissions, see at #5


SDL has some code to do more thorough detection of capslock presses (via Apple’s IOHIDManager APIs) than what the higher level Apple keyboard APIs provide. I wonder if that’s what’s causing it? If so, it should be fairly simple to disable that code in newer macOS versions I think?

That said, I haven’t tried 10.15 myself nor have I looked at that IOHIDManager code too closely, so I could be way off-base.


I’m looking into this. It might be the event tap, too, but that’s only looking at mouse input. I’ll know more soon.


Looks like the event tap is disabled by default (you need to manually define SDL_MAC_NO_SANDBOX when building SDL to get it, which we don’t anywhere).

It’s definitely the capslock code that triggers this notification; it goes away if I comment it out.

Is there any reason we can’t just use -[NSResponder flagsChanged] for this instead of IOKit? Apple docs suggest that’ll work:

Maybe this goes out of sync if the keyboard focus changes?


Pushed a fix to this:


Will this get in the ‘final’ 2.0.10?


Thanks, seems to work for me.


Will this get in the ‘final’ 2.0.10?