Problem with grabbing keyboard input

Hi,
I am using SDL for grabbing keyboard input. Now, whenever a keyboard event is triggered i get a SDL_keysym structure that gives me information about the key being pressed and the state of modifier keys (shift, alt, caps etc).
Now the problem is that when i press ’ 9’, the SDL_keysym::sym variable gives me SDLK_9 and it should, so thats okay. But, when i press shift+9, it still gives me SDLK_9 whereas it should have given me SDLK_LEFTPAREN.
I am confused, is this the correct behviour of the SDLK key system, and if it is then do i have to create a mapping for all sorts of keys (checking whether shift or caps lock is pressed or not). If not, then please tell me a way in which it will give me the proper key code. Creating a mapping for a-z characters is easy, but for the whole keyboard can get a bit tedious (not difficult but tedious). I am using SDL version 1.2.5.0
Any help will be highly appreciated,
Sohyl.---------------------------------
Do you Yahoo!?
Friends. Fun. Try the all-new Yahoo! Messenger

— sohyl siddiqui <sohyl_s at yahoo.com> wrote:

Hi,
I am using SDL for grabbing keyboard input. Now,
whenever a keyboard event is triggered i get a
SDL_keysym structure that gives me information about
the key being pressed and the state of modifier keys
(shift, alt, caps etc).
Now the problem is that when i press ’ 9’, the
SDL_keysym::sym variable gives me SDLK_9 and it
should, so thats okay. But, when i press shift+9, it
still gives me SDLK_9 whereas it should have given
me SDLK_LEFTPAREN.
I am confused, is this the correct behviour of the
SDLK key system, and if it is then do i have to
create a mapping for all sorts of keys (checking
whether shift or caps lock is pressed or not). If
not, then please tell me a way in which it will give
me the proper key code. Creating a mapping for a-z
characters is easy, but for the whole keyboard can
get a bit tedious (not difficult but tedious). I am
using SDL version 1.2.5.0
Any help will be highly appreciated,
Sohyl.

For text input, the easiest way to deal with the input
is to enable unicode and then read from that part of
the struct in your event que. This will allow both
international input, and prevent you from having to
track key states.

Check out:
http://sdldoc.csn.ul.ie/sdlenableunicode.php
And this, which gives a mini example useage of the
unicode field:
http://sdldoc.csn.ul.ie/sdlkeysym.php

Then, you can stick to keysyms for actual game
control, which should stay the same no matter if
capslock is on and/or shift is pressed. If you want to
track these keys for actual gameplay (not text input)
check out:
http://sdldoc.csn.ul.ie/sdlgetmodstate.php

-Mike__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com