I'm trying to add keyboard input to move python's turtles but without even pressing the assigned key the turtle moves as if I'm holding the assigned key.
What am I doing wrong?
My code is below:
# import
import turtle
# init screen, turtle
window = turtle.Screen()
turt = turtle.Turtle()
turt.speed(5)
def up():
turt.forward(10)
def left():
turt.left(10)
def right():
turt.right(10)
while True==True:
turtle.onkey(up(), "Up")
turtle.onkey(left(), "Left")
#turtle.onkey(right(), "Right")
# window await
turtle.listen()
window.mainloop()