Quick answer
A keyboard that types by itself usually has a stuck key, debris or liquid under the keys, a chattering switch, or a second keyboard or receiver sending input. To find the cause, disconnect or switch off the keyboard: if the typing stops, the keyboard is at fault; if it continues, check other connected devices, accessibility settings and software. Malware is rarely the cause, but it’s worth ruling out with a scan.

Phantom characters appearing in a document or a search bar filling itself with the same letter is unsettling, but it’s rarely mysterious. The fix starts with working out where the input is coming from.
Step 1: Isolate the source
- Disconnect the keyboard. Unplug a USB keyboard, switch off a wireless one, or remove its batteries.
- Watch what happens. Open a blank text editor and wait a minute.
- If the typing stops, the keyboard (or its receiver) is the problem. Go to the keyboard fixes below.
- If it continues, something else is sending input: another keyboard, a game controller, a remote-access app or an accessibility tool.
On a laptop, plug in an external keyboard and use it for a while. If ghost typing continues from the built-in keyboard, the internal keyboard or something pressing on it is at fault.
Step 2: Fix keyboard-side causes
A stuck key
A single key repeating nonstop is the classic symptom. Look for a key that’s lower than its neighbours or doesn’t spring back. On a mechanical keyboard, pull the keycap and clean around the switch. See how to remove keyboard keys.
Debris or liquid
Crumbs and dried spills can short contacts or hold keys partly down. If anything was spilled, unplug the keyboard, turn it upside down and let it dry fully before testing. Our spilled coffee on keyboard guide walks through the steps. For general cleaning, see how to clean your keyboard.
Switch chatter
If letters appear twice when you press once, a worn or dirty switch may be chattering. Keyboard chatter explains the cause and fixes, including firmware debounce settings.

Wireless interference or a second keyboard
A wireless keyboard paired to more than one computer, or an old keyboard still paired in another room, can send input you didn’t type. Remove old Bluetooth pairings, unplug unused receivers, and keep the receiver close to the keyboard.
Step 3: Check the computer
- Accessibility tools. On Windows, check that the On-Screen Keyboard isn’t open and that Filter Keys or Sticky Keys aren’t misbehaving. On a Mac, check that the Accessibility Keyboard is off in Accessibility settings.
- Other input devices. Unplug game controllers, drawing tablets and macro pads one at a time.
- Remote access apps. If you use remote support or desktop sharing software, close it and see whether the input stops.
- Drivers. On Windows, uninstall the keyboard in Device Manager and restart so Windows reinstalls it.
- Safe mode. If the typing stops in Safe Mode, a startup program or driver is likely responsible.
Run a scan with your built-in security tool, such as Microsoft Defender, if you suspect software. Unexplained typing on its own is far more often a hardware fault than malware.
Laptop keyboard typing by itself
Laptop keyboards are harder to clean and repair. If keys type on their own, try an external keyboard and check for liquid damage. If the case or touchpad is bulging, the battery may be swelling and pressing on the keyboard. Stop using the laptop and get it serviced, because a swollen battery is a safety risk. Our laptop keyboard not working guide covers other fixes.
When to replace the keyboard
If ghost typing continues after cleaning and drying, and the keyboard misbehaves on a second computer, the circuit board is probably damaged. Replacing a desktop keyboard is usually cheaper than repairing it. For a laptop, a keyboard replacement through the manufacturer or a repair shop is the usual fix. If some keys don’t work at all, see keyboard key not working.
FAQ
Why is my keyboard typing random letters?
Usually a stuck key, debris or liquid under the keys, or a wireless keyboard sending input from somewhere else.
Can a virus make my keyboard type by itself?
It’s possible but uncommon. Check for hardware causes first, then run a security scan.
How do I stop my laptop keyboard typing by itself?
Test with an external keyboard, clean and dry the laptop keyboard, check for a swollen battery, and reinstall the keyboard driver.
Why does one key keep repeating?
That key is probably stuck or dirty. Clean under it, or replace the switch on a hot-swap mechanical keyboard.
Is ghost typing the same as ghosting?
No. Keyboard ghosting means some key presses aren’t registered when several keys are held. Ghost typing is unwanted input.
Final thoughts
Ghost typing almost always has a physical cause. Disconnect the keyboard to see where the input is coming from, clean or dry it if needed, remove stray pairings, and only then look at software. Most cases are fixed within minutes.

Experience is what matters at the end!!
Hi! This is Jacob Jay – founder of Keyboardgear.com! From childhood to adulthood, I’ve always remained passionate about IT, and the revolution in this industry, especially gaming on the PC can’t go out of my way. Since I’m an enthusiastic gamer, and I love to experience various gaming accessories, particularly mechanical keyboards, that really boost my gaming adventure manifolds. So, my nerve cells hit me to transfer my experiences into word form and share with others to identify the ideal keyboards perfectly fit for their gaming modes.
I know very well how hard it is to find the high-quality items available on the internet that ought to be exactly the same as seen as on the screen. But the counterfeiters have ruined the user’s trust. As I have passed all such situations, I’m obliged to deliver the genuinity and express the same as what I am saying.
So, now, I’m working on the mission to provide very helpful and frankly but trustworthy reviews and guides about various mechanical keyboards, mouses, and other gaming accessories as per my personal experiences and sound knowledge.