+ 1
Pygame+Laptop
Story: (Not necessary to read) I've used Pygame for few months and I felt very familiar with it using Pydroid3. Now I have a laptop, which runs Windows 10, I downloaded Python 3.7 from python.org and downloaded pygame 1.9.4 through a preinstalled command promth. It differs only a little from like it was in Pydroid3. Problem: I can't use the mouse or the key submodules, I've tried: pygame.mouse.get_pressed() pygame.key.get_pressed() But they don't take input from keyboard nor mouse pad, which are both built in to my laptop. pygame.mouse.get_pressed() works somehow on Pydroid3 for touch screen. Should I get a real mouse and keyboard? What can be the problem?
3 Answers
+ 2
You need an event listener.
pygame.event.get()
After this method you are able to use controls including your builtin mouse pad and keyboard.
Not separate mouse or keyboard is needed.
+ 6
This is gold đđ.
đ
+ 1
@Seb TheS It worked! Thanks alot!