FernandoSBS
FernandoSBS

Reputation: 655

How to make an AutoHotKey script to fix my keyboard repeating key problem?

I don't know how to program AutoHotKey but I think this would be easy for someone who does. My keyboard is defective and it's repeating the E key when I press it, against my will. I press E and it types EE, or EEE. It's the only key with this problem. Thanks for any help.

Upvotes: 0

Views: 599

Answers (1)

Spyre
Spyre

Reputation: 2344

*e:: ;When 'e' is pressd (with or without modifiers like `Shift` or `Alt`)
Send e ;Send 'e' to the computer
Sleep 1000 ;Then delay for a duration of one second [change to taste]
return

Edit:

The code I have above "eats" all modifier keys when used with e, preventing combinations such as Shift+e, Alt+e, etc. In order to fix this, we can just have the hotkey Blind Send the e, which will stop it from suppressing the held down modifiers.

New code:

*e:: ;When 'e' is pressd (with or without modifiers like `Shift` or `Alt`)
Send {Blind}e ;Send 'e' blindly to the computer
Sleep 1000 ;Then delay for a duration of one second [change to taste]
return

Upvotes: 1

Related Questions