ASCII Table & Interactive KeyCode Reference
HOTComprehensive 0-127 ASCII lookup table paired with a live JavaScript KeyboardEvent inspector and code generator.
๐ Recommended WorkflowWorkflow Chain
Tools recommended next in your workflow based on your current task.
Unicode & UTF-8 Byte Inspector
Process, format, or transform your developer payloads next.
Base32, Base58, Hex & UTF-8 Multi-Encoder
Verify security permissions, hash integrity, or subnet rules.
No-Code Regex Builder & Multi-Language Generator
Process, format, or transform your developer payloads next.
Interactive ASCII Table & Modern JavaScript Keyboard Event Reference
The American Standard Code for Information Interchange (ASCII) represents the foundational 7-bit character encoding architecture powering modern digital computing. Encompassing 128 integer code points from 0 to 127, it governs 33 non-printable control characters (such as NUL, LF, CR, TAB, and ESC), 94 printable symbols (Latin alphabet uppercase/lowercase, numerical digits, punctuation marks), and the DEL character.
Concurrently, modern web frontend engineering (React, Vue, TypeScript) relies heavily on keyboard interactionโfrom global shortcut registries to modal dialog dismissal and canvas game navigation. Transitioning away from legacy, deprecated `event.keyCode` APIs to modern W3C specifications (`event.key` and `event.code`) is critical to ensuring robust internationalization and cross-browser consistency.
OrvoKit ASCII & KeyCode Reference pairs a searchable 0-127 ASCII catalog (complete with Decimal, Hex, Octal, Binary, and HTML entity representations) with a real-time Keypress Inspector that captures live browser `event.key`, `event.code`, `event.which`, and active modifier states (Alt, Ctrl, Shift, Meta) instantly.
7-Bit Binary Mapping & W3C KeyboardEvent Architecture
The binary structure of the ASCII character set alongside the semantic distinction between physical key locations (code) and generated text values (key).
Because `event.keyCode` is deprecated, use `event.key` when interested in the actual text produced by the user, and use `event.code` for shortcuts or gaming inputs where physical key location matters independently of keyboard layout.
๐ Enables robust keyboard interaction across all international locales and hardware setups.
Essential ASCII Control Characters & Core KeyCode Reference
Quick-reference table of standard control codes, whitespaces, and key points in the ASCII spectrum
| Decimal | Hex | Character | Description & Control Role | JS event.key | Common Use Case |
|---|---|---|---|---|---|
| 0 | 0x00 | NUL | Null Character | '\0' | String terminator in C/C++ |
| 9 | 0x09 | HT / TAB | Horizontal Tab | 'Tab' | Indentation, form navigation |
| 10 | 0x0A | LF | Line Feed | '\n' | Unix/Linux newline delimiter |
| 13 | 0x0D | CR | Carriage Return | 'Enter' | Windows newline (\r\n), Enter key |
| 27 | 0x1B | ESC | Escape | 'Escape' | Closing dialogs, cancel actions |
| 32 | 0x20 | Space | Space Character | ' ' | Standard word delimiter |
| 65 | 0x41 | A | Latin Capital Letter A | 'A' | Start of uppercase alphabet (0x41-0x5A) |
| 97 | 0x61 | a | Latin Small Letter a | 'a' | Start of lowercase alphabet (0x61-0x7A) |
* Uppercase and lowercase ASCII letters differ only by the 6th bit (0x20 = 32), facilitating trivial bitwise case conversion.
How to Use
11. Press Any Key to Test
Press any keyboard key (e.g. Enter, Esc, Space, arrows, or F1-F12) to inspect its live KeyboardEvent payload in the top card.
22. Copy JavaScript Boilerplate
Click [Copy Code] to copy production-ready `if (e.key === 'Enter')` or `if (e.code === 'KeyW')` code snippets directly.
33. Search ASCII Table
Search the comprehensive ASCII table by character, decimal value, hex identifier (0x41), or control description (CR, LF, TAB).
44. Retrieve HTML Entities
Copy safe HTML character references such as `&` or `<` for embedding special characters in web templates.
Frontend Engineering Implementation Scenarios
Real-world keyboard handling patterns in web applications
Cleanly detect if (e.key === 'Enter') submit() or if (e.key === 'Escape') closeModal().
Bind character movement to e.code === 'KeyW' to ensure consistent layout across international keyboards.
Detect ASCII 9 (Tab) and ASCII 10/13 (LF/CR) when streaming tabular text payloads.
Convert Windows CRLF (\r\n) and legacy Mac CR (\r) to standardized Unix LF (\n).
๐ก Keyboard Event Handling Best Practices
Adopt `event.key` and `event.code` across your codebases to eliminate inconsistencies between browsers and platforms.
For CJK (Chinese, Japanese, Korean) input, guard against duplicate enter events with `if (e.isComposing) return;`.
Remember that `e.code` is the string 'Space', while `e.key` is a single literal whitespace character (' ').
โ ๏ธ Common Pitfalls & Mistakes to Avoid
Frequently Asked Questions (FAQ)
Expert answers to the most frequently asked questions and edge cases.
ASCII is a 7-bit character encoding system containing exactly 128 characters (0 through 127), spanning 33 non-printable control characters, 94 printable symbols, and the space character.
`event.key` reflects the textual character produced by the keypress (locale-sensitive, reflecting Shift/Caps state), whereas `event.code` identifies the physical key location on the keyboard hardware.
The W3C deprecated `event.keyCode` and `event.which` because different browsers and operating systems historically returned conflicting numeric codes, especially across non-US keyboard layouts.
When composing characters via an IME (Input Method Editor), the first Enter confirms the active character composition, and the second submits the form. You can prevent this with `if (e.isComposing) return;`.
CR (ASCII 13, `\r`) moves the cursor to the beginning of the line, while LF (ASCII 10, `\n`) advances down to the next line. Windows uses CRLF (`\r\n`) while Unix/Linux/macOS use LF (`\n`).
No. Keypress detection runs strictly within your browser's local DOM event listener. No keystrokes or system telemetry are ever logged or transmitted.