使用按键禁用鼠标

恶魔

有没有一种方法可以分配一个密钥以使用autohotkey阻止其他密钥?我已经尝试过了,尝试添加括号没有用

这是代码

g::

lbutton::
rbutton::
BlockInput, MouseMove

return

如您所见,如果我按g键,我想阻止鼠标输入,请问有人可以帮助我解决此问题吗?

  • 在发布此消息之前,我一直在寻找解决方案2个小时,因此请不要重复报告
用户名
$g::
Mouse_Blocked := true   ; assign the Boolean value "true" or "1" to this variable
BlockInput, MouseMove   ; disable MouseMove
return

; The #If directive creates context-sensitive hotkeys

#If (Mouse_Blocked) ; If this variable has the value "true" 

    ; block mouse input:
    LButton::
    RButton::
    WheelUp::
    WheelDown::
    return

    $g::    ; press g to re-enable MouseMove and mouse input
    BlockInput, MouseMoveOff
    Mouse_Blocked := false
    return


#If ; turn off context sensitivity

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章