Custom 'Enter' key in 0.8 Beta
  • Hi,

    I have built an arcade machine with a joystick and 8 buttons. After spending most of the day fighting with the controls I have it working. I can however not manage to get the 'enter'/select button to work. I found a post that states "The PiMAME menu is 'hard coded' to use the 'c' key or the enter key." but when I try and open it the post seems to be a completely different one to the one returned in the search results.
    I do have a button mapped to the 'c' key but it does not open the emulator although it does type 'c' in the terminal when I press it.

    Can anyone possibly guide me in the right direction to get any of my buttons to open the selected item in the main menu (GUI in 0.8 Beta)?

    Thanks
  • I'm not sure what what post you were looking at, but I just double checked the coding and 'c' is not an option. There are 3 keys that work as 'confirm' -> enter, space, or enter on numberpad.
  • Of course, you could add it in by editing:
    * pmmenu/mainscene.py
    * pmmenu/romlistscene.py

    Just as an example:
    elif event.key == pygame.K_RETURN or event.key == pygame.K_SPACE or event.key == pygame.K_KP_ENTER or event.key == pygame.K_c:
    self.run_sprite_command(self.selected_item)


    That allows the 'enter' key, the 'space' key, the '#pad enter' key and C key to run a game/option.

    --
    Conno123009
  • This helped and it's working a treat, thank you very much. It would appear as if I will have to change all the emulators too so it might be better to map the single player and coin buttons to different keys and then change those files accordingly.

    Your help is greatly appreciated :)

Howdy, Stranger!

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