gmamaladze / globalmousekeyhook

This library allows you to tap keyboard and mouse, detect and record their activity even when an application is inactive and runs in background.
MIT License
1.05k stars 257 forks source link

Just want to use on My Winform. #117

Open smallprogrammers opened 4 years ago

smallprogrammers commented 4 years ago

Hello, Is it possible Keyboard globally hooked keys will just worked on my Winform Application. Not on other windows.

Easily to say - If i hooked for A. Then that "A" will not work on any other window. Possible ?

Thanks in advanced.

CrazyTim commented 4 years ago

Instead of using global, use Hook.AppEvents()

smallprogrammers commented 2 years ago

@CrazyTim Thanks for your reply. Bro can you tell me one more thing ? I want to hook global. But only my application will capture it. If user type any charter on Notepad,Word or anywhere that will be not visible on there. Only it will visible in my app.I means it will only appear in my application. None where else. Possible? Suppose someone type APPLE in notepad. But it only show in my app. Not in notepad while hook by my app.

zaafar commented 2 years ago

@smallprogrammers give the following lib a try. :)

https://github.com/zaafar/ClickableTransparentOverlay

jonjonsson commented 2 years ago

@CrazyTim I want to hook global. But only my application will capture it.

Yes you can do that by putting e.handled = true in your keyboard handlers.