Home / Keyboard fixes / Keys typing automatically

How To Fix Keyboard Keys Automatically Typing

Your keyboard types letters, numbers or shortcuts you never pressed, repeats a key, or types the wrong characters. Run a 60-second test to learn whether it is a setting, software or hardware, then follow the matching fix.

Updated October 16, 2026. Covers Windows 11 and 10 laptops and desktops, with notes for Mac, Chromebook and phones.

Quick answer60-second testPick your symptomCausesFix 12345678Specific keysAppsAdvancedDiagnosticsRepair or replaceMac, Chromebook, phonePreventFAQ
Laptop keyboard typing random letters by itself on a Windows 11 screen

Quick answer

Start here: turn off Filter Keys, Sticky Keys and Toggle Keys in Settings → Accessibility → Keyboard, switch off Num Lock, then restart. If one key still repeats, clean under it. If the keyboard types by itself even in the BIOS, the keyboard is failing and needs replacing.

A keyboard that types on its own is usually one of two things: a physical key that is stuck or shorted, or a Windows setting or program changing what your keys do. Both are fixable, and the test below tells you which one you have.

The 60-second test: software or hardware?

  1. Notepad test. Open Notepad and stop touching the keyboard. Watch whether characters appear.
  2. On-screen keyboard. Press Win+Ctrl+O. It highlights keys as they register, so you can see which one is stuck, including Ctrl, Alt or Win.
  3. Safe Mode. Hold Shift while clicking Restart, then choose Troubleshoot → Startup Settings → Safe Mode. If the typing stops, a driver or app is to blame.
  4. BIOS test. Restart and open the BIOS or UEFI screen (often F2, Del or Esc). If keys still act up there, Windows is not involved, so it is hardware.
  5. Second device. For an external keyboard, plug it into another computer. Same fault there means the keyboard is bad.

Pick your symptom

What is the keyboard doing?
Choose a symptom to see the likely cause and which fix to try first.

Why keyboard keys type automatically

CauseTypical signFix
Stuck, dirty or shorted keyOne letter repeats or types aloneFix 2
Filter, Sticky or Toggle KeysDoubled letters, delays, beeps, odd shortcutsFix 3
Num Lock, Caps Lock or wrong layoutNumbers instead of letters, symbols, backwards textFix 4
Bad or outdated keyboard driverStarted after an update, wrong keysFix 5
Macro, remote or gaming softwareFine in Safe Mode, bad in WindowsFix 6
Low battery, interference, loose USBWireless keyboard types in burstsFix 7
Liquid, worn membrane, damaged ribbon cableTyping even in BIOS, many keys at onceFix 8
1

Restart and isolate the problem

2 minutesFixes: random one-time glitches

Shut down fully instead of just restarting. Hold Shift and click Shut down to skip Fast Startup, wait 30 seconds, then power on. Unplug USB devices you do not need, especially unknown ones, then run the test above. Install pending Windows updates afterward.

2

Free a stuck key and clean the keyboard

10 minutesFixes: one key repeating, keys typing "and typing"
  1. Power the computer off and unplug the keyboard.
  2. Press the problem key 20 times, firmly and from the sides, to release grit.
  3. Turn the keyboard sideways and use short bursts of compressed air under the keys.
  4. Dab around the key with a cotton swab lightly dampened with 70% isopropyl alcohol.
  5. On detachable keycaps, lift the cap gently, clean the switch area and press it back down.

Do not pour liquid into a laptop keyboard. If you spilled a drink, power off now and see Fix 8.

3

Turn off Filter Keys, Sticky Keys and Toggle Keys

2 minutesFixes: double letters, ignored or repeated presses, odd shortcuts

These accessibility features change how Windows reads keystrokes. They can switch on by accident: holding Shift for 8 seconds offers Filter Keys, and pressing Shift five times offers Sticky Keys.

  1. Open Settings → Accessibility → Keyboard.
  2. Turn off Sticky keys, Filter keys and Toggle keys, and untick the shortcut options so they cannot trigger again.
  3. Open Control Panel → Keyboard and raise Repeat delay, then lower Repeat rate to stop multiple letters from one press.
  4. In Settings → Accessibility → Mouse, make sure Mouse keys is off. It lets the number pad move the pointer.

If you rely on these features for hand tremors, keep Filter Keys on and tune it instead of removing it.

4

Check Num Lock, Caps Lock, Fn lock and layout

2 minutesFixes: numbers instead of letters, wrong characters, backwards typing
  • Numbers instead of letters: many laptops embed a number pad in U I O J K L M. Press Num Lock or Fn+Num Lock to turn it off. This is why a J can type a 1.
  • Wrong or garbled characters: press Win+Space until the layout reads English (US). Remove extra layouts in Settings → Time & language → Language & region.
  • Backwards typing: a right-to-left layout or direction toggle is active. Ctrl+left Shift usually returns to left-to-right in layouts that support both.
  • Arrow keys not moving: Scroll Lock may be on.
  • All caps or function keys acting up: check Caps Lock and Fn Lock (a key with a padlock icon).
5

Run the troubleshooter and reinstall the keyboard driver

10 minutesFixes: started after an update, wrong keys
  1. Open Settings → System → Troubleshoot → Other troubleshooters and run Keyboard if it is listed. If it is missing, use Get Help.
  2. Right-click Start → Device Manager → expand Keyboards.
  3. Right-click your keyboard (for example HID Keyboard Device or Standard PS/2 Keyboard) → Uninstall device. Do not tick the delete-driver option.
  4. Restart. Windows reinstalls the driver automatically.
  5. Download the latest keyboard, chipset and BIOS updates from your laptop maker's support page (HP, Dell, Lenovo, ASUS, Acer).

If the problem began right after an update, open Settings → Windows Update → Update history → Uninstall updates and remove the newest one as a test.

6

Find software that injects keystrokes

15 minutesFixes: typing fine in Safe Mode, wrong in Windows, shortcuts opening programs

Macro tools such as AutoHotkey, gaming keyboard software, auto-clickers, remote-support apps and some text-expander programs can send keystrokes.

  1. Open Task Manager → Startup apps and disable anything you do not recognize or need.
  2. Press Win+R, type msconfig, open Services, tick Hide all Microsoft services, click Disable all and restart (a clean boot).
  3. If typing is normal, re-enable services in small groups until it returns.
  4. Run Windows Security → Virus & threat protection → Scan options → Microsoft Defender Antivirus (offline scan).

Uninstall remote-access tools you did not install yourself. A malicious USB device can also type commands, so remove any you do not recognize.

7

Fix wireless and external keyboard problems

5 minutesFixes: typing in bursts, repeating, missed keys
  • Replace or recharge the batteries. A weak battery causes repeats and dropouts.
  • Move the USB receiver to a front port on a short extension, away from routers and external drives.
  • Remove the Bluetooth device in Settings and pair it again.
  • Try another USB port and a different cable.
  • Rest your wrists off the keys. Heavy palm contact can hold keys down on thin keyboards.
8

Treat hardware damage

VariesFixes: typing in the BIOS, spills, many keys at once

If the BIOS test showed the fault, the keyboard itself is failing. Common causes are liquid residue, a worn membrane layer, a pinched ribbon cable, or heat swelling a battery under the keyboard.

  1. Use an external USB keyboard to work safely right away.
  2. To stop a laptop keyboard from sending phantom keys, open Device Manager, right-click the internal keyboard and choose Disable device (or uninstall it). You can re-enable it later.
  3. If the laptop is under warranty, contact the manufacturer before opening it.
  4. Otherwise have a technician replace the keyboard. Many laptop keyboards cost far less than a new machine.

Swollen battery warning: if the trackpad clicks poorly or the case bulges, stop using the laptop and have the battery checked.

Specific key problems (E, F, G, H, J, R, V, X, Z)

When one letter misbehaves, the pattern tells you a lot. Use this table before you replace anything.

What happensMost likely causeWhat to do
J types 1, K types 2, L types 3Laptop Num Lock is onNum Lock or Fn+Num Lock (Fix 4)
R, F or E keeps repeatingDebris under the key or a worn switchClean it (Fix 2). If it also repeats in the on-screen keyboard test, replace the keyboard.
G and H, or Z and Y, swappedWrong layout (for example German QWERTZ)Win+Space to English (US)
V or X dead, others fineDirt, a lifted keycap or a damaged contactReseat the keycap, then test in the BIOS
A key types after you press anotherKey ghosting or limited rolloverUse a keyboard with n-key rollover for gaming
One key types a letter plus a symbol (k becomes 2k#)Filter Keys, a layout mismatch or a text shortcutFix 3 and Fix 4
Shift or Ctrl seems permanently pressedStuck modifier or Sticky KeysTap each modifier twice, then Fix 3

Ghosting is not ghost typing

Ghost typing means keys register without you pressing them. Ghosting means a keyboard cannot read many keys held at once, so a key you pressed does not register, or an extra one appears. Gaming keyboards advertise n-key rollover to avoid it. If the problem happens only while holding several keys, it is likely ghosting and not a fault.

When it happens only in one app or situation

WhereWhy it happensFix
Excel or Word (numbers, arrow keys act strange)Scroll Lock, Num Lock or Sticky Keys is onToggle Scroll Lock and Num Lock, then check the status bar
Chrome or Edge text boxesA browser extension, autofill or text expanderTry a private window, then disable extensions one by one
GamesOverlay, macro or auto-clicker softwareClose the overlay and keyboard software, then test (Fix 6)
VS Code or other editorsAuto-complete, snippets or extension shortcutsDisable extensions or test in Notepad first
Remote Desktop or a virtual machineKeys stuck after a connection dropsPress every modifier key once, then reconnect
Only after sleep or wakeDriver or power-management glitchFix 5, and turn off Fast Startup
Only at the sign-in screenHardware, or a layout different from your accountBIOS test, then Fix 4

Advanced Windows fixes

Roll back the keyboard driver

In Device Manager, double-click your keyboard, open the Driver tab and click Roll Back Driver if it is available. This undoes a bad driver update.

Repair Windows files

Run these in an administrator Terminal, then restart:

DISM /Online /Cleanup-Image /RestoreHealth
sfc /scannow

Reset Filter Keys, Sticky Keys and Toggle Keys to defaults

If the settings keep switching on, reset their stored flags to the usual default values, then sign out and back in. Back up your registry first.

reg add "HKCU\Control Panel\Accessibility\Keyboard Response" /v Flags /t REG_SZ /d 126 /f
reg add "HKCU\Control Panel\Accessibility\StickyKeys" /v Flags /t REG_SZ /d 506 /f
reg add "HKCU\Control Panel\Accessibility\ToggleKeys" /v Flags /t REG_SZ /d 58 /f

Rule out your profile

Create a new local account in Settings → Accounts → Other users and test typing there. If it works, your original profile or its settings are the cause.

Built-in hardware diagnostics by brand

Major makers include a keyboard test that runs outside Windows, which is the cleanest hardware check you can get.

BrandToolHow to open it
HPPC Hardware Diagnostics UEFIRestart and tap F2
DellSupportAssist pre-boot checkRestart and tap F12
LenovoLenovo Diagnostics or VantageTap F10 at startup, or use the Vantage app
ASUSMyASUS system diagnosisOpen the MyASUS app
AcerAcer Care CenterOpen the Care Center app

Keys vary by model. If a tool reports a keyboard failure, you have proof for a warranty claim.

Repair, replace or live with it?

SituationBest move
Fixed by a setting, layout or Num LockNothing to buy. Keep the settings off.
External keyboard that fails on a second PCReplace it. A new one often costs less than an hour of troubleshooting.
Laptop keyboard fails in the BIOS, under warrantyWarranty repair
Laptop keyboard fails in the BIOS, out of warrantyReplace the keyboard module, or use an external one
Liquid spillPower off and dry it, then repair promptly before corrosion spreads
Bulging battery or warped caseStop using the laptop and get it inspected

How to prevent keyboard problems

Final checklist: Notepad test, on-screen keyboard, Safe Mode, BIOS, then Filter Keys, Num Lock and layout, then driver, then software, then hardware. Stop at the first step that fixes it.

Mac, Chromebook, iPhone and Android

DeviceWhere to look
MacSystem Settings → Accessibility → Keyboard: turn off Sticky Keys and Slow Keys. Check System Settings → Keyboard for Key repeat rate and Delay until repeat. Try Safe Mode.
ChromebookSettings → Device → Keyboard for repeat settings, and Accessibility → Keyboard for sticky keys. Powerwash only as a last resort.
iPhoneSettings → General → Keyboard: review Text Replacement, Auto-Correction and Shortcuts. Restart and update iOS.
AndroidSettings → System → Languages & input: clear Gboard cache, check text shortcuts and personal dictionary, and update the keyboard app.

Frequently asked questions

Why is my keyboard typing by itself?

The most common causes are a stuck or dirty key, Filter Keys or Sticky Keys settings, a wrong layout or Num Lock state, a bad driver, background software such as macro tools, or failing hardware. Test in Notepad and the BIOS to tell software from hardware.

How do I stop my keyboard from typing multiple letters?

Turn off Filter Keys, then increase the repeat delay and lower the repeat rate in Keyboard Properties. If one key still repeats, clean under it or replace the keyboard.

Why does my keyboard type numbers instead of letters?

On many laptops Num Lock turns letters such as J, K, L, U, I and O into number keys. Press Num Lock or Fn plus the Num Lock key to switch it off.

How do I know if the problem is hardware or software?

If the keyboard still types by itself in the BIOS or UEFI setup screen, or on a second computer, the cause is hardware. If it behaves normally there but fails in Windows, it is software, a driver or a setting.

Why is my keyboard typing backwards?

A right-to-left language layout or text direction may be active. Switch layouts with Windows plus Space and make sure English (US) is selected. Some layouts change text direction with Ctrl plus Shift.

Can a virus make my keyboard type on its own?

It is possible but uncommon. Remote-access tools, macro software or a malicious USB device can inject keystrokes. Run a Microsoft Defender offline scan and unplug unknown USB devices.

Why does my laptop keyboard type on its own after spilling a drink?

Liquid leaves residue that connects key contacts, so keys register without being pressed. Shut the laptop down, let it dry, and have the keyboard cleaned or replaced. Use an external keyboard meanwhile.

Is it safe to keep using a keyboard that types by itself?

Not while you are entering passwords or editing important files, because random keystrokes can send commands, delete data or submit forms. Use an external keyboard until the fault is fixed.

Why do some letters type numbers on my laptop?

Many laptops have an embedded number pad on keys such as U, I, O, J, K, L and M. When Num Lock is on, those keys type numbers. Press Num Lock or Fn plus Num Lock to switch it off.

How do I reset Filter Keys and Sticky Keys in Windows?

Open Settings, Accessibility, Keyboard and turn off Sticky keys, Filter keys and Toggle keys. If they keep turning on, reset their registry flags to the default values, then sign out and back in.

Should I replace my laptop keyboard or buy an external one?

If the keyboard fails in the BIOS and the laptop is under warranty, request a warranty repair. Otherwise an external keyboard is the cheapest immediate fix, and you can disable the internal keyboard in Device Manager.

Why does my keyboard type on its own only when I wake the computer?

A driver or power-management glitch is likely. Reinstall the keyboard driver, install BIOS and chipset updates, and turn off Fast Startup to test.