Can Keyboards Get Viruses?

“Can keyboards get viruses?”

This thought might pop into your head if your keyboard starts acting strange.

A virus is malicious software that sticks to any program or game you download from the Internet or get through a USB. When you run any of them on your computer, the virus gets activated.

On the other hand, a keyboard is a piece of hardware known as a Human Interface Device (HID).

Just like any other piece of hardware inside your computer.

So, while most viruses target your computer’s software and files, is it possible for viruses to target hardware?

Let’s take a closer look to see if this is possible.

Is it possible for a keyboard to get a virus?

Since viruses don’t attack hardware directly, you’d think the answer is a “No”.

However, if your keyboard happens to have upgradeable firmware, then your keyboard’s chances of catching a virus might be higher. Firmware is a part software and part hardware, and is capable of having new software installed to it.

So firmware could, in theory, become infected with a virus. Any computer component with RW (Read/Write) memory can have malicious code installed on it, often without your knowledge.

A perfect example of this is Apple’s recent issue with having to patch the “unhackable” iPhone against a serious security flaw.

If you happen to use a wireless keyboard in public spaces (say airports or cafes), there’s a slight chance your computer can get infected through the wireless network.

But that’s more of a secondary infection than anything else.

How Else Can Keyboards Get Viruses?

To infect a keyboard with a virus, you’d need the keyboard right in front of you.

You will need access the keyboard, reverse engineer the firmware, and install a rootkit capable of monitoring the keystrokes of any computer the keyboard is plugged into. 

In Hollywood movies when hackers try to take control of a computer, probably miles away from them, do you see them planning to steal the keyboard, put a virus in it, and connect it to the computer again.

Unlikely.

Instead, hackers take over the entire computer by allowing the virus to enter through a “backdoor” in the computer’s security, typically because of a vulnerability in the operating system.

The virus then sends the critical information to the hackers, who successfully gain remote control of the computer.

But in the real world an actual hack/surveillance would involve somebody doing exactly what we listed above – installing malware onto your keyboard that would record and/or transmit every single keystroke you make.

Detecting a keyboard virus

So how can you check if your keyboard has a virus?

You can’t – not without specialized software or help. That’s because a typical antivirus package is set to monitor the files and memory within your computer, or if a piece of malicious code pushed through your web browser into system memory.

But I’m not aware of any store-bought antivirus software that performs scans on keyboards for viruses.

So that leaves it up to you to spot any odd behavior while using your computer i.e. certain functions take longer or something just seems off.

A slow computer can be ignored by a lot of users while this in fact is a sign of a virus in your computer.

Disinfecting your keyboard

But let’s assume you think your programmable keyboard has a virus and you want to make sure it’s gone.

The easiest way to do that is to simply find the latest firmware for your keyboard and “flash” the keyboard with it. Flashing is the process of erasing the current firmware on any electronic device and replacing it with a newer/functioning version.

But please note that a firmware and driver are not the same thing, so simply upgrading the driver for your keyboard won’t have the same effect.

How often do keyboards get viruses?

And this is where reality meets speculation.

I’ve worked with computer hardware and software for almost 40 years now, and in that time I have never, ever seen a keyboard infected with a virus.

And that includes my time spent working in tech support for an antivirus software company that managed large business clients as well as home users.

But as I’m sitting here writing this it occurred to me that this is exactly the kind of thing cyber criminals would love i.e. being able to install a virus in a piece of firmware that’s not actively scanned by any mainstream antivirus product.

The thing is these guys like to make things easy on themselves, so they’re more likely to stick to random phishing attacks than creating a brand new virus designed to live in specific types of keyboards.

Wrapping it up

Can keyboards get viruses?

Not generally, but in a few cases, your keyboard can be a gateway to your computer being infected with a virus.

But as for a keyboard being actually infected with a virus?

Effectively zero.

So treat this article as a thought experiment and not much more than that.

Scroll to Top