Keyboard

hi,
I would like to know if it’s possible to take care of two “key down”.
For example the user presses the key for “fire” and the key for “move down”.

Can I check these condition?
tnx

hi,
I would like to know if it’s possible to take care of two “key down”.
For example the user presses the key for “fire” and the key for “move down”.

Can I check these condition?
tnx

I usually store the keydown in a specific bool value.
If another keydown follows which is modified by the first one, then you can check the boolean value.
But I don’t think that this sdl function is thread save, but I’m not sure!
Hope this helps.
ChristianOn Sat, 13 May 2006 18:47:35 +0200 Salvatore Di Fazio <salvatore.difazio at gmail.com> wrote:


“A horrible little boy came up to me and said, You know in your book The Martian Chronicles?' I said,Yes?’ He said, You know where you talk about Deimos rising in the East?' I said,Yes?’ He said `No.’
– So I hit him.”
– attributed to Ray Bradbury

Message-ID: <20060513201233.661d70b6.krampenschiesser at freenet.de>

I usually store the keydown in a specific bool value.
If another keydown follows which is modified by the first one, then you
can check the boolean value.
But I don’t think that this sdl function is thread save, but I’m not >sure!
Hope this helps.

Hi Christian,
I didn’t find your game sources.

Are you sure that we can’t use a &-Logic somewhere?
tnxFrom: krampenschiesser@freenet.de (Christian)

hi,
I would like to know if it’s possible to take care of two “key down”.
For example the user presses the key for “fire” and the key for “move down”.

Can I check these condition?

Yes, check out SDL_GetKeyState()
Most keyboards have hardware limitations on the number of keys that can
be pressed simultaneously., but usually all of the arrow keys can be pressed
at once.

-Sam Lantinga, Senior Software Engineer, Blizzard Entertainment