Keyboard and mouse event hooks

Auteur Réponses
LeonardoJose Mercredi 22 Janvier 2020 à 10:27

I looked into how I could achieve something similar and I found that on Windows I can set up low level hooks for mouse and keyboard events.

Inside my hook handler function I have the choice to send the event to the next hook or just "swallow" it. If I swallow an event wit h my application, other applications will essentially not register the event.

I tried looking for something similar on Linux, but so far the only way I found was to call xmodmap.

My question is: Is there any API that would let an application from userspace hook into the keyboard and mouse input events, then have the possibility to "swallow" that event so that other applications would not see it?

Edité par LeonardoJose

Dadu042 Mercredi 12 Février 2020 à 21:40

Spam ?