[SDL] Max number of simultaneous keypresses

Alan Wolfe atrix2 at cox.net
Thu Feb 24 13:34:50 PST 2005


i always liked this page for explaining the issue:

http://www.sjbaker.org/steve/omniv/keyboards_are_evil.html

----- Original Message ----- 
From: "Patrice Mandin" <mandin.patrice at wanadoo.fr>
To: "A list for developers using the SDL library. (includes SDL-announce)"
<sdl at libsdl.org>
Sent: Thursday, February 24, 2005 1:26 PM
Subject: Re: [SDL] Max number of simultaneous keypresses


Le Thu, 24 Feb 2005 22:14:48 +0100
blurgk <blurgk at gmail.com> a écrit:

> I have often encountered a problem in various games : when about 3
> keyboard keys are keeped pressed, it is impossible to press more keys
> (the presses are ignored). I was wondering where this problem come
> from (hardware limitation ?), and if there could be a means to work
> around it with SDL. It can be used to cheat in games in which several
> people play on the same keyboard (frozen-bubble, jumpnbump... ;) and
> I'd like to prevent that.

It is mainly a hardware problem. Keyboards are wired like a big array,
and pressing a key gives a row and a column (approximately). So if you
press more than 2-3 keys, you have many more connections done, and the
hardware don't send all the keys pressed.

Solution: Use a joystick! This is what they are for. And SDL support
both analog and digital joysticks. Only force feedback (and maybe rumble
?) is missing.

-- 
Patrice Mandin
WWW: http://membres.lycos.fr/pmandin/
Programmeur Linux, Atari
Spécialité: Développement, jeux


_______________________________________________
SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl





More information about the SDL mailing list