Key events by python program

Need help? Ask here and someone will help
Post Reply
hio91
Posts: 2
Joined: Sat Aug 18, 2018 8:54 am

Key events by python program

Post by hio91 »

Hi,

I am using an ordered GIMX adapter to use an OSW wheel on the PS4 and it works so good and stable that I am going to take part in a 24h online race soon. In that I would like to make the KERS button automatic as this is how it is in real life and would like to do this via python (only language I can code in properly) using UDP data to get the position on track, velocity, KERS level etc.

Now I tried to past keyevents to GIMX and I tried about 10 different libraries in python for that with no success. They all work in other windows programs like notepad or a browser and also in GIMX (in the GUI for shortkeys or selecting) but not when I press the Auto-Detect button...

Possible problems are that I use the 6.11 version of Gimx as any more recent version does not give me any FFB on my OSW (I tried all of them). Apart from that, the activation of the "Advanced" - "Window events" gets deactivated every time I reopen the config window also when I save the file.

Is there any other way to send commands to GIMX for button presses? It should also provide the possibility to keep the button pressed for as long as I do not send a keyup command.

Thanks a lot!
User avatar
Matlo
Posts: 5768
Joined: Wed Jul 06, 2011 7:01 am
Location: France
Contact:

Re: Key events by python program

Post by Matlo »

Hi,

Are you expecting to get "the position on track, velocity, KERS level etc" from GIMX? There is no such data coming from the PS4.

About the events not being received, try selecting "Window events" in the "Input" drop-down menu in gimx-launcher.

For the GIMX 7+ issue, please install GIMX 7.8 and generate a log file as explained in forum rules.
GIMX creator
hio91
Posts: 2
Joined: Sat Aug 18, 2018 8:54 am

Re: Key events by python program

Post by hio91 »

Thanks for replying matlo!

All these things you quoted I process myself (or the code I write does it). The game gives all this info via UDP data, so no Gimx involved there. I would just like to past a keypress event to gimx which is not working for me. I read something in the wiki about passing them by command line, but I dont understand the example (I get how it does it but I dont have enough info about the structure to change it to other controllers or keys not released instantly). The mentioned setting by you and also by me above does not save somehow.

I just use the 6.11 cause when I started, I tried to get the 7.x working but failed and saw in every video explaining gimx + OSW a different ffb log and tried older versions having the same log ( I think its "FFB device: SimuCUBE 0 (OS translation)") and it worked instantly. 6.11 is the latest version with this and is also the latest working for me. But its not an issue as it works great!

I can make a log in the newest version for you after the race as I dont want to change anything before regarding the now working FFB. For myself I am very happy with 6.11 so I will stick to it.
Post Reply