[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Problem with simultaneous key presses



For your default keys, I suggest Up, Down, Left, Right and left Ctrl. The modifier keys (Alt, Ctrl and Shift) are less prone to blocking than Space.
 
Jason


From: Patrick Mullen <saluk64007@xxxxxxxxx>
To: pygame-users@xxxxxxxx
Sent: Tue, February 9, 2010 8:46:35 PM
Subject: Re: [pygame] Problem with simultaneous key presses

Using keymapping is always a good idea; besides allowing users to change the keys or get around the keyboard problem, you also make it easy for you to change the default controls if you feel they don't work anymore. Plus, it is easier to code with them - you don't have to remember which key does something, if keys[MOVE_LEFT] is more descriptive than if keys[K_a].

On Tue, Feb 9, 2010 at 6:21 PM, Kris Schnee <kschnee@xxxxxxxxxx> wrote:
On Tue, 9 Feb 2010 07:52:07 -0800, B W <stabbingfinger@xxxxxxxxx> wrote:
> Well crap. I was hoping that it was not woven into the fabric of
> space-time.
>
> Thanks for the article, René. An explanation is the next best thing to a
> solution. :)

Yeah, it's a problem some of us have encountered before, and it seems to
vary by keyboard so you can't easily plan around it. How about reading a
text file on startup, of the form:
"move_l: k_leftarrow
jump: space"...