Values of keysyms

Hello,
Are the values of keysym going to change anytime soon? I’d like to
check to see if a event.key.keysym.sym is a letter, so I want to use the
numbers they are to check for that. Is this a good idea or are they
subject to change?

– chris (@Christopher_Thielen)

As far as i know they are mostly ASCII values so i don’t think the values
that are the same as the ASCII ones will change any time soon. Offcourse F1
ect. keys may change maybe.
I myself assumed the ASCII table values will be retained, correct me if i’m
wrong.

GreeTz
DV.> ----- Original Message -----

Hello,
Are the values of keysym going to change anytime soon? I’d like to
check to see if a event.key.keysym.sym is a letter, so I want to use the
numbers they are to check for that. Is this a good idea or are they
subject to change?

– chris (chris at luethy.net)

Christopher Thielen wrote:

Hello,
Are the values of keysym going to change anytime soon? I’d like to
check to see if a event.key.keysym.sym is a letter, so I want to use the
numbers they are to check for that. Is this a good idea or are they
subject to change?

– chris (chris at luethy.net)

if they would ever change, i think the different sets of characters
would remain together, so checking that a key is within the range of key
a to key z should remain functional even if the values change. same for
Function keys i would assume.

anyone want to correct me?

yeah, youd deffinately hope so.

one thing too is that if they change the constants of the characters, it
would break binary compatibility, so they wont change the constants until
atleast the next major version of SDL id think.> ----- Original Message -----

From: calvin@ironfroggy.com (Calvin Spealman)
To:
Sent: Wednesday, April 02, 2003 3:41 PM
Subject: [SDL] Re: values of keysyms

Christopher Thielen wrote:

Hello,
Are the values of keysym going to change anytime soon? I’d like to
check to see if a event.key.keysym.sym is a letter, so I want to use the
numbers they are to check for that. Is this a good idea or are they
subject to change?

– chris (chris at luethy.net)

if they would ever change, i think the different sets of characters
would remain together, so checking that a key is within the range of key
a to key z should remain functional even if the values change. same for
Function keys i would assume.

anyone want to correct me?


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

good point. also, like calvin said, a-z and 0-9 should keep the same
order, so i just wrote code like: (the_key >= SDLK_a) && (the_key <=
SDLK_z).On Wed, 2003-04-02 at 16:55, Atrix Wolfe wrote:

yeah, youd deffinately hope so.

one thing too is that if they change the constants of the characters, it
would break binary compatibility, so they wont change the constants until
atleast the next major version of SDL id think.

----- Original Message -----
From: “Calvin Spealman”
To:
Sent: Wednesday, April 02, 2003 3:41 PM
Subject: [SDL] Re: values of keysyms

Christopher Thielen wrote:

Hello,
Are the values of keysym going to change anytime soon? I’d like to
check to see if a event.key.keysym.sym is a letter, so I want to use the
numbers they are to check for that. Is this a good idea or are they
subject to change?

– chris (@Christopher_Thielen)

if they would ever change, i think the different sets of characters
would remain together, so checking that a key is within the range of key
a to key z should remain functional even if the values change. same for
Function keys i would assume.

anyone want to correct me?


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


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

good point. also, like calvin said, a-z and 0-9 should keep the same
order, so i just wrote code like: (the_key >= SDLK_a) && (the_key <=
SDLK_z).

Yes, but if you really need character values and not raw key-as-button
values, you should turn on UNICODE processing with SDL_EnableUNICODE(1)
and use the ‘unicode’ member of the key event. This is guaranteed to
have alphabetic values modified by the keyboard modifier keys.

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