Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

i want to disable keyboard hotkey such as alt ctrl alt + f4 ctrl + alt + dlt in my netbeans project so that no one can open anything while my application is on

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
317 views
Welcome To Ask or Share your Answers For Others

1 Answer

You are asking for a way within Netbeans to disable global keyboard hotkeys for Windows. This simply isn't possible, as both of your key combinations are registered and intercepted at the kernel level way before Netbeans or any other Windows application even notices them.

There are ways to disable these kinds of hotkeys within Windows, but this can't be done programmatically with Java. Instead try Googling "Disable hotkeys Windows X" or "Disable ctrl alt del Windows X.

An answer on SuperUser suggests a possible registry fix for disabling ctrl+alt+del on Windows 7. The suggested registry edit is:

[HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionImage File Execution Options askmgr.exe]

"Debugger"="Hotkey Disabled"

There are other ways of disabling certain hotkeys depending on what version of Windows you are running and what kind of access you have to the computer. Without admin rights, any solution will be difficult.

This could also be done problematically using a lower level language such as C++ or even C#, but I don't think any of the Java libraries can intercept and block low level keyboard events.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...