Results 1 to 4 of 4
Like Tree2Likes
  • 1 Post By Norm
  • 1 Post By Fubarable

Thread: need something to capture key stroke

  1. #1
    Join Date
    Aug 2011
    Rep Power

    Default need something to capture key stroke

    i have to make a key logger and i need to something to capture key stroke will the i tried the Jdialogbox and Jframe by adding the keyListener but it only works when the frame is selected please help
    Last edited by hiteshingole2000; 08-08-2011 at 09:40 PM.

  2. #2
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Eastern Florida
    Rep Power


    works when the frame is selected
    Yes, the selected component is the one to get the key events.
    Do you have key listeners for all the components that can be selected?
    Also look at key binding. That will allow other parts of the program to get key strokes besides the one with focus.
    hiteshingole2000 likes this.

  3. #3
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Blog Entries
    Rep Power


    If you are trying to make a key logger that captures key strokes in the background, then don't use Java for this purpose (which hopefully isn't a nefarious one). Java is OS agnostic and does not allow easy access to low-level OS calls.
    hiteshingole2000 likes this.

  4. #4
    kammce's Avatar
    kammce is offline Senior Member
    Join Date
    Dec 2010
    Rep Power


    yeah, java keyloggers is a failed attempt due to Sun's/Oracles security measures to make sure that the program MUST be selected or highlighted or active in order to have any input done to it. It will not scan for keyboard input and save it to some file that you will, in turn send back to your machine though some easily accessible mailing client or maybe SCP.

Similar Threads

  1. Capture
    By PhQ in forum New To Java
    Replies: 7
    Last Post: 10-17-2010, 06:26 PM
  2. DVB-T capture
    By krato in forum Advanced Java
    Replies: 0
    Last Post: 08-04-2010, 12:46 AM
  3. Pixel capture
    By Maiquelnet in forum Advanced Java
    Replies: 1
    Last Post: 11-16-2009, 09:28 PM
  4. How to capture IP packets
    By Hasan in forum Networking
    Replies: 1
    Last Post: 05-31-2007, 06:44 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts