Published 15 August 2026 · Last updated 15 August 2026
A "stuck key" is any key the computer treats as held down when your finger is not on it. The character repeats forever, movement carries on in a game, or everything you type comes out capitalised. The cause might be the switch, might be a lost event, or might be another program holding a modifier.
The stuck key test shows which keys the page currently believes are held and flags any key that produced a key-down without a matching key-up, which is usually enough to separate the three cases in under a minute.
Three problems, one symptom
| Physically stuck | Logically stuck | Stuck modifier | |
|---|---|---|---|
| What is happening | The switch is held closed by debris, a jammed keycap or a failed stabiliser | The key-up event was never delivered, so software still thinks the key is down | Another program, a remap tool, or Sticky Keys is asserting a modifier |
| Feel under the finger | Wrong — mushy, crunchy, or the cap does not return | Completely normal | Normal |
| Affects every application? | Yes, and it survives a reboot | Often only one window or application | Usually everything, until cleared |
| Typical trigger | Spill, crumbs, wear, a badly seated keycap | The window lost focus while the key was held | An accidental Sticky Keys activation, a macro, a crashed utility |
| First thing to try | Pull the keycap and inspect | Tap the key once, then click back into the window | Tap each modifier once on its own |
Why logically stuck keys are so common
Keyboard input is a pair of events: a key-down when you press and a key-up when you release. Applications track "is this key held?" by matching them up. The tracking breaks whenever the key-up fails to reach the same place the key-down did.
The everyday cause is losing focus while a key is held. Alt-tab out of a game while still holding W, and the game receives the key-down but never the key-up, because by the time you let go a different window owns the keyboard. Your character keeps walking. The same thing happens when a notification steals focus, when a full-screen application minimises itself, or when a remote desktop session drops mid-press.
Well-behaved software clears its held-key state when it loses focus, and this site's measurement pages treat a focus loss as a reason to discard a sample rather than record a strange one. Plenty of software does not, which is why "alt-tab and my character keeps running" is such a familiar bug. Browser keyboard event timing explains how key-down and key-up events are delivered to a page and why focus changes interrupt them.
A procedure to tell them apart
- Look and feel first. Press the key and let go. Does it return to height cleanly and sound like its neighbours? A cap that sits low, returns slowly, or grinds is a physical problem and you can stop here.
- Open the stuck key test and click into it, then touch nothing. A key shown as held while your hands are off the keyboard means the computer is receiving a continuous held state — consistent with a physical fault or with a key held by other software.
- Tap the suspect key once. If the stuck state clears, it was logical: your tap supplied the missing key-up. If it persists, keep going.
- Change application. Click into a plain text editor and try again. A problem confined to one program is that program's event handling; one that follows you everywhere is hardware or system-wide software.
- Change computer. Plug the keyboard into a different machine. If the key is still stuck there — and especially if it survives a reboot before your usual utilities load — it is almost certainly physical.
If what you actually see is a key producing extra presses rather than one endless press, that is a different fault — see what keyboard chatter is and the chatter test. And if a key produces nothing at all, the keyboard tester is the faster check.
Fixing a physically stuck key
- Reseat the keycap. Pull it straight up with a keycap puller or gently with your fingers, check the stem for damage, and press it back on square. A cap pushed on at an angle can bind against the housing and never come back up.
- Clear debris. Compressed air with the board tilted, then a soft brush. Crumbs under a keycap are the single most common cause on a keyboard that was fine yesterday.
- Check the stabiliser on wide keys — space, Enter, Shift, Backspace. A wire that has popped out of its clip or lost its lubricant makes the key bind on one side and stay down. Reseating the wire usually fixes it outright.
- Clean the switch. After a spill, high-purity isopropyl alcohol on a cotton bud around the switch housing — keyboard unplugged, left to dry completely — often revives a sticky contact. Do not soak a board with electronics you cannot see.
- Replace the switch. Straightforward on a hot-swap board, a desoldering job otherwise. On laptops the mechanism is usually a separate scissor assembly: replaceable, but fiddly.
Fixing a logically stuck key
- Tap the key, then tap each modifier. Press and release left and right Shift, Ctrl, Alt and the Windows or Command key once each. This delivers the key-up events the application is waiting for and clears most cases immediately.
- Click out of the affected window and back in. Some applications reset their held-key state on a focus change even if they failed to the first time. If that does not work, restart the application — a stuck state that lives in one program's own bookkeeping goes with it.
- Rebuild the system input state. Signing out and back in on Windows or macOS resets it without a full reboot. Reach for this when several applications are affected.
- Audit remapping and macro tools. Utilities that intercept and re-emit key events — remappers, macro recorders, game overlays, streaming software — can lose a key-up during a crash or a reload and leave a key asserted. Close them one at a time and retest after each.
- Unplug the keyboard briefly. Disconnecting and reconnecting forces the operating system to rebuild its key state for that device, which clears a held key that is being asserted at the driver level.
Stuck modifiers and Sticky Keys
A permanently held Shift, Ctrl or Alt is its own category, because the symptom is confusing: everything capitalises, clicks select ranges, or ordinary letters trigger shortcuts.
Sticky Keys is the first thing to rule out. It is an accessibility feature that lets a modifier stay active after you release it, so shortcuts can be typed one key at a time. It is genuinely valuable for users who cannot hold two keys simultaneously — but on Windows it can be turned on by pressing Shift five times in a row, which is easy to do accidentally while gaming. Check the accessibility or ease of access settings on Windows, or the accessibility keyboard settings on macOS.
If Sticky Keys is off and a modifier is still held, work through the logical fixes above: tap each modifier, close remapping tools, and check whether a remote desktop or virtual machine session is holding the modifier on the other side of the connection. The keyboard event tester is useful here — it shows the modifier flags carried on every event, so you can see directly whether the browser believes Shift is down while you are pressing nothing.
What a browser test cannot tell you
A web page can only report the key events it received while it had focus. It can show which keys it currently believes are held and flag a key-down with no matching key-up — but it cannot inspect the switch, see events delivered to another application, or distinguish a key held by the hardware from one held by a driver or a remapping tool. Treat the output as a description of the pattern, not a verdict on the keyboard. See the measurement methodology for the full set of limits.
When it is not a stuck key at all
Two lookalikes are worth ruling out. A very short initial key-repeat delay makes a single press feel like it repeats immediately; the key repeat rate test shows the delay and interval your system is using, and both are adjustable in your operating system's keyboard settings. And a chattering switch produces bursts of separate presses rather than one continuous hold, which the chatter test distinguishes by timing.
If the keyboard feels wrong in a way none of this explains — sluggish rather than stuck — the browser keyboard latency test measures the input timing your browser actually observes, which is a better starting point than guessing.
Frequently asked questions
Why does my keyboard think a key is held when it is not?
Usually because the key-up event was never delivered. If the window loses focus while a key is held — an alt-tab, a notification stealing focus, a game switching to another window — the application that saw the key go down may never see it come back up, so it keeps treating the key as held.
How do I clear a stuck modifier key?
Press and release each modifier once on its own: left and right Shift, Ctrl, Alt and the Windows or Command key. That delivers the key-up the application is waiting for. If it persists, check whether Sticky Keys is enabled, then close remapping or macro utilities one at a time.
Is a stuck key always a hardware fault?
No, and in practice it often is not. A physically stuck key feels wrong under the finger and stays down in every application. A logically stuck key feels normal and typically clears when you tap the key again or restart the affected program, which points at the software layer rather than the switch.
Can a browser page detect a stuck key?
It can show which keys the page currently believes are held, and flag keys that produced a key-down with no matching key-up. That is useful evidence, but it describes what the browser received. It cannot inspect the switch, and a key stuck before the page had focus may not appear at all.