Menu Shortcut Keys
  • So i edited the controller.yaml file under /home/pi/pimame/pimame-menu/ to match my joystick controls. I read somewhere that you had to use codes instead of just "a" for the a key. So i looked up a javascript character keycode thinking that was it and have changed go-back/exit to 13 (which was suppose to be the ENTER key), select to 18 (which was suppose to be the CTRL key) and the popup menu to 80 (which was suppos to be the p key). So now when i boot up into the menu i can navigate left right up down but can't select any emulator/tool or escape to the console and then the desktop so i can change the controller.yaml file back. I made a back up incase i stuffed it up but i cant get back there to delete the edited one. Is my only option to reload the image onto my SD Card? Please help! i have just spent all weekend uploading my roms and and configuring the controls within the emulators and changing the menu controls was my last step.
  • @danielsondownunder - I hard coded a quit to terminal keypress into the menu. Just press 'LeftCtrl+Q'.

    Now, in order to edit the controller.yaml file you need to use the pygame key constants


    Also: This is what you need for your controller.yaml, I have made the alterations that you wanted. Be careful if you copy and paste this though. Any .yaml file is indent sensitive, so JOYSTICK and KEYBOARD need to have no preceding spaces Everything else needs to have 2 spaces before it.

    JOYSTICK:
    HORIZONTAL_AXIS: 0
    VERTICAL_AXIS: 1
    LEFT: -1
    RIGHT: 1
    UP: -1
    DOWN: 1
    SELECT: 0
    BACK: 1
    MENU: 2

    KEYBOARD:
    UP:
    - pygame.K_UP
    - pygame.K_KP8
    DOWN:
    - pygame.K_DOWN
    - pygame.K_KP2
    LEFT:
    - pygame.K_LEFT
    - pygame.K_KP4
    RIGHT:
    - pygame.K_RIGHT
    - pygame.K_KP6
    SELECT:
    - pygame.K_LCTRL
    - pygame.K_RCTRL
    BACK:
    - pygame.K_RETURN
    - pygame.K_KP_ENTER
    MENU:
    - pygame.K_p

  • Thank you so much @mholgatem I found that pygame page after I had made the edits! I thought I was done for and had to start all over again! Phew
  • Sorry but i'm new with piplay and i'm trying to edit configure.yaml for my gamepad (pc/ps3 gamepad).This gamepad has two movement axis Digital & Analog and i only can navigate through menu with the analog one which is very difficult to control.
    How i can enable the digital axis for menu navigation?
    thanks!
  • I can't edit my last post, so I typed it again corrected:
    i'm trying to edit controller.yaml to control advancedMENU with my pc/ps3 joystick using de digital axis movement, because by default works with analog one.
    In JOYSTICK section appears:

    JOYSTICK:
    HORIZONTAL_AXIS: 0
    VERTICAL_AXIS: 1

    These axis, I supose that have to be the analog axis. And I ask me... what i have to write to change it to digital axis?

    I only can use digital axis with advMAME captured by the controller setup, SNES & PCSX emulators (the only that i have been tested) works with analog axis only. Controller setup recognizes all my buttons and directions pressed.

    Please, sorry for my bad english
  • @dR0W - controller.yaml is for controlling PiPlay, not any of the emulators. You can open the controller config menu (for configuring emulators) by pressing the 'tab' key or 'button 3' on a joystick. Or if you want to just edit advMame, you can do that by editing the config file /home/pi/.advance/advmame.rc
  • Hi, @mholgatem - i want to control PiPlay with the pad, but i only can control PiPlay with the analog axis and I want to control with digital arrows of the joystick.
    Thanks, for help
  • hmmm.... I'm not sure why it's not working. I don't have a gamepad to test with, so I probably won't be much use. Do your digital arrows work in any of the emulators or with jtest or something?
  • Digital arrows, works correctly with advMAME (and editing advmame.rc I have successfully setup 2 gamepads to work with it) but not with PiSNES and PCSX_rearmed emulators (that only recognizes analog movements).
    I don't have a usb keyboard to run jtest, but controller setup captures correctly all direction arrows and buttons.

    Thanks for this good project and for the help
  • @mholgatem the problem is solved now. There was a problem with my gamepad. I tried with another one and now works fine.

    Thanks to you and Shea. I hope you follows developing this great job.

  • @dR0W - Great! I'm glad you got it solved! There is nothing worse than having a problem with no ideas how to fix it!

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!