Menu

#1631 ALT+SHIFT+J shortcut on GTK XVIC

v3.6
closed-fixed
compyx
None
GTK3
xvic
2021-12-30
2021-11-28
nbla000
No

By using xvic.exe (GTK version) the shortcut ALT+SHIFT+J to enable/disable keyboard joysticks doesn't work, while works with x64.exe and xplus4.exe

Discussion

  • compyx

    compyx - 2021-11-28
    • status: open --> pending-fixed
    • assigned_to: compyx
     
  • compyx

    compyx - 2021-11-28

    Should be fixed in r41254, also for xcbm2 and xpet.

    Please check if it works for you.

     
  • nbla000

    nbla000 - 2021-11-30

    Yes, it works for xvic, xcbm2 and xpet too.

    But I noticed that for all systems, at the emulator startup, the preference menu label "Allow keyset joystick" is not checked if is saved on vice.ini while the option "Enable keyboard joysticks" is checked.

    In addition since they perform the same action (and set the option KeySetEnable=0/1 on vice.ini) better to rename them in the same way and with same short cut, from preference menu is Alt+Shift+J while from the status bar below -> Joysticks is Shift+Alt+J for (x64/x64dtc/xvix/x128/xplus4)

     

    Last edit: nbla000 2021-11-30
  • compyx

    compyx - 2021-11-30

    Yes, the menu item should indeed be checked if KeySetEnable is true (VICE default). Right now if you select the (unchecked) item, it is (still) unchecked the next time you open the menu (which is correct, in sync with the resource). So on boot the menu code has to properly set the state of the checkbox.

    The checkbox for the popup menu item is correctly synchronized with the resource on boot, but it indeed has a different description than the main menu item, I'll fix that.

    The keyboard shortcut for the popup menu item is a hard-coded string, and since we now have custom keyboard shortcuts, the popup menu code should get the proper shortcut string by inspecting the 'ui action' it controls; which should also make it look more natural on MacOS with the weird Command (⌘) and Option (⌥) glyphs.

    The above is probably the case for a few more (popup)menu items, I'll have to go through the menus to check.

     
  • compyx

    compyx - 2021-11-30
    • status: pending-fixed --> open
     
  • compyx

    compyx - 2021-12-01
    • status: open --> pending-fixed
     
  • compyx

    compyx - 2021-12-01

    I have fixed the check button status and item name issues for KeySetEnable (and also "Swap joysticks" (not available in xvic) and "Enable mouse grab"). Please check if it works properly now.

     
  • nbla000

    nbla000 - 2021-12-02

    The state of the Check button is ok while "Swap joysticks" shouldn't have a check control is not an option, it just swaps the joy1 and joy2 keysets
    If you look at Settings- > Input devices-> Joysticks, there is no check option but just a button to swap joysticks keysets.
    It's not a big deal but the KeySetEnable option in this form still has a different label.

    If you want, you may consider to add the checkbox "Allow opposite directions" to the preference/joystick menu for JoyOpposite option even it seems that this option doesn't work at least on x64, xvix, xplu4 and if I intend what this option should doing.

     

    Last edit: nbla000 2021-12-02
  • compyx

    compyx - 2021-12-02

    The check button is there to show to user whether the joysticks are swapped or not, this state is kept track of internally. It doesn't swap keysets though, it swaps the input devices for joysticks #1 and #2, which can be mapped to keyset A/B; it also swaps the emulated device types, so swapping for example a joystick and a mouse works properly.

    I'll have to change the settings dialog to also use a check button instead of a push button and change the naming of the action, and change the popup menu item into a check button as well.

    JoyOpposite allows for input devices to trigger "impossible" combinations, such as left & right or up & down at the same time, it doesn't invert directions if that's what you thought. If that doesn't work correctly it is a bug.

     
  • nbla000

    nbla000 - 2021-12-02

    The check button is there to show to user whether the joysticks are swapped or not, this state is kept track of internally. It doesn't swap keysets though, it swaps the input devices for joysticks #1 and #2, which can be mapped to keyset A/B; it also swaps the emulated device types, so swapping for example a joystick and a mouse works properly.

    OK, then now there is an issue, if you swap joysticks and restart the emulator, joysticks still reamin swapped but checkbox "swap joystick" is not checked (x64, x128, x64dtv, xplus4)

    JoyOpposite allows for input devices to trigger "impossible" combinations, such as left & right or up & down at the same time, it doesn't invert directions if that's what you thought. If that doesn't work correctly it is a bug.

    Well, if this is the JoyOpposite meaning, I don't think that it requires a preference/joystick menu item while what I thought could be a nice Feature Request

     
    • compyx

      compyx - 2021-12-02

      OK, then now there is an issue, if you swap joysticks and restart the emulator, joysticks still reamin swapped but checkbox "swap joystick" is not checked (x64, x128, x64dtv, xplus4)

      Correct, the plan is to make "swapped" a proper resource that does the swapping in the code, not move resources around so that when you save the swapped state is suddenly the new state on loading. But that involves some hacking we won't be able to do before the code freeze, which is now.

      Well, if this is the JoyOpposite meaning, I don't think that it requires a preference/joystick menu item while what I thought could be a nice Feature Request

      Of course it does, how else would you control that from the UI?

      If you want inverted controller axes, feel from to make such a feature request. But again, we won't be able to consider it until next year.

       
  • nbla000

    nbla000 - 2021-12-02

    OK, JoyOpposite works as you said and "swap joystick" need to modify in next year, unless you want to change at Settings- > Input devices-> Joysticks the "Enable Keyboard joystick" label, I think that this ticket can be closed.

     

    Last edit: nbla000 2021-12-02
  • compyx

    compyx - 2021-12-02

    Changes I'll still implement before closing this ticket will be:

    • Renaming to "Allow keyset joysticks" and changing to a check button for the UI elements that don't have that (settings dialog).
    • Add "Allow opposite directions" check button to "preferences" menu and status bar popup menu.
     
    • Greg King

      Greg King - 2021-12-02

      Renaming to "Allow keyset joysticks".

      But, it controls the "Numpad", too -- not only the two keysets. That text change might confuse users.

       

      Last edit: Greg King 2021-12-02
  • nbla000

    nbla000 - 2021-12-02

    Actually I also like "Enable keyboard joysticks" label but the option in vice.ini is "KeySetEnable" and in fact the numpad is also a customizable keyset not from the interface but by modifying the keyboard map vkm file.
    Maybe the label could be "Enable NumPad/Keyset joysticks" but it's too long btw should be "Enable" and not "Allow" if we want to follow the Vice.ini option.

     
  • compyx

    compyx - 2021-12-03

    Renamed all to "Allow keyset joysticks", nice and short, and a numpad is a set of keys.
    The "Swap joysticks" button has been turned into a check button so the user sees whether the joysticks are currently swapped or not. Once we implement proper swapping in the joystick code, rather than swapping around resources, a push button wouldn't make sense anymore anyway.

     

    Last edit: compyx 2021-12-03
  • nbla000

    nbla000 - 2021-12-04

    OK, It works as you described, labels are all identical and the original bug report (SHIFT+ALT+J) and also (SHIFT+J) work as expected, I think the ticket can be closed, thank you very much.

     
  • compyx

    compyx - 2021-12-04
    • status: pending-fixed --> closed-fixed
     
  • compyx

    compyx - 2021-12-04

    Alright, thanks for checking. Closing.

     

Log in to post a comment.

MongoDB Logo MongoDB