aspose file tools*
The moose likes Java in General and the fly likes key listeners outside of swing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "key listeners outside of swing" Watch "key listeners outside of swing" New topic
Author

key listeners outside of swing

Len Padson
Ranch Hand

Joined: Nov 21, 2011
Posts: 40
i would like to write a shortcut key program. for example, a program that runs invisibly in the background continuously seeing if a key like f4 or something is currently being pressed. and if it ever is, it would do something. so how could i write a keylistener without swing? like i said i want it to be invisible if possible.
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
google

java keylogger
Len Padson
Ranch Hand

Joined: Nov 21, 2011
Posts: 40
i did... it looks like its not possible. i want to make a program that reacts to different key combos so that a user could launch different commands while theyre doing something. any suggestions?
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4664
    
    5

You're right. It's not possible.


luck, db
There are no new questions, but there may be new answers.
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
if you just wanted to launch a java app,
so that it had focus and you could do things
with it, for windows you could write a vbscript file
to launch the java program, place it on
the desktop (with accelerators) so (eg) ctrl/shift/x
would trigger the script file and launch the java app.

I haven't done this in years, so can't remember the code,
but google should help.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: key listeners outside of swing