CSS & Frontend

Keycode Event Checker

Check key codes and key events for keyboard keys

About

This keycode checker displays information about keyboard events when you press keys. It shows key codes, key names, and other event properties. Useful for developers working with keyboard events in JavaScript. ### How to Use 1. Enter or paste your data in the input field. 2. Adjust any available settings or options. 3. Click the action button to process. 4. Copy or download the result.

Try It Now

Press any key on your keyboard to see its keycode information.

Press any key on your keyboard

Focus this area and start typing to see keycode information

Example Usage

JavaScript Event Listener

document.addEventListener('keydown', (e) => {
  console.log('Key:', e.key);
  console.log('Key Code:', e.keyCode);
  console.log('Code:', e.code);
  console.log('Shift:', e.shiftKey);
  console.log('Ctrl:', e.ctrlKey);
  console.log('Alt:', e.altKey);
  console.log('Meta:', e.metaKey);
});

jQuery Key Event

$(document).keydown(function(e) {
  console.log('Key:', e.key);
  console.log('Key Code:', e.keyCode);
  console.log('Code:', e.code);
  console.log('Shift:', e.shiftKey);
  console.log('Ctrl:', e.ctrlKey);
  console.log('Alt:', e.altKey);
  console.log('Meta:', e.metaKey);
});

Examples

Input

Press "A" key
Check Keycode

Output

Key: a, Code: KeyA, KeyCode: 65

Keycode information for "A" key

FAQ

What's the difference between key and code?

The "key" property shows the character generated, while "code" shows the physical key pressed, regardless of modifiers.

Is this tool compatible with all browsers?

The tool works in most modern browsers, but key event properties may vary slightly between browsers.

Is this tool free?

Yes, this tool is completely free to use.

Is my data secure?

Yes, all processing is done in your browser. Your data is not sent to any server.

Does it work offline?

Yes, once the page is loaded, you can use the tool offline.

Related Tools