※ 引述《bodhi (????)》之铭言:
: : if (GetKeyState("down")) {
: ^^^这down后面没有模式参数 是指down down吗?
GetKeyState 的文件
https://www.autohotkey.com/docs/commands/GetKeyState.htm
GetKeyState("down") 是用来取得“down”键是否被按下。
如果是按下的状态就回传 1,否则就回传 0。
GetKeyState 可以接受第二个变量,如果设成 "P",它会取得按键的“物理状态”
例如,按住 a,接着 Send {a up}
这时 a 在物理状态是按下,逻辑状态是放开
: 如果只是确认down的发送状态 那无论有没有按 都直接send {xx up}的话
: 会不会什么缺点? 会比较慢? 还是?
就变成按住 up 时会一直连发 down up,是否会比较慢我不清楚
: : Send {down up}
: 如果改用sendinput有没有什么缺点?
没有,如果想要改变 Send 的方式,可以用 SendMode 指令
https://www.autohotkey.com/docs/commands/SendMode.htm
: a::b这种标准的remap 实际上是用send发送的吗?
严格来说是 Send {Blind}
{Blind} 的用途可以参考
https://www.autohotkey.com/docs/commands/Send.htm
里面同时有介绍 SendInput / SendEvent / SendPlay 的差异