That is an OS level event in Windows and is handled by the OS.
Shirley Heby
Greenhorn
Joined: Sep 03, 2009
Posts: 3
posted
0
Rob Camick wrote:That is an OS level event in Windows and is handled by the OS.
Can it be done using JNI or is there a workaround ?
VNC
Does anybody know how VNC handles it ? Of course there is an option in VNC Viewer [ Options -> Inputs tab -> Check box stating (Pass special keys directly to server) ] but couldn't get the implementation in it's source code.
Alan Mehio
Ranch Hand
Joined: Apr 04, 2005
Posts: 70
posted
0
Balasubramanian Chandrasekaran wrote:Hi all,
I am trying to capture the Alt+Tab combination key from my custom JFrame application. Is it possible under Java?
-BalaC-
key events are fired by the component; now there should be a component( JComponent) which fires these key events and your JFrame is listening to these key events and in the implementation you filter the one which you are interested in and take any further action or consume the event etc..
In your case, do you have any of these component? i.e JTextField or JTextArea ?
Regards,
Alan Mehio
London,UK
Regards,
Alan Mehio
London, UK
Michael Dunn
Ranch Hand
Joined: Jun 09, 2003
Posts: 4632
posted
0
> key events are fired by the component;
key events are listened to via various means in a java app
keyListener
keyBinding
KeyBoardFocusmanager
AWTEventListener etc
but the key events need to reach the java app, to be processed.
certain combinations are consumed by the os (particularly windows), prior to getting to the java app.
alt-tab
ctrl-alt-del
etc
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.
subject: Capturing/Consuming Alt+Tab combination under JFrame