Combination keys are locked from use. How can I circumvent? Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
icor1031
Posts: 3
Joined: 07 Jul 2018, 00:46

Combination keys are locked from use. How can I circumvent?

07 Jul 2018, 00:50

Here's one of my scripts. (Ignore the last sleep in the list.)

When I press Spacebar, without pressing `, nothing happens. In other words, spacebar is locked by AHK, it's waiting to see if I'll press `. So, if I want to type a message - I can't. At least, I won't have spaces between the words!
So, how do I make it send spacebar if I don't press the second key (`)?

Thanks.

Space & `::
Send, 2
Sleep 25
Send 2
Sleep 25
Send 1
Sleep 25
Send 4
Sleep 25
return
icor1031
Posts: 3
Joined: 07 Jul 2018, 00:46

Re: Combination keys are locked from use. How can I circumvent?

07 Jul 2018, 10:40

No joy. If I use ~, it still fires the spacebar - but I want it to fire the space bar *only* if I do not use ` in combination with the spacebar. Basically, it would would send spacebar to the window on keyup of the spacebar, if ` was not pressed.
If ` was pressed with spacebar, it sends nothing to the window.

That's what I need.
icuurd12b42
Posts: 202
Joined: 14 Aug 2016, 04:08

Re: Combination keys are locked from use. How can I circumvent?

07 Jul 2018, 11:49

https://autohotkey.com/docs/KeyList.htm

see SCnnn or VKnnn

` is a OEM key that is not defined so you need the scan code of VK OEM code. google microsoft virtual keys list for the scan code/vk (virtual key) code for `
icor1031
Posts: 3
Joined: 07 Jul 2018, 00:46

Re: Combination keys are locked from use. How can I circumvent?

07 Jul 2018, 13:46

icuurd12b42 wrote: ` is a OEM key that is not defined so you need the scan code of VK OEM code. google microsoft virtual keys list for the scan code/vk (virtual key) code for `

Actually, I've had no problem with `

Let me give another example, which is *also* part of my script.

~Space & 1::
Send, 3
Sleep 25
Send 3
Sleep 25
Send 2
Sleep 25
Send 4
Sleep 25
return


-------

My previous comment applies to this script, too. I want it to send spacebar when I release spacebar, if I did *not* also press 1.
icuurd12b42
Posts: 202
Joined: 14 Aug 2016, 04:08

Re: Combination keys are locked from use. How can I circumvent?  Topic is solved

07 Jul 2018, 13:57

catch space only and use GetKeyState to check if ` is also down... if so, do your code, if not send space for it to pass through, if you need it to pass through

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Chunjee, Giresharu, Google [Bot], inseption86, KruschenZ, mikeyww, Swiftly9767 and 290 guests