I'm looking for a way to programmatically detect hotkeys in the system. My app supports configurable hotkeys to do different things, and I'd like to be able to tell if another app has snagged one already or it's a built-in Windows hotkey (like Win-L to lock the workstation).
And if it is another app that owns the hotkey, I'd like to be able to show that to the user. At least the name of the exe.
I'm aware of three ways to do hotkeys:
- System hook using standard API's
- Using the hotkey feature in the properties dialog for a shortcut
- Polling async key state and responding
I doubt I can detect the third type, but what about the other two? And are there any other situations I need to know about?