rawKeyDown - Cross Platform ???

Dar Scott dsc at swcp.com
Wed Aug 2 14:13:17 EDT 2006


On Aug 2, 2006, at 5:25 AM, Richmond Mathewson wrote:

> Does anybody know whether rawKeyDown numbers are the
> same cross-platform?

Here are some clues:

I think I remember seeing long ago differences.  I now suspect they  
might be predictable.  For the most part, they are the same.

The word keysym is used for the code in the old MetaCard documentation.

I suspect the keysym codes are those from X11.

I think the keysym is at a slightly higher level than keycode, which  
might be hardware dependent.

I think the keysym might be based on a glyph on the top of the key.   
(A counter example test might be to see if the return on the Mac  
keyboard and the return on Windows keyboard are the same.  Then  
again, some might say those are equivalent glyphs.)  There might be  
multiple glyphs on a keyboard.

I have never seen a definitive table or standard.  I think I have  
seen some partial tables in a specific use.

Yikes.  I just found something.  I don't know if it is real or a  
proposal.  This should give you a hint:

     http://www.cl.cam.ac.uk/~mgk25/ucs/X11.keysyms.pdf

I think this is a proposal that adds the new Unicode keysyms, but it  
should give you a good idea.

I agree.  Runrev should note common differences.

I also think they should refer to a standard or provide a table,  
perhaps derived from such, or provide other information that would  
help in programmers using these numbers.

That would also allow people to determine whether an interesting code  
is a bug or not.

Let us know what you learn, if you feel inclined.

Dar Scott




More information about the use-livecode mailing list