Folge.meCreate step-by-step guides and documentation with Folge. One-Time Price, Private, Offline. Best alternative to ScribeHow, Tango.us.
Keyboard Event Javascript Information Tool
Get detailed information about javascript keyboard events, key codes, and generate code snippets instantly.
Tool Introduction
The Javascript Keycode Info tool is an advanced utility for developers working with keyboard events in web applications. It provides real-time, detailed information about keyboard events, including physical key locations, character codes, modifier states, and automatically generates implementation code. With features like event history, pausable recording, and comprehensive event data dumps, it's an essential tool for developers working on keyboard interactions, game controls, or accessibility features.
Features
- Real-time key event information display
- Complete modifier key detection and combination display
- Interactive 10-event history with full details
- Auto-generated code snippets for JavaScript and React
- TypeScript type definitions generation
- Comprehensive event data dumps
- One-click code and data copying
- Pausable event recording
- Physical key location detection
- Character code information
- Event timestamp tracking
- Support for all keyboard layouts
Common Key Codes Reference
Key Code | Key | Code | Unicode | Description |
---|---|---|---|---|
8 | Backspace | Backspace | \u0008 | Backspace key |
9 | Tab | Tab | \u0009 | Tab key |
13 | Enter | Enter | \u000D | Enter/Return key |
16 | Shift | ShiftLeft/ShiftRight | Shift key (left or right) | |
17 | Control | ControlLeft/ControlRight | Control key (left or right) | |
18 | Alt | AltLeft/AltRight | Alt/Option key (left or right) | |
19 | Pause | Pause | Pause/Break key | |
20 | CapsLock | CapsLock | Caps Lock key | |
27 | Escape | Escape | \u001B | Escape key |
32 | | Space | \u0020 | Space key |
33 | PageUp | PageUp | Page Up key | |
34 | PageDown | PageDown | Page Down key | |
35 | End | End | End key | |
36 | Home | Home | Home key | |
37 | ArrowLeft | ArrowLeft | Left arrow key | |
38 | ArrowUp | ArrowUp | Up arrow key | |
39 | ArrowRight | ArrowRight | Right arrow key | |
40 | ArrowDown | ArrowDown | Down arrow key | |
41 | ) | Digit0 | \u0029 | Right parenthesis |
42 | * | Digit8 | \u002A | Asterisk |
43 | + | Equal | \u002B | Plus sign |
44 | , | Comma | \u002C | Comma |
45 | Insert | Insert | Insert key | |
46 | Delete | Delete | Delete key | |
47 | / | Slash | \u002F | Forward slash |
48 | 0 | Digit0 | \u0030 | Number 0 |
49 | 1 | Digit1 | \u0031 | Number 1 |
50 | 2 | Digit2 | \u0032 | Number 2 |
51 | 3 | Digit3 | \u0033 | Number 3 |
52 | 4 | Digit4 | \u0034 | Number 4 |
53 | 5 | Digit5 | \u0035 | Number 5 |
54 | 6 | Digit6 | \u0036 | Number 6 |
55 | 7 | Digit7 | \u0037 | Number 7 |
56 | 8 | Digit8 | \u0038 | Number 8 |
57 | 9 | Digit9 | \u0039 | Number 9 |
58 | : | Semicolon | \u003A | Colon |
59 | ; | Semicolon | \u003B | Semicolon |
60 | < | Comma | \u003C | Less than |
61 | = | Equal | \u003D | Equals sign |
62 | > | Period | \u003E | Greater than |
63 | ? | Slash | \u003F | Question mark |
64 | @ | Digit2 | \u0040 | At sign |
65 | a | KeyA | \u0041 | Letter A |
66 | b | KeyB | \u0042 | Letter B |
67 | c | KeyC | \u0043 | Letter C |
68 | d | KeyD | \u0044 | Letter D |
69 | e | KeyE | \u0045 | Letter E |
70 | f | KeyF | \u0046 | Letter F |
71 | g | KeyG | \u0047 | Letter G |
72 | h | KeyH | \u0048 | Letter H |
73 | i | KeyI | \u0049 | Letter I |
74 | j | KeyJ | \u004A | Letter J |
75 | k | KeyK | \u004B | Letter K |
76 | l | KeyL | \u004C | Letter L |
77 | m | KeyM | \u004D | Letter M |
78 | n | KeyN | \u004E | Letter N |
79 | o | KeyO | \u004F | Letter O |
80 | p | KeyP | \u0050 | Letter P |
81 | q | KeyQ | \u0051 | Letter Q |
82 | r | KeyR | \u0052 | Letter R |
83 | s | KeyS | \u0053 | Letter S |
84 | t | KeyT | \u0054 | Letter T |
85 | u | KeyU | \u0055 | Letter U |
86 | v | KeyV | \u0056 | Letter V |
87 | w | KeyW | \u0057 | Letter W |
88 | x | KeyX | \u0058 | Letter X |
89 | y | KeyY | \u0059 | Letter Y |
90 | z | KeyZ | \u005A | Letter Z |
91 | Meta | MetaLeft | Left Windows/Meta key | |
92 | Meta | MetaRight | Right Windows/Meta key | |
93 | ContextMenu | ContextMenu | Context menu key | |
94 | ^ | Digit6 | \u005E | Caret |
95 | _ | Minus | \u005F | Underscore |
96 | ` | Backquote | \u0060 | Backtick |
96 | 0 | Numpad0 | Numpad 0 | |
97 | 1 | Numpad1 | Numpad 1 | |
98 | 2 | Numpad2 | Numpad 2 | |
99 | 3 | Numpad3 | Numpad 3 | |
100 | 4 | Numpad4 | Numpad 4 | |
101 | 5 | Numpad5 | Numpad 5 | |
102 | 6 | Numpad6 | Numpad 6 | |
103 | 7 | Numpad7 | Numpad 7 | |
104 | 8 | Numpad8 | Numpad 8 | |
105 | 9 | Numpad9 | Numpad 9 | |
106 | * | NumpadMultiply | Numpad multiply | |
107 | + | NumpadAdd | Numpad add | |
108 | , | NumpadDecimal | Numpad decimal | |
109 | - | NumpadSubtract | Numpad subtract | |
110 | . | NumpadDecimal | Numpad decimal | |
111 | / | NumpadDivide | Numpad divide | |
112 | F1 | F1 | F1 key | |
113 | F2 | F2 | F2 key | |
114 | F3 | F3 | F3 key | |
115 | F4 | F4 | F4 key | |
116 | F5 | F5 | F5 key | |
117 | F6 | F6 | F6 key | |
118 | F7 | F7 | F7 key | |
119 | F8 | F8 | F8 key | |
120 | F9 | F9 | F9 key | |
121 | F10 | F10 | F10 key | |
122 | F11 | F11 | F11 key | |
123 | F12 | F12 | F12 key | |
144 | NumLock | NumLock | Num Lock key | |
145 | ScrollLock | ScrollLock | Scroll Lock key | |
160 | ^ | Shift | Right shift key | |
161 | ! | Digit1 | \u0021 | Exclamation mark |
163 | # | Digit3 | \u0023 | Hash |
164 | $ | Digit4 | \u0024 | Dollar sign |
165 | ¥ | IntlYen | \u00A5 | Yen sign |
186 | ; | Semicolon | Semicolon/Colon key | |
187 | = | Equal | Equal/Plus key | |
188 | , | Comma | Comma key | |
189 | - | Minus | Minus key | |
190 | . | Period | Period key | |
191 | / | Slash | Forward slash key | |
192 | ` | Backquote | Backtick/Tilde key | |
219 | [ | BracketLeft | Left bracket key | |
220 | \ | Backslash | Backslash key | |
221 | ] | BracketRight | Right bracket key | |
222 | ' | Quote | Quote key | |
223 | ` | Backquote | Backtick key | |
224 | Meta | MetaLeft | Left Meta key | |
225 | AltGraph | AltGraph | Alt Graph key |
Note: Some key codes may vary depending on keyboard layout and browser implementation.
What information does this tool provide?
The tool provides comprehensive keyboard event information including key codes, physical key locations, character codes, modifier states, timestamps, and automatically generates code snippets for both JavaScript and React implementations.
Why would I need this tool?
This tool is essential for developers working on keyboard shortcuts, game controls, accessibility features, or debugging keyboard event handling. It helps understand exactly how different keys and combinations are interpreted by the browser.
How does the history feature work?
The tool maintains a history of your last 10 key presses, each with complete event information. You can click on any historical entry to view its full details and code snippets, making it easy to compare different key events.
What types of code snippets are generated?
The tool automatically generates code snippets for vanilla JavaScript event listeners, React event handlers, and TypeScript type definitions. These snippets include proper handling of modifier keys and are ready to use in your projects.
Does it work with all keyboard layouts?
Yes, the tool works with any keyboard layout and shows both physical key locations (code) and the actual character (key) that would be typed, including international keyboards.
How does the tool handle modifier keys?
The tool accurately detects and displays all modifier keys (Ctrl, Alt, Shift, Meta/Command) and their combinations. It shows both the individual keys and the complete key combination in a readable format.
Can I pause the key recording?
Yes, you can pause and resume key recording at any time using the recording control button. This is useful when you want to focus on analyzing specific key events without new ones being added.
Is the event data copyable?
Yes, all information including the full event dump and code snippets can be copied to clipboard with a single click, making it easy to use the data in your development work.
How accurate is the key code information?
The tool provides real-time, accurate information directly from browser keyboard events, including all standard properties defined in the Web API specification.
Can I use this tool for game development?
Absolutely! The tool is particularly useful for game developers as it provides detailed information about key states, physical key locations, and modifier combinations, which are essential for implementing game controls.
Does it work on mobile devices?
While the tool works on mobile devices, it's most useful with a physical keyboard as it shows detailed keyboard event information. Touch events are not currently supported.