Page 1 of 1

Holding down shift prevents me from activating script

Posted: 27 Sep 2019, 10:56
by Rudrix93
[Moderator's note: Topic moved from Ask for Help (main). Code tags added.]

Hey, im new to scripting. I have this script:

Code: Select all

^o::

Loop 3
{   
Send {s down}	
Send {s up}
	
Send {a down}	
Send {a up}

Send {w down}	
Send {w up}	

Send {d down}	
Send {d up}	
}
Return
just a simple script that works as intended, BUT when i hold down shift before activating the script it doesnt work, go figure, computer probably register shift+ctrl+o which wont activate the script. But im using this in a game, and i want to script to be activated no matter what keys im pressing/holding down ingame, is that possible?

Re: Holding down shift prevents me from activating script

Posted: 27 Sep 2019, 14:07
by boiler
You can change the first line to *^o:: to allow Shift and other modifier keys (like Alt) to be also held down, but to allow any other key to be held down is much more difficult.

Re: Holding down shift prevents me from activating script

Posted: 28 Sep 2019, 20:11
by lexikos
boiler wrote:
27 Sep 2019, 14:07
... but to allow any other key to be held down is much more difficult.
What do you mean?

Hotkeys and Send both already allow every other key to be held down. The only issue I am aware of is that the keyboard hardware won't allow some combinations.

@Rudrix93
Be aware that Send {s down} will temporarily release Ctrl and any other modifiers that you are holding, and it will press them back down again after the sent key. Since this is for a game, you can probably get away with using Send {Blind}{s down}, which will just send the event you specify and will leave the modifier keys as they are.

Re: Holding down shift prevents me from activating script

Posted: 28 Sep 2019, 20:57
by boiler
lexikos wrote:
28 Sep 2019, 20:11
What do you mean?

Hotkeys and Send both already allow every other key to be held down. The only issue I am aware of is that the keyboard hardware won't allow some combinations.
Apparently, I was mistaken.