Page 1 of 1

Axis to variably-repeated-button?

Posted: Sun Jun 24, 2018 11:19 pm
by qp1976
Hi all,

Forgive me if this is an easy one, but I have a particular use case in mind and I haven't been able to find anything that exactly fits the bill.

I'd like to map a joystick axis to a button press, in such a way that the farther I move the joystick, the faster the button repeats.

Ideally, something like this... assume the joystick axis goes from -10 to +10:

Joystick -10 ---> X button repeats rapidly
Joystick -5 ---> X button repeats slowly
Joystick 0 ---> no effect
Joystick +5 ---> Y button repeats slowly
Joystick +10 ---> Y button repeats rapidly

Has anybody done something like this using GIMX?

My use case is that I'm building a custom USB HID input device with many analog axes --- something like three mice in one device. I'm hoping to use this for some console games (via GIMX), but of course the consoles generally have fewer axes than my device does. So I'm wondering if I'd be better off doing pre-processing in my device to convert the axis outputs to repeated button presses before the signal even gets to GIMX.

Thanks in advance,
-QP

Re: Axis to variably-repeated-button?

Posted: Tue Jun 26, 2018 10:24 am
by GoDlike
Hello,

Sorry for the delayed answer. I'm on dacha now and Internet sucks here.

As this is pretty serious question I'm gonna ask Matlo for the response as he designed this system.

Regards,
Daniel

Re: Axis to variably-repeated-button?

Posted: Wed Jun 27, 2018 9:31 pm
by Matlo
Hello,

You can achieve this using macros. Define macros for various axis ranges.
https://gimx.fr/wiki/index.php?title=Macros

Re: Axis to variably-repeated-button?

Posted: Wed Jun 27, 2018 11:16 pm
by qp1976
Excellent, thank you.

I have another newbie question related to this project, that I'll start a new thread for.