Page 1 of 1

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

Posted: 07 Jul 2018, 00:50
by icor1031
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

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

Posted: 07 Jul 2018, 01:34
by Masonjar13
The answer is in the documentation ;)

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

Posted: 07 Jul 2018, 10:40
by icor1031
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.

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

Posted: 07 Jul 2018, 11:49
by icuurd12b42
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 `

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

Posted: 07 Jul 2018, 13:46
by icor1031
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.

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

Posted: 07 Jul 2018, 13:57
by icuurd12b42
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