On macOS the key combination CMD+Backtick
is used to cycle through the open windows of an application when using an english keyboard. On German keyboards for ex
I can't test right now the answer ... but I would first try to popen
the defaults
command like:
HFILE file;
if (!(file = popen("defaults read NSGlobalDomain NSUserKeyEquivalents", "r")))
{
return nullptr;
}
const int MAX_BUF_SIZE = 512;
char temp[MAX_BUF_SIZE+1] = "";
while (fgets(temp, MAX_BUF_SIZE, file) > 0)
{
printf("%s",temp);
memset(temp, 0, MAX_BUF_SIZE+1);
}
pclose(file);
Here I just printf
its output but you will likely want to parse it.