1

I need to add the space bar into a event. I know how to set these things up, but I don't know how to tell python that the space bar is what I want pressed. I have tried...

wn.listen()
wn.onkeypress(p_jump, " ")

but that allows any key that isn't already binded to be pressed.

Harrison Pugh
  • 113
  • 1
  • 9

1 Answers1

3
wn.listen()
wn.onkeypress(p_jump, "space")

According to How to start moving a turtle via space bar with python

iScripters
  • 403
  • 3
  • 13