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
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.
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.