How to prevent certain keys from not working when using AHK

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
rokkyboy
Posts: 16
Joined: 01 Sep 2017, 07:04

How to prevent certain keys from not working when using AHK

03 Sep 2017, 06:01

Hello,

When using AHK, especially when running something like Radials along with other day-to-day scripts, there are times when certain buttons doesn't work or gets stuck-state. Like the system would have CTRL key pressed down all the time, or right-button mouse wouldn't work, etc.

I usually restart/reload the script to solve this, but are there any good practices to avoid this or deal with this situation?

Thanks,
User avatar
Brazolek123
Posts: 187
Joined: 06 Jun 2016, 16:02

Re: How to prevent certain keys from not working when using AHK

03 Sep 2017, 06:41

I'd suggest to look up at your scripts and change the way mouse/keyboard is simulated. Examplery if you are using ControlSend...{^F1} try to make it

Code: Select all

ControlSend... {Control Down}
ControlSend... {F1}
ControlSend... {ControlUp}
or even better:

Code: Select all

BlockInput, Keyboard, On
ControlSend... {Control Down}
ControlSend... {F1}
ControlSend... {ControlUp}
BlockInput, Keyboard, Off
You can aswell experiment some with:

Code: Select all

KeyWait, Control
ControlSend... {Control Down}
ControlSend... {F1}
ControlSend... {Control Up}
also in some cases short sleep of 5 to 15 ms in above scripts might ensure better reliability. Maybe somone more experienced users may have some other, better ideas, gl.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Descolada, oktavimark, Rohwedder and 250 guests