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
–
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
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:
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:
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
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.