Autohotkey causes key jamming for no apparent reason

Ask gaming related questions (AHK v1.1 and older)
TnF
Posts: 13
Joined: 15 Sep 2018, 10:50

Autohotkey causes key jamming for no apparent reason

15 Sep 2018, 11:04

Hello guys. Running latest Autohotkey with this simple code i wrote:

Code: Select all

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
LWin::LAlt
Ralt::LWin
This is so that i don't press the windows key accidentally on my laptop keyboard (small keys) and still allow me access to the windows key with since i have 2 alt keys. What i've noticed though is that it causes key jamming (in PUBG) specifically with the WASDEQ keys, probably because these are what i have to keep pressed down for a long time. Also i've noticed while having pressed the windows key (aka alt key after the script) the game rejects MOUSE3 input (the middle click scroll-wheel switch) which makes NO SENSE. It jams it completely! And i am not running it with the special logitech software (Logitech G502 mouse), only with the on-board profile of the mouse! I didn't do further troubleshooting because if i don't run the script i don't have the issues.

Also found this similar thread from 2010 but not much other than removing this line:

Code: Select all

SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
https://autohotkey.com/boards/viewtopic.php?t=15986

Please help me!

PS. Before you ask keyboard has good n-key rollover, it is connected via PS/2 internally, not a prb if i don't use autohotkey
PS 2. Regarding the jammed keys, what i mean for example W was pressed but the game doesn't detect it, i have to release and re-press again
TnF
Posts: 13
Joined: 15 Sep 2018, 10:50

Re: Autohotkey causes key jamming for no apparent reason

17 Sep 2018, 00:33

No-one really?
Deleting this made no difference!

Code: Select all

SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
User avatar
Onimuru
Posts: 107
Joined: 08 Sep 2018, 18:35
Contact:

Re: Autohotkey causes key jamming for no apparent reason

18 Sep 2018, 00:45

Not the answer you're looking for but if you straight up want to remap those keys, this is the easiest way to do it: https://keytweak.en.softonic.com/
TnF
Posts: 13
Joined: 15 Sep 2018, 10:50

Re: Autohotkey causes key jamming for no apparent reason

18 Sep 2018, 19:33

yeah, i've seen this program when i wanted to do this but it's not up to my needs. Autohotkey does what i want, it's just this issue
User avatar
Onimuru
Posts: 107
Joined: 08 Sep 2018, 18:35
Contact:

Re: Autohotkey causes key jamming for no apparent reason

25 Sep 2018, 02:50

Code: Select all

SendMode Input

Exit

LWin::Alt
Ralt::RWin
Or just use the program I linked, I use it. For straight up remaps, it's better. Changes are made to the registry I guess
TnF
Posts: 13
Joined: 15 Sep 2018, 10:50

Re: Autohotkey causes key jamming for no apparent reason

25 Sep 2018, 03:32

Yes but i don't want to restart to make changes, not to mention the other limitations.
I will try your code and see if it eliminates the problem
TnF
Posts: 13
Joined: 15 Sep 2018, 10:50

Re: Autohotkey causes key jamming for no apparent reason

01 Oct 2018, 10:38

Onimuru wrote:

Code: Select all

SendMode Input

Exit

LWin::Alt
Ralt::RWin
Or just use the program I linked, I use it. For straight up remaps, it's better. Changes are made to the registry I guess
this script is worse. Makes random win key stuck
TnF
Posts: 13
Joined: 15 Sep 2018, 10:50

Re: Autohotkey causes key jamming for no apparent reason

16 Oct 2018, 15:06

UPDATE: Still no solution to this problem. Also windows seems to bypass autohotkey since win+(letter) shortcuts still work! Seriously NOBODY knows how to solve this? AUTOHOTKEY DEVS HELP!
Ruevil2
Posts: 173
Joined: 14 Jul 2014, 10:39

Re: Autohotkey causes key jamming for no apparent reason

16 Oct 2018, 15:24

TnF wrote:
16 Oct 2018, 15:06
UPDATE: Still no solution to this problem. Also windows seems to bypass autohotkey since win+(letter) shortcuts still work! Seriously NOBODY knows how to solve this? AUTOHOTKEY DEVS HELP!
Jesus dude stop crying. First of all your question is not dev level. Not even close. You need to go RTFM. The solution to your problem is basic, and likely no more than a 1 line edit. No one here is going to do it for you. We will try to help but most of us here are not gamers and we are not going to start just to fix your script.

Go here and go through all of the things listed, especially #3 as this is will probably solve your issue. These solutions were posted over 14 years ago, familiarize yourself with the search bar.
TnF wrote:
16 Oct 2018, 15:06
UPDATE: Still no solution to this problem. Also windows seems to bypass autohotkey since win+(letter) shortcuts still work!
Of course they do. The win key is considered a modifier, like ctrl and alt. It doesn't operate like a standard key. You need to go RTFM.
TnF
Posts: 13
Joined: 15 Sep 2018, 10:50

Re: Autohotkey causes key jamming for no apparent reason

17 Oct 2018, 04:46

Ruevil2 wrote:
16 Oct 2018, 15:24
TnF wrote:
16 Oct 2018, 15:06
UPDATE: Still no solution to this problem. Also windows seems to bypass autohotkey since win+(letter) shortcuts still work! Seriously NOBODY knows how to solve this? AUTOHOTKEY DEVS HELP!
Jesus dude stop crying. First of all your question is not dev level. Not even close. You need to go RTFM. The solution to your problem is basic, and likely no more than a 1 line edit. No one here is going to do it for you. We will try to help but most of us here are not gamers and we are not going to start just to fix your script.

Go here and go through all of the things listed, especially #3 as this is will probably solve your issue. These solutions were posted over 14 years ago, familiarize yourself with the search bar.
TnF wrote:
16 Oct 2018, 15:06
UPDATE: Still no solution to this problem. Also windows seems to bypass autohotkey since win+(letter) shortcuts still work!
Of course they do. The win key is considered a modifier, like ctrl and alt. It doesn't operate like a standard key. You need to go RTFM.
Firstly, I RTFM. If you are such a bitch and can fix it in one line be my guest and do it.
I've moved to sharpkeys last night after this post and it worked almost perfectly.
Also wtf this has to do with gamers? it's a simple key swap script, lv0 skill. If it doesn't work it means autohotkey is shit and devs should fix their code.
So STFU if you can't contribute towards solving the issue.
Ruevil2
Posts: 173
Joined: 14 Jul 2014, 10:39

Re: Autohotkey causes key jamming for no apparent reason

17 Oct 2018, 08:42

Firstly, I RTFM. If you are such a bitch and can fix it in one line be my guest and do it.
Obviously, not well.
I've moved to sharpkeys last night after this post and it worked almost perfectly.
I bet you couldn't tell me why that one works and your code here doesn't. You just made yet another change you don't understand. You just got lucky shooting in the dark.
Also wtf this has to do with gamers? it's a simple key swap script, lv0 skill. If it doesn't work it means autohotkey is shit and devs should fix their code.
Every game operates differently and has different requirements. Why do you think there are so many methods of sending input? Also, if it's lv0 skill, why can't you make it work? I could, although the point I was making is that I don't play PUBG and am not going to start to fix your 3 line script that you can't figure out.
So STFU if you can't contribute towards solving the issue.
Go cry somewhere else.
User avatar
Xtra
Posts: 2744
Joined: 02 Oct 2015, 12:15

Re: Autohotkey causes key jamming for no apparent reason

17 Oct 2018, 10:37

Try using:

Code: Select all

LWin::Return
Ralt::RWin
TnF
Posts: 13
Joined: 15 Sep 2018, 10:50

Re: Autohotkey causes key jamming for no apparent reason

18 Oct 2018, 17:00

Xtra wrote:
17 Oct 2018, 10:37
Try using:

Code: Select all

LWin::Return
Ralt::RWin
What's the point of this? I want LWin to function as Alt, not Return, it is a requirement
TnF
Posts: 13
Joined: 15 Sep 2018, 10:50

Re: Autohotkey causes key jamming for no apparent reason

18 Oct 2018, 17:04

Ruevil2 wrote:
17 Oct 2018, 08:42
Firstly, I RTFM. If you are such a bitch and can fix it in one line be my guest and do it.
Obviously, not well.
I've moved to sharpkeys last night after this post and it worked almost perfectly.
I bet you couldn't tell me why that one works and your code here doesn't. You just made yet another change you don't understand. You just got lucky shooting in the dark.
Also wtf this has to do with gamers? it's a simple key swap script, lv0 skill. If it doesn't work it means autohotkey is shit and devs should fix their code.
Every game operates differently and has different requirements. Why do you think there are so many methods of sending input? Also, if it's lv0 skill, why can't you make it work? I could, although the point I was making is that I don't play PUBG and am not going to start to fix your 3 line script that you can't figure out.
So STFU if you can't contribute towards solving the issue.
Go cry somewhere else.
Ok got it, you must be that kid in school that knows everything and his dad owns a 5000hp car and a helicopter. Happy for you that this worked back in school ;)
User avatar
Xtra
Posts: 2744
Joined: 02 Oct 2015, 12:15

Re: Autohotkey causes key jamming for no apparent reason

18 Oct 2018, 19:11

TnF wrote:
18 Oct 2018, 17:00
Xtra wrote:
17 Oct 2018, 10:37
Try using:

Code: Select all

LWin::Return
Ralt::RWin
What's the point of this? I want LWin to function as Alt, not Return, it is a requirement
The point is people are trying to help you?
You do realize the Alt key right next to the LWin key?

Maybe someone else can help you sorry to be wasting my time thanks.
TnF
Posts: 13
Joined: 15 Sep 2018, 10:50

Re: Autohotkey causes key jamming for no apparent reason

19 Oct 2018, 00:36

Xtra wrote:
18 Oct 2018, 19:11
TnF wrote:
18 Oct 2018, 17:00
Xtra wrote:
17 Oct 2018, 10:37
Try using:

Code: Select all

LWin::Return
Ralt::RWin
What's the point of this? I want LWin to function as Alt, not Return, it is a requirement
The point is people are trying to help you?
You do realize the Alt key right next to the LWin key?

Maybe someone else can help you sorry to be wasting my time thanks.
yeah, but do you realize the whole problem here is that the keys are small due to being a laptop keyboard so i sometimes hit the win key instead of the Lalt key? That's why i map them to the same function.
Ruevil2
Posts: 173
Joined: 14 Jul 2014, 10:39

Re: Autohotkey causes key jamming for no apparent reason

19 Oct 2018, 08:34

TnF wrote:
18 Oct 2018, 17:04
Ruevil2 wrote:
17 Oct 2018, 08:42
Firstly, I RTFM. If you are such a bitch and can fix it in one line be my guest and do it.
Obviously, not well.
I've moved to sharpkeys last night after this post and it worked almost perfectly.
I bet you couldn't tell me why that one works and your code here doesn't. You just made yet another change you don't understand. You just got lucky shooting in the dark.
Also wtf this has to do with gamers? it's a simple key swap script, lv0 skill. If it doesn't work it means autohotkey is shit and devs should fix their code.
Every game operates differently and has different requirements. Why do you think there are so many methods of sending input? Also, if it's lv0 skill, why can't you make it work? I could, although the point I was making is that I don't play PUBG and am not going to start to fix your 3 line script that you can't figure out.
So STFU if you can't contribute towards solving the issue.
Go cry somewhere else.
Ok got it, you must be that kid in school that knows everything and his dad owns a 5000hp car and a helicopter. Happy for you that this worked back in school ;)
Just like I thought. No idea what works or why and not interested in learning. Just a script kiddy that wants everyone else to solve your problems and do your work for you. Did you even try anything outside of the first few lines of code you tried?
Ruevil2 wrote:
16 Oct 2018, 15:24
We will try to help but most of us here are not gamers and we are not going to start just to fix your script.
The reason I said this is because the issues you are having ARE GAME SPECIFIC, NOT A PROBLEM WITH AHK. The reason you are not getting any help is that no one here plays PUBG and it would take someone familiar with the way AHK interacts with that particular game in order to solve your issue. This is easy to see since there are ZERO PUBG scripts on this forum. You are on your own here.
TnF
Posts: 13
Joined: 15 Sep 2018, 10:50

Re: Autohotkey causes key jamming for no apparent reason

19 Oct 2018, 12:03

Ruevil2 wrote:
19 Oct 2018, 08:34
TnF wrote:
18 Oct 2018, 17:04
Ruevil2 wrote:
17 Oct 2018, 08:42
Firstly, I RTFM. If you are such a bitch and can fix it in one line be my guest and do it.
Obviously, not well.
I've moved to sharpkeys last night after this post and it worked almost perfectly.
I bet you couldn't tell me why that one works and your code here doesn't. You just made yet another change you don't understand. You just got lucky shooting in the dark.
Also wtf this has to do with gamers? it's a simple key swap script, lv0 skill. If it doesn't work it means autohotkey is shit and devs should fix their code.
Every game operates differently and has different requirements. Why do you think there are so many methods of sending input? Also, if it's lv0 skill, why can't you make it work? I could, although the point I was making is that I don't play PUBG and am not going to start to fix your 3 line script that you can't figure out.
So STFU if you can't contribute towards solving the issue.
Go cry somewhere else.
Ok got it, you must be that kid in school that knows everything and his dad owns a 5000hp car and a helicopter. Happy for you that this worked back in school ;)
Just like I thought. No idea what works or why and not interested in learning. Just a script kiddy that wants everyone else to solve your problems and do your work for you. Did you even try anything outside of the first few lines of code you tried?
Ruevil2 wrote:
16 Oct 2018, 15:24
We will try to help but most of us here are not gamers and we are not going to start just to fix your script.
The reason I said this is because the issues you are having ARE GAME SPECIFIC, NOT A PROBLEM WITH AHK. The reason you are not getting any help is that no one here plays PUBG and it would take someone familiar with the way AHK interacts with that particular game in order to solve your issue. This is easy to see since there are ZERO PUBG scripts on this forum. You are on your own here.
Ok, you must be the autistic kid in class. How many scripts work here under Unreal Engine 4.x? The problem could be hardware related for as far as i know, due to n-key rollover and how AHK and/or the system reads the keys? It is extremely difficult to replicate, and if you read my posts before you can to shit talk i did try several things. So GTFO from this thread because you are not doing anything productive.
Ruevil2
Posts: 173
Joined: 14 Jul 2014, 10:39

Re: Autohotkey causes key jamming for no apparent reason

19 Oct 2018, 14:05

TnF wrote:
19 Oct 2018, 12:03
How many scripts work here under Unreal Engine 4.x?
I will start with a list of games that I know for a fact use Unreal Engine 4 and work flawlessly with AHK:

AION
ALICE
ARK: Survival Evolved
Blade & Soul
Fortnite
Gears of War 4
Sea of Thieves
State of Decay 2

And that's just the list of games I know use Unreal Engine 4 and have written scripts for personally.

The problem could be hardware related for as far as i know, due to n-key rollover and how AHK and/or the system reads the keys?
That is exactly the problem here, you have no idea and want to argue with someone who does. N-key rollover isn't a thing in AHK. ANY amount of time is enough to activate keystrokes. This is not the same thing as whether the game itself captures the keystroke or not since AHK replaces the data generated by the hardware.

It is extremely difficult to replicate.
No it isn't. Not kidding or pitching shit here. This is a problem that happens with every single game that uses a polling method to gather keystroke data, League of Legends is notorious for this. This is explained in #3 of the how to that I linked that I would bet you didn't bother to read.

Here is a list of other posts that have the same issue you do, ALL from the first page of a search... (Keystrokes being 'missed' by the game)

https://autohotkey.com/boards/viewtopic ... 6&p=242830
https://autohotkey.com/boards/viewtopic ... 7&p=234254
https://autohotkey.com/boards/viewtopic ... 4&p=223706
https://autohotkey.com/boards/viewtopic ... 9&p=220829



Long story short. Your keys are not 'jamming'. The game is seeing the downstroke and then missing the release of the key(or vice versa) because they are not being held down long enough. This is unrelated to key rollover because the speed of key sends and length of hold down time are not hardware generated when being filtered by AHK.

Argue with me all you want, I have written one of the most viewed gaming scripts and the only gaming tutorial on this entire forum. I know what I am talking about.

You are only making yourself look bad by name calling and no one is going to help you with that attitude. Do you really think it's a good idea to insult the one person willing to try to help? Wow.

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 41 guests