These operations are operating system dependent (and would require administrator privs). Why would you want to do this anyways? Disabling the keyboard for just your application is possible. But what would happen if your program crashed before you re enabled these devices. It would leave the computer unusable. If you have to implement this feauter, pls google commons-collections-3.1.jar and you could find some examples with Block hook.
java.awt.event
类 KeyEvent
java.lang.Object
java.util.EventObject
java.awt.AWTEvent
java.awt.event.ComponentEvent
java.awt.event.InputEvent
java.awt.event.KeyEvent
所有已实现的接口:
Serializable
直接已知子类:
MenuKeyEvent VK_WINDOWS
public static final int VK_WINDOWS用于 Microsoft Windows 的 "Windows" 键的常量。此常量同时用于左右两个这种键。 从以下版本开始:
1.5
以前听人讲过好像说是有一些涉及到电脑控制的功能Java很难实现
http://www.winu.cn/dispdocnew.php?tid=86197
http://www.wangchao.net.cn/bbsdetail_18131.html