Remap HAT POV

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
raoulemilian2
Posts: 3
Joined: 05 Jan 2020, 15:47

Remap HAT POV

Post by raoulemilian2 » 13 Apr 2024, 15:09

Hello guys,i am building my driving sim, i have connected a USB joystick controller(from aliexpress) and i wired a custom joystick which doesn't have a zero position. The custom joystick it is an automatic shifter with 4 positions. First position is POV UP, second position is POV DOWN, third position is POV RIGHT and 4th position is POV LEFT. So one POV it will always be activated ,doesn't matter the position of my shifter knob. The shifter knob is electronic,for kid toys,so it's working. I will use it like a retarder knob in Euro truck simulator. But the controls of retarder are only 2: increase retarder and decrease retarder. Key A is for increase retarder and key B is for decrease retarder.
I want to program it in the fallowing way. If i move the knob from position 1 to position 2 , to write "A". Move from 2nd position to 3rd position, to write "A". Move from 3rd to 4th position to write "A". Now decrease, move from 4th to 3d position, write "B".Move from 3rd to 2nd position, write "B".Move from 2nd to 1st position, write "B".
Thank you.

raoulemilian2
Posts: 3
Joined: 05 Jan 2020, 15:47

HAT POV read value

Post by raoulemilian2 » 13 Apr 2024, 16:13

Hello, i am looking for a script which can read the value of the HAT POV (i think that is from 0 to 33750 ?) for up,right,down,left.
If the value increases, send 'A'. If the value decreases, send 'B'.

gregster
Posts: 9037
Joined: 30 Sep 2013, 06:48

Re: Remap HAT POV

Post by gregster » 13 Apr 2024, 17:54

@raoulemilian2, I merged your two topics which seem closely related. The second one was in the v1 help forum though. Since v1 is deprecated, I assume that you prefer to continue with your v2 topic. Please don't create multiple topics for the same question. Thank you!

Here is an example how to check the POV position: https://www.autohotkey.com/docs/v2/misc/RemapController.htm#controller-pov-hat

Post Reply

Return to “Ask for Help (v2)”