On my laptop I have several special keys, not found on a standard keyboard, like changing performance profiles. The vendor supplied a software that handles this key. Is there a way to catch this key event from a custom program? As far as I know Windows internally works with messages. How could I listen to all keyboard related messages and log the id of the key so I could know later which key id should handle?
Asked
Active
Viewed 160 times
1 Answers
0
I think Register Hotkey may be what you are looking for, you can handle normal keyboard interaction as normal and use Register Hotkey to handle the hotkeys.
You may also want to take a look at http://www.autohotkey.com/ which provides a pre-made version of what you are looking for. (may not suit your needs though, so not sure about this)
Another approach would be to use wh_keyboard hook (with an example located here on how to utilise this as a DLL). And an overview of Windows Hooks here.

GMasucci
- 2,834
- 22
- 42