如何在autohotkey中打破keywait

问题描述 投票:0回答:1

在这里,我想按住Shift键,然后单击q和鼠标左键。然后单击鼠标左键后我想释放Shift键。每当我点击鼠标右键时,我也想释放Shift键。代码在这里,但它不起作用: -

q::
Send {Shift Down}
Hotkey, q, toggle
Send q
Hotkey, q, toggle
   KeyWait LButton, D
        RButton::
        Hotkey, RButton, toggle
        Send {RButton}
        Hotkey, RButton, toggle
        Send {Shift Up}
        return
   KeyWait LButton
Send {Shift Up}
return
autohotkey
1个回答
0
投票

如果Shift键为Down,则q ::不起作用,则需要使用+ q ::

而对于Rbutton ::如果Shift键关闭然后Rbutton ::不起作用,则需要使用+ Rbutton ::

[+ = Shift]

试试这段代码:

; [+ = Shift] [! = Alt] [^ = Ctrl] [# = Win]
#SingleInstance Force

q::
Send {Shift Down}
Hotkey, q, toggle
Send q
Hotkey, q, toggle
   KeyWait LButton, D
        RButton::
        Hotkey, RButton, toggle
        Send {RButton}
        Hotkey, RButton, toggle
        Send {Shift Up}
        return
   KeyWait LButton
Send {Shift Up}
return

+q::
Send {Shift Down}
Hotkey, q, toggle
Send q
Hotkey, q, toggle
   KeyWait LButton, D
        +RButton::
        Hotkey, RButton, toggle
        Send {RButton}
        Hotkey, RButton, toggle
        Send {Shift Up}
        return
   KeyWait LButton
Send {Shift Up}
return
最新问题
© www.soinside.com 2019 - 2024. All rights reserved.