[SDL] Arrow Keys, and keysym.unicode, SDL 1.2.10

Nigel Kerr nigel.kerr at gmail.com
Sun Jun 25 08:05:18 PDT 2006


Christian,

Thank you for this informative response!  What I am thinking now:

since this has to do with Macosx, I should try to introduce a function
that knows about these mac-ism's, returns the sym value when one of
these mac PUA unicode values comes along, and is used at one strategic
point.  Since its a cross-platform app, I need to limit the scope of
the change as much as possible, and not ask for big logic changes
surrounding this issue.

Thanks again!

cheers,
nigel

On 6/25/06, Christian Walther <cwalther at gmx.ch> wrote:
> Nigel Kerr wrote:
> > If I start this modified app, and then press on keyboard of my laptop
> > the left arrow, then the up, then right, then down, I get the
> > following output:
> >
> > keydown: f702 276
> > keyup: f702 276
> > keydown: f700 273
> > keyup: f700 273
> > keydown: f703 275
> > keyup: f703 275
> > keydown: f701 274
> > keyup: f701 274
> >
> > That the .sym field corresponds to the SDLK_LEFT, UP, RIGHT, and DOWN
> > is fine, but what puzzles me greatly are the Unicode values.  These
> > are private use area values (), and I am unsure what they mean.  I am
> > not sure who is giving me these values (Macosx?  SDL?); have I missed
> > in the documentation or mailing list what is intended?
>
> These values come from Mac OS X. Apparently Apple (or NeXT before them)
> decided that the arrow keys should generate character codes too.
>
> See <http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/CORPCHAR.TXT>
> (or other pages reached from <http://www.google.com/search?q=U%2BF700>).
>
> As far as I know the SDL documentation does not specify that
> non-character-keys should not generate Unicode values, so the observed
> behavior of the Mac OS X (Quartz/Cocoa) backend seems to be OK.
>
> > So maybe I'm asking for advice: should I try to handle the
> > "command-like" non-printing characters first before anything else?
>
> That's what I do.
>
> I wouldn't spend too much work on this issue though, as the keyboard
> handling is supposed to be rewritten for 1.3 anyway, and who knows how
> this will work then.
>
>   -Christian
>
>
> _______________________________________________
> SDL mailing list
> SDL at libsdl.org
> http://www.libsdl.org/mailman/listinfo/sdl
>




More information about the SDL mailing list