If you’ve ever had a repeating key, you will know how annoying it can be. Every time you have to double back to erase a duplicate “i” or “s,” you lose a little time. It may even interfere with your thought flow, killing your productivity throughout the day.

The good news is that repeating keys are typically easily fixed, especially if it ends up being a hardware problem. Here are a few troubleshooting steps to take to fix those pesky repeat letters.

Start Simple

As with any computer issue, it’s important to tackle the simplest troubleshooting steps first. If you have another keyboard, plug it in and start typing.

This will help you narrow down whether your existing keyboard is the problem.

Clean & Repair Keys

The next fairly simple step is to clean your keyboard. You should already give your computer a thorough cleaning on a fairly regular basis, but your keyboard is especially prone to dirt.

Shut the computer down and turn the keyboard upside down to shake out any loose debris. Wipe the keys down and used canned air to loosen any dirt that might be trapped. You can then turn the keyboard upside down again to eliminate what the canned air has dislodged.

If that doesn’t do the trick, you may need to remove the keys that are repeating and clean beneath them with a cotton swab.

Run Operating System Updates

If you haven’t updated your system recently, a quick operating system update can never hurt. On a Windows 10 machine, go to Start > Settings > Update and Security > Windows Update.

For MacOS, click on the Apple icon in the upper-left corner and choose App Store>Updates. You can also use a program like Windows Driver Booster to check for any outdated keyboard drivers and make them current.

Check System Configuration

Once you’ve physically inspected your keyboard and ruled that cause out, it’s time to check your system configuration. To do this, you’ll need to boot your computer in safe mode.

Only essential programs run when you’re in safe mode, so you can try typing in that mode and see if the problem persists. If it does, it’s likely a software issue.

Turn Off Key Repeat

On Mac laptops, there’s a setting called Key Repeat designed to allow you to press on a key and hold it to type the same letter over and over until you release it. If you’re experiencing duplicate keys on more than one key, this could be the culprit.

Type Keyboard in the Spotlight Search bar to open your keyboard settings. In the Keyboard tab, toggle Key Repeat to Off.

Reset to Default

In Windows 10, you can reset your keyboard to its factory settings. Go to Windows Settings > Time & Language > Region and Language. There, you’ll add a new language, make that new language the primary one, then move English back to the top. This will reset the keyboard.

With a Mac, you can reset your keyboard by resetting the Mac SMC. The easiest way to do this is to remove the battery, press and hold the power button for five seconds, and reinstall the battery. Choose Apple > Shut Down.

Once your computer is off, press the Shift, Control, and Option keys while pressing the power button at the same time. Hold for ten seconds, then release all keys. When you press your power button again, your computer will boot up.