• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Key tracker

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Java Users,

I've got an idea of tricky application (perhaps it is written already:). I mean smth to track key strokes outside the application.
Let's say the whole program could minimize to tray, after starting and put to the txt file all the keyboard keys which were pressed since it was started.
Instead of the tray application it could be a simple thread. The whole problem is with the KeyListener. I mean, is there any way to implemet a KeyListener which will be let's say
'absolute' (not only sensitive to the events connected with the form, button etc.)

I'm looking forward to reciving some tips.

Cheers,

j.k
 
author
Posts: 23956
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I'm looking forward to reciving some tips.



It's probably best to *not* do this in Java.

Other than that, I don't know how much more help you are going to get here. Key Loggers, which is what you are trying to write, are basically done by viruses. And in many situations, are illegal.

Henry
 
Village Idiot
Posts: 484
jQuery Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I use family key logger lol
My pc does try to treat it like a virus too
 
Jan Kwiatkowski
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't want to hurt nobody, I'm just curious if it is possible to write such listener in Java. I've heard about KeyEventDispacher and KeyEventProcessor and I thought it could work.
All in all thanks for the answers.
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'd be skeptical that straight Java (w/o JNI) would be able to get into the keyboard handler at that low of a level.
 
Jan Kwiatkowski
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Perhaps you're right. Maybe I should use interrupt handler for the keyboard using Assembler. Thanks for the clues

Cheers,

j.k
 
When you have exhausted all possibilities, remember this: you haven't - Edison. Tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic