sdl@lists.libsdl.org
[Top] [All Lists]

Re: [SDL] Keys LEFT UP and SPACE

Subject: Re: [SDL] Keys LEFT UP and SPACE
From: Bob Pendleton
Date: Tue, 30 Oct 2007 21:00:47 -0500
On Tue, 2007-10-30 at 21:55 +0000, Micah Brening wrote:
> Hello all,
> 
> I've been running into an annoying "bug".  In most of my projects/experiments 
> I commonly use the arrow keys for movement, and the space bar for action.
> 
> They all work seperately, but with the combination of Up, Left, and Space; it 
> will drop one or the other depending on which is pressed last, usually space.
> 
> I've tried two different ways of accessing the keys (pumpkeys+getkeystate and 
> pollevents+event.key.keysym.sym)
> 
> But other combinations (eg. (Up,Right,Space),(Up,Left,s)) do work.  This is 
> consistant on Windows 2000, XPpro, Vista Ultimate.  I believe it did the same 
> on Linux (debian, gentoo, ubuntu) but I'd have to double check on that.
> 
> Is there a reason for this?

Yes, there is a reason for that. Keyboards are built that way. All of
them. They are built that way because it is cheaper and most keyboards
are used to type, not play games. There is really nothing you can do
about it. Consider using a mouse or a joystick.

I'll let someone else give you the long answer or you can just google
for the info. It has been well document for... oh I don't know... since
the first IBM PC? The problem bit me in '84.

        Bob Pendleton

> 
> I have no problem using a different button other than space since other keys 
> will work with the UP+LEFT combination.  But it is an annoyance and I just 
> simply want to know why it is.
> 
> Anyone else have this problem?
> 
> Anyone have a solution for it?
> 
> Is it system based?  Or is it SDL based?
> 
> Thanks!
> Micah
> 
> _______________________________________________
> SDL mailing list
> SDL@xxxxxxxxxxxxxxxx
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
> 
-- 
+--------------------------------------+
+ Bob Pendleton: writer and programmer +
+ email: Bob@xxxxxxxxxxxxx             +
+ web: www.GameProgrammer.com          +
+ www.Wise2Food.com                    +
+ nutrient info on 7,000+ common foods +
+--------------------------------------+


_______________________________________________
SDL mailing list
SDL@xxxxxxxxxxxxxxxx
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

<Prev in Thread] Current Thread [Next in Thread>