Holding down shift prevents me from activating script

Ask gaming related questions
Rudrix93
Posts: 1
Joined: 27 Sep 2019, 10:50

Holding down shift prevents me from activating script

27 Sep 2019, 10:56

[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?
User avatar
boiler
Posts: 3283
Joined: 21 Dec 2014, 02:44

Re: Holding down shift prevents me from activating script

27 Sep 2019, 14:07

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.
lexikos
Posts: 6668
Joined: 30 Sep 2013, 04:07
GitHub: Lexikos

Re: Holding down shift prevents me from activating script

28 Sep 2019, 20:11

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.
User avatar
boiler
Posts: 3283
Joined: 21 Dec 2014, 02:44

Re: Holding down shift prevents me from activating script

28 Sep 2019, 20:57

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.

Return to “Gaming”

Who is online

Users browsing this forum: No registered users and 51 guests