Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Let's pretend keycodes never happened.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 README
Octocat-spinner-32 demo.html
Octocat-spinner-32 keyDecode.js
README
Lets you handle keyboard events without worrying about key codes.

Uses http://unixpapa.com/js/key.html as a starting point.

In progress.

Example:

function keydownEventHandler(e) {
  var key = keyDecode(e);
  if (key === 'f') {
    // Lowercase...
  }
  else if (key === 'F') {
    // ...and uppercase. Normally you'd have to check the shift key.
  }
  else if (key === ';') {
    // The keycode can vary depending on your browser, but don't sweat it.
  }
}
Something went wrong with that request. Please try again.