views:

42

answers:

3

Hey guys,

I'm building a Java App, and i need to block the hotkeys, like Alt+Tab, Control-Alt-Delete... Basically theses. My application requires this, because it is a control application. If the solution is not possible on java, any one knows another way to do this.

Thanks you!

Edit1: I'm build a "computer manager" that requires a password. If the password is not type or its wrong, the user can't do nothing on computer. It works like a default login screen view, but with many users. Got it?

Edit2: After users type the password, he can use all (or some, like alt+tab :) these hot keys! Got it? [2]

+2  A: 

Generally speaking you can't, because those keys are intercepted by the operating system before they get to Java.

Give us more info about the OS and enviornment you're in and we might be able to come up with workarounds.

Charlie Martin
+1  A: 

I don't think there is an easy, programatic way to do it.

Unless there is some hidden class inside JDK6 I would say that these combinations are handled by the OS (that catches keystrokes in anycase before dispatching them to applications) so your OS will decide what to do wth keystrokes before Java

If something exists, then it's a hack unrelated with Java but more with registry or similar things :)

Jack
+1  A: 

One of the whole points of CTRL-ALT-DELETE is that it specifically wants to prevent applications from overriding their functionality. If that were not the case then anybody could write an app that brought itself up when CTRL-ALT-DELETE was pressed and either made itself look like the 'change password' app or the screen saver. Either case would allow the app to steal passwords from people.

DJClayworth