“Send” only working on key release Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
Tom1
Posts: 24
Joined: 17 Sep 2018, 12:05
Contact:

“Send” only working on key release

15 Oct 2018, 12:51

Hello AHK community,

My code sends CTRL only when SHIFT is released, not when pressed down. How can I fix that?

Shift::Send {Ctrl}{Shift}


thx in advance,
Tom
User avatar
TheDewd
Posts: 1510
Joined: 19 Dec 2013, 11:16
Location: USA

Re: “Send” only working on key release

15 Oct 2018, 13:01

Code: Select all

~Shift::
	Send, {Ctrl}
return
Adding a ~ tilde before the hotkey will allow the hotkey's native action to be performed in addition to executing your code.
User avatar
Tom1
Posts: 24
Joined: 17 Sep 2018, 12:05
Contact:

Re: “Send” only working on key release

15 Oct 2018, 14:45

TheDewd wrote:
15 Oct 2018, 13:01

Code: Select all

~Shift::
	Send, {Ctrl}
return
Adding a ~ tilde before the hotkey will allow the hotkey's native action to be performed in addition to executing your code.
Cheers man!
User avatar
Tom1
Posts: 24
Joined: 17 Sep 2018, 12:05
Contact:

Re: “Send” only working on key release

15 Oct 2018, 14:53

TheDewd wrote:
15 Oct 2018, 13:01

Code: Select all

~Shift::
	Send, {Ctrl}
return
Adding a ~ tilde before the hotkey will allow the hotkey's native action to be performed in addition to executing your code.
I noticed that CTRL will repeatedly be send. Is it possible to make it send CTRL once, when I hold down SHIFT?
User avatar
TheDewd
Posts: 1510
Joined: 19 Dec 2013, 11:16
Location: USA

Re: “Send” only working on key release  Topic is solved

15 Oct 2018, 15:03

Try this:

Code: Select all

#SingleInstance, Force

~Shift::
	Send, {Ctrl}
	KeyWait, Shift
return
User avatar
Tom1
Posts: 24
Joined: 17 Sep 2018, 12:05
Contact:

Re: “Send” only working on key release

15 Oct 2018, 15:19

TheDewd wrote:
15 Oct 2018, 15:03
Try this:

Code: Select all

#SingleInstance, Force

~Shift::
	Send, {Ctrl}
	KeyWait, Shift
return
Now it’s perfect, thank you!

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Anput, Google [Bot], mikeyww, Nerafius and 83 guests