What's the Keycode - JavaScript Keycode Values

A minimal, clean, and fast way to get JavaScript keycode values

JavaScript is often used on the browser client side to perform simple tasks that would otherwise require a full post-back to the server. Many of those simple tasks involve processing text or characters entered into a form element on a web page, and it is often necessary to know the JavaScript keycode values associated with a character. Just press any key on this website to find its associated keycode.

The Ask

A minimal, clean, and fast way to get JavaScript keycode values.

The Competition

After doing a quick Google search, I was able to discover that Cambia Research has the most popular JavaScript keycode identifier on the web. The page requires be to scroll below the fold and click the input box and then press a key to see the related keycode of a key (three step process). It also features a table of all keys and their respective keycodes.

The Answer

My solution provides a one step process of just pressing the key. You do not have to scroll down and you do not have to click anything. A simple instruction of “press any key” is given to the user when the page loads.

See it in Action

If you would like to see the JavaScript KeyCode Generator in action you can check it out here! Feel free to share it around!