This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

key listeners outside of swing

 
Len Padson
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
google

java keylogger
 
Len Padson
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5148
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're right. It's not possible.
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic