So, awhile ago, I started teaching myself kivy. I started with the main kivy website and went through its pong making tutorial and upon finishing that I decided to try and give it key input. I just can't seem to find any kind of guide to key input with kivy! Anyone know some kind of tutorial or can provide some easy to understand code? I did look at the Keyboard Listener in the examples folder of kivy, but I'm not quite sure how to use that if I'm supposed to.
Thanks for any assistance.
I guess you are asking how to control the paddles with the keyboard. I assume you have the final ping pong codes running on your computer (If not, you can find them at the end of this section).
1 - In the
main.py
import the Window class:2 - Redefine the beginning of the
PongGame
class so it looks like the following:Voilà! Press
w
ands
for the left paddle andup
anddown
for the right paddle.