aspose file tools
The moose likes Java in General and the fly likes Key Listener not working for PrintScreen Key ? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "Key Listener not working for PrintScreen Key ?" Watch "Key Listener not working for PrintScreen Key ?" New topic
Author

Key Listener not working for PrintScreen Key ?

Rohit Singh
Greenhorn

Joined: Dec 22, 2000
Posts: 4
Hi friends,
I wrote a java applet to trap user keys, and found that the PrintScreen key was not giving the KeyPresed event.(though it gave the KeyReleased event!).
Has someone found a solution to this problem !?
Regards,
rohit
Sahir Shah
Ranch Hand

Joined: Nov 05, 2000
Posts: 158

That is normal. I have noticed the same thing with the MouseEvent. If the operation triggered by the event is somthing that takes a while like executing a query and populating a JTable with the result set, often nothing happens on the first click. The best thing to do is bullshit the users. Tell them to double click or hit the key once again to confirm.
Cheers
Sahir


....
Rohit Singh
Greenhorn

Joined: Dec 22, 2000
Posts: 4
Thanks Sahir for your reply.
However, what is troubling me is the fact that this behaviour is not consistent.. IT IS SPECIFIC to the PrintScreen key. Other KeyEvents are being generated properly, except for the PrintScreen KeyPressed Event. I'm just getting the KeyReleased Event for this particular Key, whereas I get both events for all the other keys[eg, a-z,A-Z,0-9,etc].
Please let me know your views.
Regards,
rohit
Sahir Shah
Ranch Hand

Joined: Nov 05, 2000
Posts: 158

OIC. I thought you just wanted to do a screen print.
That key does not generate a keydown event.
Its got nothing to do with java. Its a platform issue.
Cheers
Sahir
 
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: Key Listener not working for PrintScreen Key ?
 
Similar Threads
How to know "PrintScreen" button pressed ????
Disable window key (key between CTRL and ALT)
Two strange behaviour in Swing
How to capture keyboard event if component does not have focus question
capture image