你的方向是正确的。您需要做的就是创建一个要检查的按键列表,然后添加一个 if 语句(如果需要)以在按下时取消按键。
KeyList := "Shift|a|b|c|d|e|f|g|h|i|j" ; and so on
Loop, Parse, KeyList, |
{
If GetKeystate(A_Loopfield, "P")
Send % "{" A_Loopfield " Up}"
}
Run Code Online (Sandbox Code Playgroud)