mercredi 14 novembre 2018

Avoid multiple messages from one keypress in WH_KEYBOARD hook

I use SetWindowsHookEx WinAPI function to intercept keyboard shortcuts in my C# application. But when a key is pressed once then multiple messages are generated and, therefore, KeyboardProc function is called many times. I need to avoid this so that only one message is handled but others are ignored. How can I implement this? Thanks.

Aucun commentaire:

Enregistrer un commentaire