Search code examples
c#keyboardkeyoperator-precedence

C# Keyboard Key detection precedence issue


I have an application which detects pressed keys on C# winform. The problem is on client side there are some other applications which also detects the pressed keys and suppresses them and because of that my App's form does not get the notification for the pressed key. I have used traditional form.KeyDown event to detect the key. How can I take higher precedence than the other application?


Solution

  • If you're worried about other apps basically stealing your keystroke then you need to look into Global Hooks which is almost definitely how they other apps are stealing yours. You can roll your own code or use a wrapper library that someone else already wrote.