3tej home

What is JavaScript Keycode Finder?

A JavaScript Keycode Finder computes javascript keycode finder from the inputs you provide. It applies the standard formula to the values you enter and returns the result instantly, without sending any data to a server. Press any key to see event.key, event.code, event.keyCode, ctrl/shift/alt/meta modifiers.

JavaScript Keycode Finder

Press any key and see its JavaScript event.key, event.code, event.keyCode, and event modifiers live.

🔒 Browser-only ⚡ Instant 💸 Free forever 📡 Works offline 🚫 No signup
← Utilities

TLDR

Click the box, press any key. The page captures the keydown event and shows event.key (the printable character or key name), event.code (the physical key), the deprecated event.keyCode, and modifier flags. Useful for building keyboard shortcuts.

Click here, then press any key

Modifier keys, special keys, all show up

Runs entirely in your browser. No upload, no signup, no logging. Output is for personal or commercial use; we don't claim any rights.

How to use this tool

  1. Enter your inputs. Each field is labeled with what it expects.
  2. Read the result instantly. Numbers update as you type or change inputs.
  3. Adjust to test sensitivity. Change one input at a time to see what moves the result most.
  4. Cross-check the formula in the section below if you want to verify the math.
  5. Copy or screenshot the result for later. The site does not save anything; close the tab and inputs are gone.

About this tool + how it works

This tool runs 100% in your browser - the libraries load from a public CDN and the math runs on your device. Nothing is uploaded to a server. The underlying logic is:

addEventListener('keydown', e => { show e.key, e.code, e.keyCode, e.ctrlKey, e.shiftKey, e.altKey, e.metaKey })

You can verify by opening the browser developer tools and watching the Network tab; you'll see no requests fired during normal use beyond the initial page and library load.

Real-world scenarios where this tool helps

Quick local use

Avoid the cloud round-trip when you just need a fast javascript keycode finder.

Bookmark for later

Stays handy as a tab; no signup, no cookies.

Privacy-sensitive content

Sensitive strings / API keys / personal data stay in your browser.

Mobile and slow connections

Local processing beats waiting on an API response.

What this tool does

  • Runs the javascript keycode finder 100% in your browser - no upload, no API, no signup.
  • Live error messages when input is malformed.
  • One-click Copy and Clear buttons.
  • Works on phones, tablets, and desktops; loads in under a second.
  • Free forever; no premium tier.

What it does NOT do

  • Does not store, log, or send your input anywhere.
  • Does not require an account, an API key, or a paid plan.
  • Does not fix malformed input - garbage in produces an error message.
  • Does not need an internet connection after first page load (libraries cache).

Common mistakes and pitfalls

  • Pasting input with extra whitespace or quotes the format does not allow - clean the input first.
  • Mixing encodings - decode in the right order if input was double-encoded.
  • Comparing against a different tool that uses slightly different conventions.
  • Forgetting to click Copy before navigating away - browser memory clears.

Frequently asked questions

Is this tool free?

Yes - free forever, no signup, no daily limit.

Where does my input go?

Nowhere. The conversion runs entirely in your browser. Nothing is uploaded, stored, or logged.

Does it work offline?

After first load yes. The page caches in your browser.

Are large inputs supported?

Yes up to several megabytes. The transforms are O(n) and the browser handles MBs in milliseconds.

Is the output exactly correct?

Yes - these are deterministic transforms. Same input always gives the same output.

Why use this instead of writing the conversion in Python or Node?

Speed and convenience. The tool is a tab away with a copy button and runs in milliseconds. Useful for one-off tasks where opening a REPL or a script file is overkill. For repeatable / scripted work, do write the Python or Node version.

Can I bookmark this for offline use?

Yes - load the page once, then bookmark. Modern browsers cache the page and any CDN libraries. You can disconnect from the internet and still use the tool. Works great as a tab kept open.

Will this work on every browser?

Yes on every browser released in the last 5 years - Chrome / Edge / Firefox / Safari / Opera all support the Web APIs (Crypto, Canvas, URL constructor) the tools depend on. Internet Explorer 11 and below are not supported.

Can I use the output in production code?

Yes - the math and encodings are standards-compliant. Copy the result into your code. The tool itself is just a front-end; the underlying algorithms (URL encoding, JSON parsing, base64, etc.) are the same browser primitives your code uses.

How is this different from a Chrome extension or VS Code plugin?

Same end result, lower friction. No install, no permission prompt, no extension store. Just paste, transform, copy. The trade-off: an extension can integrate deeper (right-click menu, inline edit) - this is for ad-hoc conversion.

About keyboard event properties

A modern browser fires three keyboard events for every press: keydown, keypress (deprecated), and keyup. Each event object exposes several identifying properties: event.key (the printed character or named key such as Enter), event.code (the physical position on a US QWERTY layout like KeyA or Numpad7), event.keyCode (a legacy numeric identifier), and modifier flags event.shiftKey, event.ctrlKey, event.altKey, and event.metaKey. The W3C UI Events specification standardises key and code; keyCode is deprecated but still ships in every major browser because so much legacy code depends on it.

How to read the result

event.key   = "a"           // logical character, layout dependent
event.code  = "KeyA"        // physical key, layout independent
event.keyCode = 65          // legacy numeric, deprecated
event.shiftKey = false      // boolean modifier flag
Worked example: Pressing Shift plus the A key on a US layout fires keydown with key "A", code "KeyA", keyCode 65, shiftKey true. The same physical key on a German QWERTZ layout still yields code "KeyA" but key "A" (and key "ä" for a different physical key).

Common keys and their values

Physical keyevent.keyevent.codekeyCode
EnterEnterEnter13
EscapeEscapeEscape27
Space" " (space)Space32
Left arrowArrowLeftArrowLeft37
TabTabTab9
BackspaceBackspaceBackspace8
Aa / AKeyA65
11Digit149
F1F1F1112

Pitfalls

  • Using keyCode in new code. It is deprecated; modern guidance is event.code for layout-independent shortcuts (game controls, IDEs) and event.key for text input.
  • IME composition. Asian-language input methods fire compositionstart and compositionend; ignore key events while isComposing is true to avoid garbled text.
  • Dead keys. Pressing tilde then n on a US-International layout fires twice; the second keydown shows key "ñ" but the first has no useful key.
  • Number-row vs numpad. Digit1 and Numpad1 share keyCode 49 in some browsers; use event.code if you need to tell them apart.

Related tools

Keyboard-event FAQ

Why is event.keyCode deprecated?

It was never standardised across browsers and conflates physical position with character. W3C UI Events Level 3 replaced it with event.key (character) and event.code (physical key). Browsers keep keyCode for backward compatibility but new APIs ignore it.

Should I use event.key or event.code?

Use event.key for text input (printable characters, named keys like Enter). Use event.code for game controls and shortcut bindings that should follow the physical key regardless of keyboard layout (WASD movement).

How do I detect the Command key on Mac?

event.metaKey is true when the Command key is held on macOS and the Windows key on Windows. Pair it with event.key to detect Cmd-S: if (e.metaKey and e.key === "s") then preventDefault and save.

Why does Shift change event.key but not event.code?

event.key reports the printed character, which Shift changes from "a" to "A". event.code reports the physical key, which Shift does not change. This is why shortcut handlers using event.code do not need a separate uppercase branch.

Sources: W3C UI Events Specification (Level 3); MDN KeyboardEvent reference. Last updated 2026-05-28.