This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes global event listener Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "global event listener" Watch "global event listener" New topic

global event listener

Lucas Smith
Ranch Hand

Joined: Apr 20, 2009
Posts: 804


I know that only the focused component can register events from the keyboard. But I have read that there is a method which can handle every key strokes from the keyboard.

I have JFrame object. I want to register "ctrl + plus" key strokes. Can anyone give me an example of the code? I would really appreciate it!

Campbell Ritchie

Joined: Oct 13, 2005
Posts: 37884
Is this about key listeners any use to you?
Lucas Smith
Ranch Hand

Joined: Apr 20, 2009
Posts: 804

Thanks. I will analyze that and give you a response.
Darryl Burke

Joined: May 03, 2008
Posts: 4523

Also take a look at key bindings and Rob Camick's Global Event Listeners.

luck, db
There are no new questions, but there may be new answers.
I agree. Here's the link:
subject: global event listener
Similar Threads
back ground keylogger
ascii characters for stringtokenizer
Sending key strokes to Windows App
How to trap the Print Screen
Reading data through client COM1 port from server