Re: Determining XKeysyms



On Mon, 2003-03-24 at 13:33, Matthew Garrett wrote:
...
> As far as I can tell, though, it only works for letters because the
> keysym for A happens to be XK_a. XStringToKeysym(" ") doesn't return the
> keysym for space, and XStringToKeysym(",") doesn't return the keysym for
> a comma - I assume that it actually wants to be XStringToKeysym("comma")
> or XStringToKeysym("space"), which just brings me back to requiring a 
> hardcoded table. 

Ugh, I agree that it's fairly unfriendly.

Rather than a hardcoded table, however, you can build one dynamically.
You could build your own for 0x20 - 0x60 and then use XStringToKeysym
elsewhere.  That leaves a few small ranges to take care of in order to
fill things out, for instance 0x7a-0x7e.  I am not sure if the accented
characters in 0xa0 to 0xff will work if passed an '8 bit extended ascii'
string or not.  I guess we need to do an experiment to check the 
other extended Latin character sets (above 0xff) also.

It does look as though I need to do something about this in at-spi
sooner rather than later.  I'll let you know if I have time to code some
of it.

- Bill
-- 
Bill Haneman <bill haneman sun com>




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]