0

I am pretty much a beginner at Python and code altogether. I have a raspberry pi to mess around on and I recently got a Trilobot.

I'm trying to set it up so I can control it with a keyboard. I decided to use turtle and have been using things like the code below. I want to be able to go forward and right, but I don't know how to do both of them at the same time by holding w and d.

def forward():
     Bot.forward()
wn.onkeypress(forward, “w”)

I don't know if any of that made sense. If it didn't, I'll gladly explain myself to get an answer.

ggorlen
  • 44,755
  • 7
  • 76
  • 106
  • 2
    Does this answer your question? [How to bind several key presses together in turtle graphics?](https://stackoverflow.com/questions/47879608/how-to-bind-several-key-presses-together-in-turtle-graphics) – ggorlen Dec 28 '22 at 23:08

0 Answers0