ASCII Table & Interactive KeyCode Reference

HOT

Comprehensive 0-127 ASCII lookup table paired with a live JavaScript KeyboardEvent inspector and code generator.

Browser-Based Processing (Zero Server Upload, Complete Privacy)

๐Ÿš€ Recommended WorkflowWorkflow Chain

Tools recommended next in your workflow based on your current task.

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).

Modern KeyboardEvent: event.key vs event.codeMathematical Formulation
Event.key = 'The printed character value (locale-aware)' | Event.code = 'The physical keyboard key location (hardware layout)'

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.

Comparing Keypress Behaviors on the 'A' Key
Pressing lowercase 'a'key: 'a', code: 'KeyA', keyCode: 65Text matches key location
Pressing Shift + 'a'key: 'A', code: 'KeyA', shiftKey: trueCapital character emitted
Non-Latin Keyboard Layoutkey: 'ั„' (Cyrillic), code: 'KeyA'Physical code remains constant
Pressing Enter Keykey: 'Enter', code: 'Enter', ASCII: 13 (CR) / 10 (LF)Standard control mapping

๐Ÿ‘‰ 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

Essential ASCII Control Characters & Core KeyCode Reference
DecimalHexCharacterDescription & Control RoleJS event.keyCommon Use Case
00x00NULNull Character'\0'String terminator in C/C++
90x09HT / TABHorizontal Tab'Tab'Indentation, form navigation
100x0ALFLine Feed'\n'Unix/Linux newline delimiter
130x0DCRCarriage Return'Enter'Windows newline (\r\n), Enter key
270x1BESCEscape'Escape'Closing dialogs, cancel actions
320x20SpaceSpace Character' 'Standard word delimiter
650x41ALatin Capital Letter A'A'Start of uppercase alphabet (0x41-0x5A)
970x61aLatin 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

Search Inputs & Escape Modal Dismissal

Cleanly detect if (e.key === 'Enter') submit() or if (e.key === 'Escape') closeModal().

Canvas Game WASD Navigation

Bind character movement to e.code === 'KeyW' to ensure consistent layout across international keyboards.

CSV / TSV Parser Implementations

Detect ASCII 9 (Tab) and ASCII 10/13 (LF/CR) when streaming tabular text payloads.

Cross-Platform Line Ending Normalization

Convert Windows CRLF (\r\n) and legacy Mac CR (\r) to standardized Unix LF (\n).

๐Ÿ’ก Keyboard Event Handling Best Practices

โœ“ Avoid Deprecated keyCode & which

Adopt `event.key` and `event.code` across your codebases to eliminate inconsistencies between browsers and platforms.

โœ“ Handle IME Composition on Enter

For CJK (Chinese, Japanese, Korean) input, guard against duplicate enter events with `if (e.isComposing) return;`.

โœ“ Distinguish Space Key Values

Remember that `e.code` is the string 'Space', while `e.key` is a single literal whitespace character (' ').

โš ๏ธ Common Pitfalls & Mistakes to Avoid

โŒ Relying on e.key for Game Controls
โœ… On French (AZERTY) or German (QWERTZ) keyboards, e.key produces different letters. Use e.code to bind to the physical key position.
โŒ Hardcoding Numeric KeyCodes in Modern React
โœ… Writing `if (e.keyCode === 13)` is deprecated. Modern lint rules enforce `if (e.key === 'Enter')` for readability and standards compliance.

Frequently Asked Questions (FAQ)

Expert answers to the most frequently asked questions and edge cases.

6 Q&As

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.

๐Ÿ“‚ Explore more Developer & Data tools (37)
Developer & Data View All โ†’
JSON Formatter & ValidatorBase64 Encoder & DecoderLLM Prompt Token & Model Pricing CalculatorJSON to TypeScript, Zod Schema & Pydantic ConverterJWT Decoder & Expiration Debugger (100% Client-Side)Regex Real-Time Tester & Pattern Snippet LibraryCron Expression Generator & Human TranslatorSQL Query Formatter & BeautifiercURL to JavaScript Fetch, Axios & Python ConverterYAML to JSON & JSON to YAML ValidatorHTML to React JSX & Component ConverterURL Encoder / Decoder & Query String ParserSVG Optimizer & React TSX Icon GeneratorJSON Diff Viewer & Structural ComparatorXML Beautifier & XML to JSON ConverterHTML Entity Encoder & DecoderHTTP Status Code Lookup & REST API GuideUser-Agent Header Parser & Client DetectorCrontab Next 20 Run Schedule SimulatorSQL IN Clause & Batch Query GeneratorCode Minifier & Beautifier (HTML, CSS, JS).gitignore Template & File BuilderContent Security Policy (CSP) & Header BuilderColor Blindness UI & Accessibility SimulatorJSON Schema Generator & Real-Time ValidatorGraphQL to TypeScript Type ConverterDocker Run to Docker Compose ConverterNginx & Apache Web Server Config GeneratorSemVer Calculator & NPM Range EvaluatorAPI Payload Size & Monthly Egress Bandwidth EstimatorCrontab to Systemd Timer Unit ConverterHex to Nearest Tailwind CSS Color MatcherApache .htaccess & Next.js Redirects BuilderRegex Log Highlighter & Grep Line FilterVoltage Drop & Wire Gauge Calculator (AWG / mmยฒ)LED Series Resistor Calculator & Color Code BandsBook ISBN-10 & ISBN-13 Check Digit Validator & Converter