So my keyboard is faulty and the combination of Shift + W + 2 does not work, it registers the Shift and W but not the 2 input if the previous two keys are pressed. I use this combination in one of my games to switch weapons while sprinting. The keyboard is out of warranty so I'm trying to make a script to work as a stop gap. It should be a simple one. If Shift + W is held and I press 2 the script will simply send a {2}.
I have a decent knowledge of AutoHotkey but am not sure if the above scenario can be done. Any information or examples would be greatly appreciated. Thanks.
Looking For Help with a Weird Hotkey
-
- Posts: 2
- Joined: 25 Nov 2021, 03:07
Re: Looking For Help with a Weird Hotkey
Hallo,
try:
Edit because of amateur+'s objections
try:
Code: Select all
+w::SoundBeep, 4000, 20 ;to switch weapons while sprinting
#IF GetKeyState("Shift","P") And GetKeyState("w","P")
*2::Send, 2
#IF
Last edited by Rohwedder on 25 Nov 2021, 07:27, edited 1 time in total.
Re: Looking For Help with a Weird Hotkey
@Rohwedder, my keyboard doesn't pass 2 at all if Shift+w are already down.
If I look at GetKeyState("2", "P"), it is 0 at that moment.
If I look at GetKeyState("2", "P"), it is 0 at that moment.
Have found any drawback in my code or approach? Please, point it out. /The moderator ordered to remove the rest of the signature, I had obeyed.
And I really apologize for our russian president. Being a citizen of an aggressor country is very shameful. Personally I tried to avoid this trying to defend elections from fraud being a member of the election commission of one of the precincts but only was subjected to a hooligan attack and right before the vote count was illegally escorted from the polling station and spent the night behind bars (in jail) in a result of illegal actions of corrupt policemen.
And I really apologize for our russian president. Being a citizen of an aggressor country is very shameful. Personally I tried to avoid this trying to defend elections from fraud being a member of the election commission of one of the precincts but only was subjected to a hooligan attack and right before the vote count was illegally escorted from the polling station and spent the night behind bars (in jail) in a result of illegal actions of corrupt policemen.
Re: Looking For Help with a Weird Hotkey
Another moment: he won't be able to use Shift+W to sprint in his game, b/c with Shift being held down, W becomes a prefix and assigning w up:: won't help.
Have found any drawback in my code or approach? Please, point it out. /The moderator ordered to remove the rest of the signature, I had obeyed.
And I really apologize for our russian president. Being a citizen of an aggressor country is very shameful. Personally I tried to avoid this trying to defend elections from fraud being a member of the election commission of one of the precincts but only was subjected to a hooligan attack and right before the vote count was illegally escorted from the polling station and spent the night behind bars (in jail) in a result of illegal actions of corrupt policemen.
And I really apologize for our russian president. Being a citizen of an aggressor country is very shameful. Personally I tried to avoid this trying to defend elections from fraud being a member of the election commission of one of the precincts but only was subjected to a hooligan attack and right before the vote count was illegally escorted from the polling station and spent the night behind bars (in jail) in a result of illegal actions of corrupt policemen.
-
- Posts: 2
- Joined: 25 Nov 2021, 03:07
Re: Looking For Help with a Weird Hotkey
Hey all, thanks for the replies. I just bit the bullet and got a new keyboard so this question is no longer needed. Thanks anyway though!
Who is online
Users browsing this forum: Google [Bot] and 215 guests