简体   繁体   English

防止使用自动热键意外释放鼠标单击

[英]prevent unwanted release of mouse click with autohotkey

Hi i have a problem with my mouse, when i want to drag stuff or highlight text, i hold my left click down but my mouse sometimes releases the click briefly and then reclick so that i lose the stuff i was dragging. 嗨,我的鼠标有问题,当我要拖动内容或突出显示文本时,我按住鼠标左键,但有时鼠标会短暂释放该点击,然后重新单击,以致丢失了我拖动的内容。 So i would like to make an autohotkey script that would stop it. 所以我想制作一个自动热键脚本来停止它。

the way i see it, it would do something like: when the clic is pressed the script forces the clic down for like 100 ms and then releases it, but if i hold the clic down it would refresh the timer indefinitely so that if my mouse release the clic for less than 100 ms it would still holding it down. 按照我的观察方式,它会执行以下操作:当按下clic时,脚本会强制将clic按下约100 ms,然后释放它,但是如果我按住clic,它将无限期刷新计时器,因此,如果我的鼠标释放clic的时间少于100毫秒,它将仍然保持按下状态。

I don't know if this is possible so any help would be great. 我不知道这是否有可能,所以任何帮助都会很大。 thanks for your time. 谢谢你的时间。

Perhaps this will help. 也许这会有所帮助。

~LButton::
Loop
{
    Sleep, 100
    if (!GetKeyState("LButton", "P"))
    {
        SendInput, {LButton Up}
        return
    }
}

$Lbutton Up::
return

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM