JavaScript - Keystroke Dynamics code

This project was successfully completed by RKille for $83 USD in 5 days.

Get free quotes for a project like this
Project Budget
$30 - $250 USD
Completed In
5 days
Total Bids
Project Description

Need javascript to do keystroke dynamics ([url removed, login to view]) which at a high level is measuring keystroke timings both amount of time the key is held (dwell time) and timing between keystrokes (flight time). This can be done with the keyup & keydown events. I have sample code I can send along, just ask. The code is working but I need clean code from scratch.

Here's what I need:

1) JS code that lets me call a configuration function that specifies which form fields on the current page should be watched for keystrokes.

2) The configuration function then registers event handlers for each form field for keydown and keyup (Example: [url removed, login to view]). I could do this in the original web site code but want minimal work for the user.

3) Hidden elements are created for each field to store keystroke dynamic data, something similar to below. This is so the key data can be passed to the back end.

for (var a in [url removed, login to view]) {

var b = [url removed, login to view]("input");

[url removed, login to view]("type", "hidden");

[url removed, login to view]("name", [url removed, login to view]([url removed, login to view][a]));

[url removed, login to view]("id", "keydata_" + [url removed, login to view]([url removed, login to view][a]));

[url removed, login to view](b, [url removed, login to view][a]);

[url removed, login to view]([url removed, login to view][a], "blur", [url removed, login to view]);

[url removed, login to view][a].onkeydown = [url removed, login to view];

[url removed, login to view][a].onkeyup = [url removed, login to view]

4) Special keys must be handled (Right Shift, Left Shift, Right CTRL, Left CTRL, Right ALT, Left ALT, TAB, ENTER, BACKSPACE, DELETE, CAPSLOCK, and the arrow keys)

5) Data passed consists of timestamp (have code sample), mobile browser flag (have code sample), the keystroke timing data for the field. Each field will send this data.

As I said I have working code, so you can work from that or start from scratch or mix and match.

Completed by:
Skills Required

Looking to make some money?

  • Set your budget and the timeframe
  • Outline your proposal
  • Get paid for your work

Hire Freelancers who also bid on this project

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online