I’ve written many AppleScript apps that run the SheepShaver and DOSBox emulators, and when the emulators start up for the first time, macOS pops up a message headed “Keystroke receiving” asking for permission to let the apps receive keystrokes from any application.
Back in 2019, I asked here if there was a way to allow this access easily, but there wasn’t and isn’t. But the apps do not need to receive keystrokes from other apps, and I wonder if there is a way to trap that “Keystroke receiving” message box and simply cancel it?