Press any key combination and instantly see its key name, key code, char code, and active modifier keys (Ctrl, Alt, Shift, Meta) — plus a reference table of common shortcuts for Windows and macOS. Useful for debugging keyboard event handling in web apps.
Click here, then press any key or key combination.
—
| Action | Windows / Linux | macOS |
|---|---|---|
| Copy | Ctrl + C | Cmd + C |
| Paste | Ctrl + V | Cmd + V |
| Cut | Ctrl + X | Cmd + X |
| Undo | Ctrl + Z | Cmd + Z |
| Redo | Ctrl + Y | Cmd + Shift + Z |
| Save | Ctrl + S | Cmd + S |
| Select All | Ctrl + A | Cmd + A |
| Find | Ctrl + F | Cmd + F |
| New Tab | Ctrl + T | Cmd + T |
| Close Tab | Ctrl + W | Cmd + W |
| Refresh Page | F5 / Ctrl + R | Cmd + R |
| Ctrl + P | Cmd + P | |
| Switch App | Alt + Tab | Cmd + Tab |
| Task Manager / Force Quit | Ctrl + Shift + Esc | Cmd + Option + Esc |
| Open Dev Tools | F12 / Ctrl + Shift + I | Cmd + Option + I |
Every keystroke in a browser fires a KeyboardEvent carrying several properties that describe what happened: key (the resolved character or logical name), code (the physical key's position, layout-independent), keyCode (a legacy numeric code), and four boolean modifier flags (ctrlKey, altKey, shiftKey, metaKey) indicating which modifier keys were held at the moment of the press. This tool captures a live keydown event and displays every one of these properties immediately, making it a fast way to inspect exactly what a given key combination produces without writing any code yourself.
On a US keyboard layout, pressing the key physically labeled '1' with Shift held produces key: '!' and code: 'Digit1' — the logical character changed because of the modifier, but the physical key position didn't. On a non-US layout (say, a French AZERTY keyboard), the physical key in the same position might report an entirely different key value by default, since key reflects what character that layout actually types. This distinction matters enormously for shortcut handling: binding a shortcut to code gives you a physical-position-based shortcut that works consistently across keyboard layouts (useful for things like WASD game controls), while binding to key gives you a character-based shortcut that respects what the user is actually typing.
The most common source of confusion when building cross-platform keyboard shortcuts is that macOS conventionally uses Cmd (reported as metaKey) for the shortcuts that Windows and Linux use Ctrl for — a save shortcut is Ctrl+S on Windows but Cmd+S on Mac, both reported through different modifier flags. Well-designed web apps typically detect the user's platform and listen for the appropriate modifier accordingly (often checking both ctrlKey and metaKey and treating either as the same 'primary modifier' for a truly cross-platform shortcut), rather than hardcoding just one.
A few mistakes come up repeatedly when developers wire up their own keyboard shortcuts: forgetting to call preventDefault() and having the browser's own action fire alongside the custom one; not checking event.repeat and having a held-down key fire an action dozens of times per second; and binding shortcuts to key values without accounting for Shift changing that value (a shortcut bound to '?' silently breaks for users on layouts where Shift+/ doesn't produce '?'). Testing a shortcut's actual event data with a tool like this one, across the keyboards and platforms you intend to support, catches these issues before they reach users.
The included shortcut reference table lists the most universally useful keyboard shortcuts across everyday computer use — copy, paste, undo, save, find, and several others — shown side by side for Windows/Linux and macOS. It's included as a quick lookup for developers documenting keyboard shortcuts in their own app's help text or onboarding flow, and as a sanity check when deciding which modifier convention to follow for a new custom shortcut.
Keyboard Shortcut Tester pairs naturally with these developer tools for debugging and reference.