panzi/qjoypad

[Feature] Add ability to switch layouts via joystick buttons

Closed this issue · 3 comments

I have a Saitek X52, which has a wheel with 3 buttons for selecting "profiles" with the original windows software.
These profiles are much like the layouts in QJoyPad.
Adding the option to map joystick buttons to layout changes should replicate the original functionality quite well.
Is this something that would benefit QJoyPad?

panzi commented

Yes that feature would make sense, but I don't have time or energy to implement it. Also don't have such a gamepad (still only an Xbox 360 gamepad), so I couldn't test it. Don't know as what that wheel is recognized (buttons or axis).

The wheel is recognized as 3 buttons, and one is permanently "pressed". That means layout changes should only be done when the button is pressed down (change) instead of repeatedly.
I believe the feature could still be tested using normal buttons.
Would you welcome a pull request for this?

I've started working on this, and noticed one issue: When switching layouts, obviously the button responsible for layout changes switches as well.
This means that

  • a "no layout" layout is necessary that does nothing except map the layout switch buttons
  • every layout must map all layout switch buttons
    I don't think this is a blocker, but it's certainly something to keep in mind.