Page 1 of 1

Complex macro activation logic

Posted: Thu Jul 26, 2018 12:50 pm
by crashtua
Hi everyone.
I want to bind dodge and jump actions on "space" keyboard button:
  • when pressed single time -> trigger O
  • when pressed double time rapidly -> trigger X
Also mix aim and melee weapon attack on right mouse button:
  • when right mouse button hold for 50 ms -> hold L2 and enter aim state
  • in aim state: down left mouse button -> press R2; up left mouse button -> release R2
  • in aim state: up right button -> leave aim state and up L2
  • click right mouse button -> click R2
  • click left mouse button -> click R1
As far as I see from wiki, this kind of scenarios it is not supported at this moment?
Can someone point me to code the code of macro handling, maybe I will be able to contribute this?
Or there is an sdk that will allow to implement custom logic?

Re: Complex macro activation logic

Posted: Thu Jul 26, 2018 2:46 pm
by GoDlike
Hmm that's a pretty complex case. I'll ask Matlo about this but he's on holidays so it may take some time.

Re: Complex macro activation logic

Posted: Thu Jul 26, 2018 3:35 pm
by crashtua
Yeah, complex. I am trying to make nearly pc-like controls with keyboard and mouse in Horizon Zero Dawn. On joystick we are using L/R(1/2) to deal with melee and ranged weapons, but on PC only one mouse with 2 buttons are used, so this hold-delay and double clicks will help to make gaming experience more pleasant for me.

ps: was trying to do teensy3.2 based keyboard+mouse emulator in pair with xim4, but left this idea on POC stage since I don't like that this solution looks too over-bloated with emulators of all kinds :)

Re: Complex macro activation logic

Posted: Thu Jul 26, 2018 4:13 pm
by GoDlike
Horizon Zero Dawn input system is not good for mouse. I don't think result will be satisfactory even if it would be possible.

Re: Complex macro activation logic

Posted: Thu Jul 26, 2018 4:29 pm
by crashtua
With xim4 it is very good, only this stuff with multiple buttons for melee and ranged weapons are annoying. Will try how mouse(movement) works with gimx later.

Re: Complex macro activation logic

Posted: Sun Jul 29, 2018 2:25 pm
by Matlo
Hi,

I'm thinking about adding scripting capabilities using LUA. We just need to provide all device events and the controller state to the LUA script, and then apply the result of the script (push device events and/or change the controller state).

Re: Complex macro activation logic

Posted: Mon Jul 30, 2018 12:24 pm
by crashtua
It will be great. This will allow to implement insane scenarios:)

Re: Complex macro activation logic

Posted: Tue Jul 31, 2018 9:42 pm
by Matlo
I started writing some implementation ideas here: https://github.com/matlo/GIMX/issues/584