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

Re: [pygame] Problem with simultaneous key presses



hi,

keyboards are evil:
http://www.sjbaker.org/wiki/index.php?title=Keyboards_Are_Evil

you can try changing around they keys... some combinations are better
than others.

cheers,


On Tue, Feb 9, 2010 at 9:14 AM, B W <stabbingfinger@xxxxxxxxx> wrote:
> Howdy, folks.
>
> The following small program demonstrates a problem with key presses.
>
> http://trollsouttaluckland.googlecode.com/files/test.py
>
> The program accepts cursor keys and space key to simulate moving and firing,
> respectively. It accumulates keydown and keyup events, translating
> combinations into diagonal movement. If you press up+left, for example, the
> box moves diagonally upward and left. This works as intended.
>
> Theoretically you can also fire the ray while moving. However, while moving
> diagonally this only sometimes works. If for example I press space while
> holding down up+left, the space key event is sometimes lost or blocked. I
> can't tell which. But the result is that sometimes while moving diagonally
> the ray "fires" and sometimes it does not.
>
> This occurs on Windows XP, Python 2.5.4, Pygame 1.9.1release-svn2575. I've
> also seen it in Pygame 1.8.1.
>
> Does anyone have some insight on this odd behavior? Thanks in advance. :)
>
> Gumm
>