[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] Reading input without pygame.display.set_mode()
- To: pygame-users@xxxxxxxx
- Subject: [pygame] Reading input without pygame.display.set_mode()
- From: "Patrick Mullen" <saluk64007@xxxxxxxxx>
- Date: Wed, 12 Apr 2006 00:19:24 -0700
- Delivered-to: archiver@seul.org
- Delivered-to: pygame-users-outgoing@seul.org
- Delivered-to: pygame-users@seul.org
- Delivery-date: Wed, 12 Apr 2006 03:19:26 -0400
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=jH+Qp6kH15R+0iuG5m76Frs94XK4aVAOgWNDBUQx1XSJIv67ziJvHE9wPupC88FpfM7VZTA1sx35jeBrun5xHp46cJwXnkgSg/RcJWwM1WLc/CDgOipzwg2BEt+nAPLrFpP2zP4GftmMEGF1pWAxmBo0XWLQWzVrWwbnmWc5zIw=
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
I am using pygame with another application for joystick, sound, and clock support, and it is working greate so far. The problem is, I want to be able to use the keyboard and mouse as well. Unfortunately it appears as though keyboard events never get added unless I initialize a pygame window. This would be ok, except that then of course, that window has to be in focus for the keys to be pressed. It's a bit messy. Does anyone know somthing like pygame that allows you to read keypresses and mouse button presses without that library having to take control? Or maybe a way to get it to work in pygame?
I realize this is somewhat of a fringe request, however I don't see many ways around it. The problem is the application is not python, only running python scripts, but I need to be able to access keypresses from the python scripts. It seems a bit odd to me that this works just fine with the joystick, but not with the other input devices.