mjrgh / PinballY

A table browser and launcher ("front end") for virtual pinball cabinets.
Other
47 stars 22 forks source link

Add separate commands for menu navigation in PinballY #229

Closed jueank closed 9 months ago

jueank commented 10 months ago

Currently the same set of 'Commands' (Previous & Next, Previous Page & Next Page) are used for the navigation in the list of tables as well as for the navigation in the vertical text menus of PinballY (Table menu, Operator menu, ...). In cabinet builds, these Commands are usually assigned with left & right flipper button and left & right magnasave buttons. This is reasonable for the list of tables, because the buttons are located where the direction of the navigation is going to happen: Right flipper button moves to the next entry (righthand side) in the list of tables. Same for left flipper button, but reversed.

However, the direction of the navigation in the vertical text menus of PinballY is upwards & downwards. Using the buttons on the left side of the Cab for 'up' and the right side of the Cab for 'down' is not so straightforward anymore. Personally, I would prefer to use one of the the buttons closer to the backglass of the Cab for upward navigation and the button farther away for downward navigation. E.g. right flipper button = 'up' & right magna button = 'down'. This would also allow to navigate up&down with a single hand (right hand) and using the left hand for menu selection and back/cancel operation. Currently, the user has to change the position of the left hand from the left flipper/magnasave buttons to the Start/Cancel buttons (usually on the front of the Cab) and move the hand back again to the left flipper/magnasave buttons in order to continue to navigate in the menu (or submenu after it has been opened with the left hand selection)

Therefore I propose to introduce separate Commands for the menu navigation and let the user assign separate keys.

fernandojconti commented 10 months ago

"Therefore I propose to introduce separate Commands for the menu navigation and let the user assign separate keys."

I agree.

jueank commented 10 months ago

Btw. there is another approach possible, which does not require adding new Commands but can combine the existing navigation behavior (with a slight change) and the new navigation behavior, allowing them to be used both at the same time. This approach could be set in place (replacing the existing behavior), or it It could be introduced by adding a checkbox toggle to the Options dialog selecting between the existing behavior and the new behavior.

As a recap: This is the current behavior for menus (assuming the usual mapping of keys to Commands for Cab builds): left flipper: UP left magnasave: UP right flipper: DOWN right magnasave: DOWN

New proposal for menus: left flipper: UP left magnasave: DOWN right flipper: UP right magnasave: DOWN

Btw. I quickly searched the web what buttons are mostly used for magnasave. It's the buttons closer to the user/farther away from backglass (like in my cab). Some Cabs have the magnasave buttons placed lower than the flipper buttons. Both would work.

With this approach, the user can still move UP with the left hand (left flipper) and DOWN with the right hand (right magnasave) nearly like before. Or the user can move up and down with one hand only. (UP and DOWN are now accessible on the left and righthand side of the Cab. This would also support left handed people).

jueank commented 9 months ago

I think I will refrain from that feature request. The reasons:

  1. You can easily achieve the desired behavior with a custom script. I will attach it to the comment. So there is no need for a code change in PinballY itself.
  2. My personal experience when using the script is that in reality, it's very confusing to use 2 different key mappings for wheel navigation and menus. So the current menu navigation, even if being less intuitive is the preferred one for me.
  3. I also changed the button assignment in PinballY options dialog to have the proposed menu key assignment for the whole navigation. (Disabled the script again) I did that in order to avoid the 2 different confusing key mappings. The problem is that: a) Visual Pinball X has the same navigation mapping as PinballY in the 'F12' menu. So with the changed PinballY key assignment (either by script or by changing it completely in the options dialog) it becomes confusing again, because you have the mix anyway in PinballY and F12 menu from VPX. b) There are cases like navigating the media files in PinballY which still falls back to the wheel navigation pattern. So also here you have that confusing mix.

Long story short: My conclusion is that sticking to the default is the least problematic and confusing way for me.

Here is the script for those who would like to try it:

var reverseMenuMap = { "Next": "Prev", "Prev": "Prev", "NextPage": "Next", "PrevPage": "Next" };

mainWindow.on("commandbuttondown", ev => { if (mainWindow.getUIMode().mode == "menu") { var reverseCmd = reverseMenuMap[ev.command]; if (reverseCmd) { mainWindow.doButtonCommand(reverseCmd, true, ev.repeat); ev.preventDefault(); } } });