如何制作 AutoHotKey 脚本来修复我的键盘重复键问题?

问题描述

我不知道如何对 AutoHotKey 进行编程,但我认为这对于会编程的人来说很容易。我的键盘有缺陷,当我按下它时它会违背我的意愿重复 E 键。我按 E 并输入 EE 或 EEE。这是解决这个问题的唯一关键。感谢您的帮助。

解决方法

*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

编辑:

当与 e 一起使用时,我上面的代码“吃掉”了所有修饰键,防止了诸如 Shift+eAlt+e 等。为了解决这个问题,我们可以使用热键 Blind Send e,这将阻止它抑制被按下的修饰符。

新代码:

*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