B4J Question How to trap windows key using NativeHook?

warayTek

Member
Licensed User
I'm using the example app using jNativeHook from here. I modified and compile it.
The app is running on full screen and always on top. How can I prevent the windows menu from showing when pressing the Windows key on my keyboard or any specific key to prevent it from losing focus?
 

MicroDrie

Well-Known Member
Licensed User
Longtime User
As soon as you can prevent the Windows menu from appearing or prevent that you from losing focus it means you lose control or the computer. Then there is nothing left but to turn off the computer and restart it with a recovery process. That's something that happened in the past, but you don't want it now.

What does work is to open a modal form that makes it impossible to activate others (B4XPages) and can only be exited by a command associated with a key.
 
Upvote 0

Magma

Expert
Licensed User
Longtime User
Do you want to create a kiosk app?

If yes then you must search for a registry trick.. to disable some keys combinations. You can load them on app startup and load registry enable them again at the exit of app if you want.
 
Last edited:
Upvote 0
Top