Skip to calculator
Veomark

Free · Instant · No signup

Keycode / Keyboard Event Code Inspector

Show charCode, hex, and a Key* guess from a typed character.

Page updated 2026-09-04.

Keycode / Keyboard Event Code Inspector visual
Sponsored

Calculator

One character. Physical key codes are not available here.

Calculated Results

charCode

--

Sponsored

From a typed character to its numeric and code representations

Typing 'A' returns a charCode of 65, hex value 0x41, and a code guess of 'KeyA' -- the standard mapping between the uppercase letter A, its ASCII/Unicode code point, and the physical key it's commonly typed from on a QWERTY layout.

charCode (65) and the KeyboardEvent.code property ('KeyA') answer genuinely different questions: charCode reflects the character's Unicode value, while .code identifies the physical key position on the keyboard regardless of what character it produces -- which matters because .code stays 'KeyA' even on a non-QWERTY layout where that physical key produces a different letter.

0x41 is simply 65 expressed in hexadecimal (4 x 16 + 1 = 65) -- the same numeric value in a different base, useful when working with code that expects or displays character codes in hex rather than decimal.

Why 'code guess' is a guess, not a certainty

Without a real keydown event this is limited to the character you type. This tool infers a plausible KeyboardEvent.code value from the character you typed, but the actual .code value in a real browser keydown event depends on the physical keyboard layout and hardware, which this text-input-based tool has no access to -- it's a reasonable guess for a standard QWERTY layout, not a guaranteed match to what a real keydown event would report.

In a real browser environment, capturing an actual keydown event (rather than inferring from typed text) would give you the definitive charCode, key, code, and keyCode values exactly as that specific browser and keyboard layout produce them -- useful context if this tool's guess needs to be verified against real event data.

Modifier keys, function keys, and non-printable keys (Escape, Tab, arrow keys) don't correspond to a typed character at all, so this text-based inspector can't represent them the way it represents printable characters like 'A'.

Where accurate key-code data actually comes from

For building real keyboard-shortcut handling in an application, testing against actual KeyboardEvent objects in your target browsers is more reliable than inferring codes from typed characters the way this quick-reference tool does.

If ASCII/Unicode character codes more broadly (not tied to keyboard input specifically) are what you need, a general character-code reference table covers that without the keyboard-layout ambiguity this tool has.

Frequently Asked Questions (FAQ)

What's the difference between charCode and the code guess ('KeyA')?

charCode (65) is the Unicode/ASCII numeric value of the character itself. The .code property ('KeyA') identifies the physical key position on a standard keyboard, independent of what character that key actually produces -- on a different keyboard layout, the same physical key could produce a different letter while still reporting code 'KeyA'.

Is the code guess always accurate?

Without a real keydown event this is limited to the character you type. No, it's an inference based on a standard QWERTY layout assumption. The actual .code value from a real keydown event depends on the physical keyboard and layout in use, which this text-based tool can't detect.

How is 0x41 related to 65?

They're the same number in different bases -- 0x41 is hexadecimal notation for the decimal value 65 (4 x 16 + 1 = 65), commonly used interchangeably in code that works with character codes.

Can this tool represent modifier keys like Shift or function keys like F5?

Not directly, since those don't correspond to a typed printable character the way 'A' does. This tool is built around inferring codes from typed text, which doesn't extend to non-printable or modifier keys.

Should I use this tool's output directly in production keyboard-handling code?

Not without verification. Without a real keydown event this is limited to the character you type. For reliable keyboard-shortcut handling, test against actual KeyboardEvent data in your target browsers rather than relying solely on this tool's inferred guess.