I have a language switcher app that had been stopped working after Mac OS Catalina release. When you press a hotkey it changes the language of typed text, so it's basically a keylogger, and Catalina does not allow to run this app without accessibility permissions.
How can I request that permission in a C++ app? I found some information about ObjC AXIsProcessTrusted method, but how can I call it in C++?
Here is a source code: https://github.com/vizakenjack/OpenSwitcher