Results 1 to 5 of 5
  1. #1
    ashton is offline Member
    Join Date
    Jan 2009
    Posts
    31
    Rep Power
    0

    Exclamation Keystroke Biometrics - help!

    Hi guys! I am trying to write my own code on the concepts of keystroke dynamics..

    Does anyone know how to record, and perhaps, record the dwell time (time a key is pressed) and flight time (time the key is released)?

    I am not very familiar with recording time in programming.. Since, I am familiar with the Java language, a piece of code on how to record time when a key is pressed can help me a lot for a start..

    I'm looking forward to your big help!

  2. #2
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,015
    Blog Entries
    7
    Rep Power
    20

    Default

    Start reading the API documentation for the KeyEvent class; also, the System class can give you a milli second timer (the accuracy isn't really accurate up to a milli second but it's the best we have).

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  3. #3
    ashton is offline Member
    Join Date
    Jan 2009
    Posts
    31
    Rep Power
    0

    Default

    Thanks for the hint, but I am also reading the documentation..

    I really need a piece of code to give me a jump start..

  4. #4
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,189
    Rep Power
    19

    Default

    Once is enough.
    Keystroke Biometrics - help!

    db

  5. #5
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,015
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by ashton View Post
    Thanks for the hint, but I am also reading the documentation..

    I really need a piece of code to give me a jump start..
    Come on, it isn't that difficult: if a KEY_PRESSED event comes in register the current time and key value in a map somehwere; when a KEY_RELEASED event comes in register the current time again and find that key in your map (it has been pressed before so it should be in the map). The time difference is the time duration the key has been held in a pressed position. After the key has been released remove it from the map again. You need the map because of "key roll over".

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

Similar Threads

  1. Keystroke Biometrics - help!
    By ashton in forum AWT / Swing
    Replies: 2
    Last Post: 01-11-2011, 11:29 AM
  2. When would one use the KeyStroke class?
    By Lil_Aziz1 in forum New To Java
    Replies: 8
    Last Post: 06-18-2010, 01:28 AM
  3. More than one KeyStroke (Shortcut) for a JMenuItem
    By hannehomuth in forum Advanced Java
    Replies: 0
    Last Post: 07-25-2008, 03:35 PM
  4. how to read single Keystroke without using return
    By oomanamemni in forum New To Java
    Replies: 1
    Last Post: 02-14-2008, 07:21 PM
  5. Replies: 1
    Last Post: 07-29-2007, 10:53 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
  •