turtle.onkey(fun, key)
turtle.onkeyrelease(fun, key)
Parameters: |
|
---|
Bind fun to key-release event of key. If fun is None
, event bindings are removed. Remark: in order to be able to register key-events, TurtleScreen must have the focus. (See method listen()
.)
>>> def f(): ... fd(50) ... lt(60) ... >>> screen.onkey(f, "Up") >>> screen.listen()
Please login to continue.