Can I get Keypress with Pycharm?
I am trying to recreate a synth in Pycharm where the user presses a key and it produces a tone, but I noticed that Pycharm console doesn't seem to work that way. Any way around this?
import msvcrt
while True:
pressedKey = msvcrt.getch()
if pressedKey == 'q':
print "Q was pressed"
elif pressedKey == 'x':
sys.exit()
else:
print "Key Pressed:" + str(pressedKey)
Please sign in to leave a comment.