Mac OS X pygame input goes to Terminal instead of Python

前端 未结 2 1035
有刺的猬
有刺的猬 2020-12-19 05:40

I\'m having trouble running a pygame based app on Mac OS X via Terminal. Input events such as keystrokes go to the Terminal instead of my Python app, and are detected by py

相关标签:
2条回答
  • 2020-12-19 06:34

    The default py-game on Mac Ports has the problem you describe. A work-around is to install the py-game2.6 target instead. This works for me with OS X 10.6.7.

    0 讨论(0)
  • 2020-12-19 06:34

    Can you check if the pygame.K_* constants actually correspond to the correct values for your keyboard? For the record I tried your code in Linux on a MacBook Pro and it seems to be working fine.

    0 讨论(0)
提交回复
热议问题