Remove escape to console
  • Hey guys!

    I want to disable using ESC on the main menu to get to the console. Is there a way to do this? I am trying to make my pi run only with a controller. The console would be impossible to escape.

    I just need to make sure someone isn't playing games on my pi and accidently getting to the console.
  • Two things.

    1) How would I reach the console after that? Can I indicate a different key?

    2) Does this also keep the gamepad from exiting the main menu? When you hit B?

    Thanks mholgatem!
  • @jhnwhite: does you controller return characters in the terminal console?
    if so, there's an easy way to return to GUI from terminal. Just let me know.

    @mholgatem: interesting ; is there a "usable keys" reference anywhere? (python doc? pygame doc?) i may tweak this file to manage sound volume rather than using an ugly hack of pmutil.py... :-p
  • @lateo Pretty sure it doesn't. Plus, I want this thing to be usable by other people, which is why I am trying to avoid hitting the console if I can. So far I have a big red button on the top of the pi case that returns to the game list using ESC. I just don't want that button to hit the console if they press it too many times.

    If I can remap this to a key that only appears on a keyboard, then I can still work on the pi when I am at home with my keyboard and mouse.
  • Perfect! That is exactly what I need.
    Last thing: The B button on my controller will also exit the main menu. I want to make sure that doesn't happen.

    Thanks for all your help!
  • @mholgatem - Looking at option 2 I see something called PiMAME! What's that? ;)
  • @Chad - haha, old habits!
  • @mholgatem 6:00PM:
    thanks for the link :)
  • For the controller part, commenting out pygame.quit() and sys.exit() didn't work. I had to remove everything from the if statement down. It works, but not sure if that messes anything up! Hopefully not.

    Remapped my quit button to Q on my keyboard. Everything is working great now!
  • oops, that's right. Python would expect to see something there, so you would need to comment the 'if event.button == 1:' part out too. sorry bout that. It won't mess anything else up.

Howdy, Stranger!

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