Ctrl + w == unicode 23?

i’m getting reports in ut2003 that holding down ctrl and hitting ‘w’ at
the same time screws up the controls…the reason appears to be that this
combination reports itself as unicode char 23. If you hold down ctrl
(keysym 306, unicode 0), then hit ‘w’ (normally keysym/unicode 119), you
get keysym 119, unicode 23. Letting go of ctrl before ‘w’ will give you
119 and not 23 upon w’s release.

So, dumb questions:

  1. Is this a bug?
  2. If it isn’t a bug, what character is “23” supposed to be?
  3. If this is a bug, is it an SDL issue, or something that should be fixed
    in the user’s X11 keymap?

This is with the x11 (OpenGL) target, obviously.

Thanks,
–ryan.

i’m getting reports in ut2003 that holding down ctrl and hitting ‘w’ at
the same time screws up the controls…the reason appears to be that this
combination reports itself as unicode char 23. If you hold down ctrl
(keysym 306, unicode 0), then hit ‘w’ (normally keysym/unicode 119), you
get keysym 119, unicode 23. Letting go of ctrl before ‘w’ will give you
119 and not 23 upon w’s release.

So, dumb questions:

  1. Is this a bug?

No.

  1. If it isn’t a bug, what character is “23” supposed to be?

I believe this is Ctrl-W, given that character “13” is Ctrl-M.

  1. If this is a bug, is it an SDL issue, or something that should be fixed
    in the user’s X11 keymap?

Well, it depends on how you’re interpreting control keys. It’s the same
issue as SHIFT-W, which yields the keysym SDLK_w, but the unicode ‘W’.
When you release the key, you’ll get a key up for keysym SDLK_w, unicode 0.
(or rather, it should - it’s not consistent on all platforms and the unicode
value on key up should be considered undefined)

I’m not sure if that helps…

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

  1. If it isn’t a bug, what character is “23” supposed to be?

For those who may not know, ctrl-A through ctrl-Z map to ASCII
characters 1 through 26, in the obvious pattern. ctrl-[ through ctrl-_
continue the pattern for characters 27 through 31. ASCII character 0,
also known as NUL, is represented as ctrl-@ (or sometimes ctrl-space).

b

For those who may not know, ctrl-A through ctrl-Z map to ASCII
characters 1 through 26, in the obvious pattern. ctrl-[ through ctrl-_
continue the pattern for characters 27 through 31. ASCII character 0,
also known as NUL, is represented as ctrl-@ (or sometimes ctrl-space).

Oh, duh, I guess that makes sense. Just didn’t expect X11 to consider
them as ASCII 1 through 26…that seems so…DOS. :slight_smile:

As a “gotcha” for SDL/X11 coders, though, be aware that your keydown event
for the letter key will have a different unicode value than your keyup if
you release the CTRL key before the letter key.

–ryan.

I’m not sure if that helps…

It does, actually. After this was explained, I proceeded to smack my
forehead. :slight_smile:

–ryan.

As a “gotcha” for SDL/X11 coders, though, be aware that your keydown event
for the letter key will have a different unicode value than your keyup if
you release the CTRL key before the letter key.

As a gotcha for SDL coders in general, the unicode value on a keyup is
completely meaningless. The unicode value is only meaningful for a key
down event. That’s why correctly written games typically use unicode
values for instant commands and raw keysyms for gamepad type control.

The next version of the SDL API will separate unicode character input from
keyboard key presses to make this distinction clearer, and handle cases where
character events come from an IME composing several characters at once.

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

characters 1 through 26, in the obvious pattern. ctrl-[ through ctrl-_
continue the pattern for characters 27 through 31. ASCII character 0,
also known as NUL, is represented as ctrl-@ (or sometimes ctrl-space).
Oh, duh, I guess that makes sense. Just didn’t expect X11 to consider
them as ASCII 1 through 26…that seems so…DOS. :slight_smile:

Not sure if you were around before then, but this dates all the way back
to original teletypes. Ctrl-A through Ctrl-Z is 1-26. Nothing DOS about
it!

–>Neil-------------------------------------------------------------------------------
Neil Bradley In the land of the blind, the one eyed man is not
Synthcom Systems, Inc. king - he’s a prisoner.
ICQ #29402898

That statement made my head hurt Ryan. This mapping has been used for as
long as there have been ASCII characters. This mapping is older than
DOS, it is older than CP/M, it is older than microprocessors. It goes
back to the original ASCII character set standardized in 1963.

The oddest thing about it is that DOS messed up the ASCII character set
by miss-using a number of the characters and providing printable
representations for characters that aren’t supposed to be printable.
Lines really are supposed to end with cr/lf or else the carriage won’t
return and the paper won’t advance and you get a real mess. :slight_smile:

–++ouch+±-

My head hurts.

	Bob Pendleton

P.S.

For those of you who have never had to work with 7 level paper tape and
printing ASCII terminals… Thank your lucky stars. They were a ROYAL
PITA.On Sun, 2002-12-01 at 18:51, Ryan C. Gordon wrote:

For those who may not know, ctrl-A through ctrl-Z map to ASCII
characters 1 through 26, in the obvious pattern. ctrl-[ through ctrl-_
continue the pattern for characters 27 through 31. ASCII character 0,
also known as NUL, is represented as ctrl-@ (or sometimes ctrl-space).

Oh, duh, I guess that makes sense. Just didn’t expect X11 to consider
them as ASCII 1 through 26…that seems so…DOS. :slight_smile:


±-----------------------------------+

For those of you who have never had to work with 7 level paper tape and
printing ASCII terminals… Thank your lucky stars. They were a ROYAL
PITA.

What’s a Royal PITA ? A famous greek sandwitch ?? :wink:


Do You Yahoo!? – Une adresse @yahoo.fr gratuite et en fran?ais !
Yahoo! Mail : http://fr.mail.yahoo.com

----- Original Message -----
From: bob@pendleton.com (Bob Pendleton)
To: “SDL Mailing List”
Sent: Monday, December 02, 2002 6:57 PM
Subject: Re: [SDL] ctrl + w == unicode 23?

The oddest thing about it is that DOS messed up the ASCII character set
by miss-using a number of the characters and providing printable
representations for characters that aren’t supposed to be printable.
Lines really are supposed to end with cr/lf or else the carriage won’t
return and the paper won’t advance and you get a real mess. :slight_smile:

Remember having to send NULs to the printer to give time for the carriage
to make it all the way back to the starting column? Ouch!

–>Neil-------------------------------------------------------------------------------
Neil Bradley In the land of the blind, the one eyed man is not
Synthcom Systems, Inc. king - he’s a prisoner.
ICQ #29402898

For those of you who have never had to work with 7 level paper tape and
printing ASCII terminals… Thank your lucky stars. They were a ROYAL
PITA.

What’s a Royal PITA ? A famous greek sandwitch ?? :wink:

PITA == Pain In The Ass.

Royal == excessive or overbearing, like royalty. (This usage reflects
attitudes toward royalty found in some parts of the United States and
may be a reflection of some trouble territories now know as the original
13 United States had with King George III in the late 1700s.)

	Bob PendletonOn Mon, 2002-12-02 at 12:26, Chris wrote:

----- Original Message -----
From: “Bob Pendleton” <@Bob_Pendleton>
To: “SDL Mailing List”
Sent: Monday, December 02, 2002 6:57 PM
Subject: Re: [SDL] ctrl + w == unicode 23?


Do You Yahoo!? – Une adresse @yahoo.fr gratuite et en fran?ais !
Yahoo! Mail : http://fr.mail.yahoo.com


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

±-----------------------------------+

Hello Sam,

Is it possible to compile SDL for GameBoy Advance?
And what about Palm OS handhelds?–
Best regards,
Alexander mailto:Editor at echo.ru

I’ve worked with the GBA, and alot of the conventions that are used on
the GBA just wouldn’t make a lot of sense with SDL. Sure, SDL could be
used for the 8 and 16 bit 240x160 and the 16bit 120x80 modes, but it
wouldn’t really help at all with the tiled modes, which are the thrust
of the development environment.
RobertOn Mon, 2002-12-02 at 13:40, Alexander Gayevoy wrote:

Hello Sam,

Is it possible to compile SDL for GameBoy Advance?
And what about Palm OS handhelds?


Best regards,
Alexander mailto:Editor at echo.ru


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

I don’t know if he’s using SDL, but Brian Provinciano is currently porting
Sierra’s AGI interpreter to the Game Boy Advance. A couple links are
http://www.mega-tokyo.com/forum/index.php?board=3;action=display,threadid=299
and http://www.classicgaming.com/agisci/aginterp.shtml

I know that NAGI, Nick Sonneveld’s modern AGI interpreter uses SDL, and it’s
a beautiful piece of work, though…>From: Alexander Gayevoy

Reply-To: sdl at libsdl.org
To: Sam Lantinga
Subject: [SDL] SDL on GameBoy Advance
Date: Mon, 2 Dec 2002 19:40:31 +0000

Hello Sam,

Is it possible to compile SDL for GameBoy Advance?
And what about Palm OS handhelds?


Best regards,
Alexander mailto:Editor at echo.ru


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


Protect your PC - get McAfee.com VirusScan Online
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963