Hello everybody, rookie question coming up.
None of theese scripts for my gamepad work.
I use a gamepad which i controll with my feet due to a handicap and wants it to press the "t" button for talk in PUBG.
I want the Joy4 to press "t" for as long as i push Joy4 down but it only sends "t" one time.
The script for everything else works, i use all the seven other buttons without any problems,
remaping my joys and POVs to other keys but those are momentarily.
Hopefully you understand my question.
Theese are the ones i have tried:
Joy4::
Send t ; Press t
return
and
Joy4::
Send {t down} ; Hold down t
KeyWait Joy4 ; Wait for the user to release the joy4 button
Send {t up} ; Release t
return
Whats wrong with this?
Re: Whats wrong with this?
Try
(yes that's it! Just one line!)
This is autohotkey's inbuilt feature for remapping keys.
(https://autohotkey.com/docs/misc/Remap.htm)
Code: Select all
Joy4::t
This is autohotkey's inbuilt feature for remapping keys.
(https://autohotkey.com/docs/misc/Remap.htm)
I am your average ahk newbie. Just.. a tat more cute.
Re: Whats wrong with this?
With that line i still only get ONE "t" by pressing Joy4 AND holding it.
I want it to make "t":s for as long as i press Joy4, when i want to talk to others in PUBG.
Thanks / A
I want it to make "t":s for as long as i press Joy4, when i want to talk to others in PUBG.
Thanks / A
Re: Whats wrong with this?
Okay try this. It should work. I'm not sure why Joy4::t didn't work though.skaanlj wrote:With that line i still only get ONE "t" by pressing Joy4 AND holding it.
I want it to make "t":s for as long as i press Joy4, when i want to talk to others in PUBG.
Thanks / A
Code: Select all
Joy4::
Send {t down}
SetTimer, Joy, 0
return
Joy:
if GetKeyState("Joy4", "P")
return
SetTimer, Joy, Off
return
Last edited by Nwb on 17 Mar 2018, 22:43, edited 1 time in total.
I am your average ahk newbie. Just.. a tat more cute.
Re: Whats wrong with this?
Weird, dosent work either.... only get 1 stroke, = ONE t
In the controlpanel, gamepadsettings when i pressing down joy4 it shows that its pressed all time i keep it pressed down and stops when i release joy4.
But this POV works:
else if POV between 4501 and 13500 ; 45 to 135 degrees:
KeyToHoldDown = Lshift
Its for running, that keeps Lshift pressed all time until i releases button......
/ A
In the controlpanel, gamepadsettings when i pressing down joy4 it shows that its pressed all time i keep it pressed down and stops when i release joy4.
But this POV works:
else if POV between 4501 and 13500 ; 45 to 135 degrees:
KeyToHoldDown = Lshift
Its for running, that keeps Lshift pressed all time until i releases button......
/ A
Re: Whats wrong with this?
Im also interested in this, I have a foot pedal that works in pubg for leaning left and right but only with the toggle option selected. If I try to use it for press/hold then release to stand straight it doesn't work at all anymore.
would love a solution to this
would love a solution to this
Re: Whats wrong with this?
skaanlj wrote:Weird, dosent work either.... only get 1 stroke, = ONE t
In the controlpanel, gamepadsettings when i pressing down joy4 it shows that its pressed all time i keep it pressed down and stops when i release joy4.
But this POV works:
else if POV between 4501 and 13500 ; 45 to 135 degrees:
KeyToHoldDown = Lshift
Its for running, that keeps Lshift pressed all time until i releases button......
/ A
jedics wrote:Im also interested in this, I have a foot pedal that works in pubg for leaning left and right but only with the toggle option selected. If I try to use it for press/hold then release to stand straight it doesn't work at all anymore.
would love a solution to this
Try the script now? I edited it.
I am your average ahk newbie. Just.. a tat more cute.
Re: Whats wrong with this?
I dont know what Im doing and obviously my use is a bit different, I'm using [ to lean left, and ] to lean right so I changed what you wrote to this but it didn't work
Joy4::
Send {] down}
SetTimer, Joy, 0
return
Joy:
if GetKeyState("Joy4", "]")
return
SetTimer, Joy, Off
return
Joy4::
Send {] down}
SetTimer, Joy, 0
return
Joy:
if GetKeyState("Joy4", "]")
return
SetTimer, Joy, Off
return
Re: Whats wrong with this?
Okay try this.jedics wrote:I dont know what Im doing and obviously my use is a bit different, I'm using [ to lean left, and ] to lean right so I changed what you wrote to this but it didn't work
Joy4::
Send {] down}
SetTimer, Joy, 0
return
Joy:
if GetKeyState("Joy4", "]")
return
SetTimer, Joy, Off
return
Code: Select all
Joy4::
Send, {] down}
SetTimer, Joy, 0
return
Joy:
if GetKeyState("Joy4", "P")
return
Send, {] up}
SetTimer, Joy, Off
return
I am your average ahk newbie. Just.. a tat more cute.
Re: Whats wrong with this?
still the same the [ and ] keys work on my footswitch in toggle mode only but not in 'hold' mode yet it works on my keyboard fine.
Re: Whats wrong with this?
I'm not sure about this.
I am your average ahk newbie. Just.. a tat more cute.
Re: Whats wrong with this?
yeh, seems like a pretty common thing to want to do but there is very little I could find online about doing it.
Who is online
Users browsing this forum: No registered users and 48 guests