Mouse Input handler/action problem

Hi !!!

I have a little problem with my input handler :

I want to execute an input action by clicking on both, right and left mouse button and moving along the mouse y-axis.

I found some functions that allow me to execute an action by clicking only on ONE mouse button and moving along a mouse axis :

com.jme.input.InputHandler.addAction(InputActionInterface action, String deviceName, int button, int axis, boolean allowRepeats)

but, I didn't found nothing about the multiple clicking.

Does anyone have an idea ?


I've been thinking about this sort of thing before.  I was thinking about making a fighting game that like most fighting games would have button combos and special moves.

The only way I could think of doing Multiple buttons or a sequence of buttons was to use a timer.

These seems like the sort of things that would be handy as part of the core input system.

Thanks Gentleman.

I don’t want to execute an action by clicking alternatively, but simultaneously on the mouse buttons, like in this application : to pan the camera.

The timer idea was the only one I could think of for both sequences and multiple buttons at the same time.

The only difference would be the timer that checks if buttons were pressed at same time would have a shorter duration.

So instead of passing all input directly to the handlers you pass it to your own timer which lists them all up and then at the end of its duration sends all the input out to your handlers as a single action (so instead of handlers getting event A then event B it gets event A and B together).

I'm not saying it's a particularly good idea but it's all I could think of  :frowning: