Keysym

Why are there keysyms for characters that require a shift key to get? Like,
why does !, @, #, etc have keysyms?

Also, how do I handle them in a non-text context? If I get !, should I treat it
like someone pressed 1?–
Patrick “Diablo-D3” McFarland || unknown at panax.com
"Computer games don’t affect kids; I mean if Pac-Man affected us as kids, we’d
all be running around in darkened rooms, munching magic pills and listening to
repetitive electronic music." – Kristian Wilson, Nintendo, Inc, 1989

chekc this out
http://sdldoc.csn.ul.ie/sdlkey.php#AEN4743
and this
http://sdldoc.csn.ul.ie/guideinputkeyboard.phpOn Sunday 06 July 2003 2:32 am, Patrick McFarland wrote:

Why are there keysyms for characters that require a shift key to get? Like,
why does !, @, #, etc have keysyms?

Also, how do I handle them in a non-text context? If I get !, should I
treat it like someone pressed 1?


"They that can give up essential liberty to obtain a little temporary safety
deserve neither liberty nor safety. "
–Benjamin Franklin

That answers a different question, “how”. I was asking why it exists.On 06-Jul-2003, Samuel wrote:

chekc this out
http://sdldoc.csn.ul.ie/sdlkey.php#AEN4743
and this
http://sdldoc.csn.ul.ie/guideinputkeyboard.php


Patrick “Diablo-D3” McFarland || unknown at panax.com
"Computer games don’t affect kids; I mean if Pac-Man affected us as kids, we’d
all be running around in darkened rooms, munching magic pills and listening to
repetitive electronic music." – Kristian Wilson, Nintendo, Inc, 1989

Why are there keysyms for characters that require a shift key to get? Like,
why does !, @, #, etc have keysyms?

There are some keyboards which have those keys on them.
For example, the French keyboard has # where the US keyboards have the 3
(if I remember correctly), and the way to get 3, is to type shift-#.

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment

Hrm, thats pretty weird. So what should I do exactly? (As I said earlier, this
is in a non-text context.) Treat it like someone pressed 3?On 06-Jul-2003, Sam Lantinga wrote:

Why are there keysyms for characters that require a shift key to get? Like,
why does !, @, #, etc have keysyms?

There are some keyboards which have those keys on them.
For example, the French keyboard has # where the US keyboards have the 3
(if I remember correctly), and the way to get 3, is to type shift-#.


Patrick “Diablo-D3” McFarland || unknown at panax.com
"Computer games don’t affect kids; I mean if Pac-Man affected us as kids, we’d
all be running around in darkened rooms, munching magic pills and listening to
repetitive electronic music." – Kristian Wilson, Nintendo, Inc, 1989

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On german keyboards the # has it’s own key… without the need for shift.
So the germans need a extra keysym for it. I guess it’s just the same for the
other characters, just other keyboard layouts…

Cheers,

NickOn Sunday 06 July 2003 23:00, Patrick McFarland wrote:

On 06-Jul-2003, Samuel wrote:

chekc this out
http://sdldoc.csn.ul.ie/sdlkey.php#AEN4743
and this
http://sdldoc.csn.ul.ie/guideinputkeyboard.php

That answers a different question, “how”. I was asking why it exists.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/DXXkb37gf0I5KHcRAgz5AKCZNGDBF2y64U1/zyAY/dcbQPXVmwCfWf0a
Wf96+1MiVMz5UIx5vCsKmEM=
=Mm6n
-----END PGP SIGNATURE-----

The SDLKey struct in SDL_keysym.h has lots of SDLK_WORLD_XX entries.
Just find out which of those it maps to and use that. They’re
specifically meant for international keyboards.On Thu, 2003-07-10 at 10:19, Nick Heuser wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On german keyboards the # has it’s own key… without the need for shift.
So the germans need a extra keysym for it. I guess it’s just the same for the
other characters, just other keyboard layouts…

Cheers,

Nick

On Sunday 06 July 2003 23:00, Patrick McFarland wrote:

On 06-Jul-2003, Samuel wrote:

chekc this out
http://sdldoc.csn.ul.ie/sdlkey.php#AEN4743
and this
http://sdldoc.csn.ul.ie/guideinputkeyboard.php

That answers a different question, “how”. I was asking why it exists.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/DXXkb37gf0I5KHcRAgz5AKCZNGDBF2y64U1/zyAY/dcbQPXVmwCfWf0a
Wf96+1MiVMz5UIx5vCsKmEM=
=Mm6n
-----END PGP SIGNATURE-----


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


Jimmy <@Jimmy>
Jimmy’s World.org
-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20030711/c35c5210/attachment.pgp

Patrick McFarland wrote:

Why are there keysyms for characters that require a shift key to get? Like,
why does !, @, #, etc have keysyms?

There are some keyboards which have those keys on them.
For example, the French keyboard has # where the US keyboards have the 3
(if I remember correctly), and the way to get 3, is to type shift-#.

Well, not exactly :wink:

We have ["] under [3], and to get 3, we have to type [shift]-["]
And to get #, we have to type [alt gr]-["]

Hrm, thats pretty weird. So what should I do exactly? (As I said earlier, this
is in a non-text context.) Treat it like someone pressed 3?

You should read SDL_keysym->sym which has the same value, wether any key
modifier (shift, alt…) is pressed or not.
For example, its value is 34 if I press either ["], [shift]-["] or [alt
gr]-["]

And if you need to print a corresponding symbol, you have to use
SDL_GetKeyName(SDL_keysym->sym) and you’ll get ", # or 3, depending on
the modifiers.

Stephane> On 06-Jul-2003, Sam Lantinga wrote: