how to prevent hotkeys from interfering with general key press?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
tatagi
Posts: 181
Joined: 23 Aug 2018, 11:17

how to prevent hotkeys from interfering with general key press?

08 Feb 2020, 08:38

since english is not my first language, I will try to explain as easily as possible

for example, there are keys like this

Code: Select all

#if, getkeystate("capslock", "p") && winactive("ahk_class Chrome_WidgetWin_1")

f::send !d                                                  
return

what it does is when I press and hold capslock and then press f key, it sends me to chrome search field, easy and simple.

and right after, I will start typing words to search google.

but here's the trouble, the pressing of hotkey usually happens so fast so before I release capslock key, I already start searching words while capslock is still kept pressed, which certainly is not good thing because the first one or two characters will not be published.

so I am wondering if there's workaround I can make capslock releases itself back when the hotkey is completed, for the above case at the moment I finish pressing F key, so that the next key press, whichever it is, will not be affected by capslock any way.

wish there's my guardian angel out there!
wbm1113
Posts: 18
Joined: 28 Aug 2018, 11:19

Re: how to prevent hotkeys from interfering with general key press?

08 Feb 2020, 11:52

so I am wondering if there's workaround I can make capslock releases itself back when the hotkey is completed, for the above case at the moment I finish pressing F key, so that the next key press, whichever it is, will not be affected by capslock any way.
Maybe I'm misunderstanding something, but why would you want to write a program to solve this problem when you can just take your finger off the caps lock key before you start typing?

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 381 guests