Keyboard Shortcuts Viewer - Online Your Browser & OS Keys
Display a dynamic list of keyboard shortcuts for the current browser and operating system. Filter by category. Keep it open for reference.
UD5 Toolkit
Real-time inspection of keydown, keyup & keypress events — see key, code, keyCode, modifiers, and more.
| # | Time | Type | Key | Code | keyCode | Modifiers | Repeat | Location |
|---|---|---|---|---|---|---|---|---|
| No events captured yet. Click the capture zone and press keys. | ||||||||
event.key returns the logical character value of the key pressed — it respects the keyboard layout and modifier state. For example, pressing the Q key on a QWERTY layout returns "q", while on an AZERTY layout it returns "a". With Shift held, it returns "Q" or "A" respectively.
event.code returns the physical key location on the keyboard, independent of layout. The Q key always returns "KeyQ" regardless of keyboard layout. This makes code ideal for game controls (WASD), keyboard shortcuts, and layout-agnostic key handling.
Use event.code for physical key identification (games, shortcuts); use event.key for character input (text fields, editors).
event.keyCode (and event.which) are deprecated because they return numeric codes that are inconsistent across browsers and keyboard layouts. They don't distinguish between upper/lowercase and fail to represent many modern Unicode characters.
Replacements:
event.key for the character value (e.g., "a", "Enter", "ArrowUp").event.code for the physical key (e.g., "KeyA", "Enter", "ArrowUp").Both key and code are supported in all modern browsers and provide much clearer, layout-aware key identification.
The event.location property tells you which physical key was pressed when multiple identical keys exist on a keyboard:
| Value | Constant | Meaning |
|---|---|---|
0 | DOM_KEY_LOCATION_STANDARD | Standard key (most keys) |
1 | DOM_KEY_LOCATION_LEFT | Left-side modifier (e.g., left Shift, left Ctrl) |
2 | DOM_KEY_LOCATION_RIGHT | Right-side modifier (e.g., right Shift, right Alt) |
3 | DOM_KEY_LOCATION_NUMPAD | Numpad keys (e.g., numpad 1-9, numpad Enter) |
This is especially useful for differentiating left/right modifier keys or numpad vs. main keyboard digits.
keydown — Fires when a key is pressed down. Fires for all keys (including modifiers, arrows, function keys). The repeat property is true when a key is held down.keyup — Fires when a key is released. Useful for detecting when a modifier or held key is released.keypress — Deprecated. Fires only for printable character keys. Does not fire for modifiers, arrows, or function keys. Not recommended for new projects.For most use cases, keydown and keyup are sufficient and reliable across all browsers.
When a user holds down a key, the operating system generates repeated keydown events. The event.repeat property is true for these auto-repeated events and false for the initial press.
This is useful for:
keyup events never have repeat: true — they only fire once when the key is physically released.
When users type in languages like Chinese, Japanese, or Korean, they use an Input Method Editor (IME) that combines multiple keystrokes into a single character. During composition, event.isComposing is true.
This is critical because during IME composition:
keydown events may fire for what ultimately becomes one character.isComposing to skip events that are part of an active composition session.if (event.isComposing) return; — this simple guard prevents double-processing of IME input in search boxes, form fields, and editors.
Use the modifier boolean properties on the event object:
document.addEventListener('keydown', (event) => {
if (event.ctrlKey && event.key === 'c') {
console.log('Ctrl+C pressed!');
// Handle copy shortcut
}
if (event.metaKey && event.key === 's') {
console.log('Cmd+S (Mac) pressed!');
event.preventDefault(); // Prevent browser save dialog
}
});
The modifier properties (ctrlKey, shiftKey, altKey, metaKey) reflect the real-time state of modifier keys during the event.
Some keys are intercepted by the browser or operating system before JavaScript can process them:
preventDefault().To maximize key capture, ensure the capture zone is focused and enable "Prevent browser defaults" in this tool. However, some OS-level combinations remain uncapturable for security reasons.
The charCode property is only populated during keypress events (which are now deprecated). In keydown and keyup events, charCode is always 0.
This is because keydown fires before the character value is determined (it represents the physical key press), while keypress fires when a character is actually produced.
For modern development, use event.key instead — it provides the character value reliably across all event types.
Mobile virtual keyboards have notable differences from physical keyboards:
0 or 229 (IME processing) for many keys on Android/iOS.For cross-platform compatibility, always test keyboard handling on both desktop and mobile devices, and prefer event.key for character input scenarios.
Display a dynamic list of keyboard shortcuts for the current browser and operating system. Filter by category. Keep it open for reference.
Take a screenshot of the current browser tab using Screen Capture API. Crop, annotate with text and arrows, and download as PNG. Local only.
Click a root key and chord type (Maj, min, 7th) to see the notes highlighted on a piano keyboard. Learn chords fast.
Enter a password and see the estimated time it would take to crack using brute force at different speeds. Educational.
Enter drum diameter, depth, and material to find the shell's approximate fundamental note. For tuning reference.
Build a color palette for charts that works for protanopia, deuteranopia, and grayscale. Export as array.
See the roving tabindex pattern in action. Use arrow keys to navigate a list. Copy the accessible JavaScript pattern.
Enter a URL and see a preview of how it will appear when shared on Facebook, Twitter, LinkedIn. Detect missing tags.
See how many tabs you have open and estimate memory usage based on navigator object. Fun productivity check.
Full-featured scientific calculator with trigonometric, logarithmic, and exponential functions. Clean interface and keyboard support. No installation required.
Drop any file to see its raw hexadecimal representation and ASCII side‑by‑side. Navigate with offset. Client‑side only.
View and edit CSV data in a familiar table interface. Add/delete rows and columns, sort, and export. Fully local, no cloud sync.
Paste a URL and see the og:title, description, image, and twitter card that will be used when shared. No server needed.
Select knife type and see recommended sharpening angle. Visual guide with degree display. Perfect edge every time.
View and edit ID3 tags of MP3 files, including title, artist, album, and artwork. All processing in your browser; no files uploaded.
Paste a simple drum tab or select a pattern and hear it played. Learn drum set notation interactively.
Upload a small file to see each byte as a block, color-coded by value. Visualize the structure of binary data. Client-side.
Enter total drive time or playlist length to figure out how many songs you need. Convert time to estimated tracks.
Find the date of Easter Sunday for any given year. Learn about the computus algorithm. Simple and accurate.
Enter room dimensions and number of walls to calculate needed 4x8 or 4x12 sheets, plus joint compound and tape estimate. Local tool.
Classic solubility rules for ionic compounds in water. Determine if a salt is soluble or forms a precipitate. Static guide.
Find what day of the week any past or future date falls on. Uses Zeller’s congruence. Fun historical reference tool.
Enter a song title and artist to find lyrics using public APIs. Quick preview and copy. A lightweight tool for music lovers.
Remove clicks, pops, and crackle from audio recordings. Useful for digitizing vinyl. Threshold‑based local processing.
Practice calculating network ID, broadcast address, and usable IPs from a random IP/CIDR combination. Instant feedback and score tracking. Perfect for CCNA prep.
Extract the thumbnail image for any YouTube video by pasting its URL. Download in multiple resolutions (HD, SD). Simple and fast.
Remove solid or similar backgrounds from images using color thresholding. No AI, just quick client-side canvas processing. Download as PNG.
Build a group of `<details>` elements where opening one closes others. Optional JavaScript. Copy the accessible snippet.
Build a horizontal scroll‑snap container with configurable snap‑type and alignment. Perfect for image galleries.
Flip images vertically or horizontally, and rotate in 90° increments. Quick and simple editing right in the browser. Download the corrected image instantly.