A mistake in keysymdef.h with upsilon symbol?

Mats Blakstad mats.gbproject at gmail.com
Tue Sep 1 18:38:35 PDT 2015


Thanks for explaining this!

However I don't find the documentation clear.

How can convert a unicodes into X keysym? Is there a list somewhere?

As example, I want to add 0x025B. It says that I should take "the
character's Unicode number plus 0x01000000". What does that mean? How can I
use the functions XStringToKeysym() and XKeysymToString(). Can I run them
in the terminal in some way? Could you show me an example of what command I
can run in terminal to find the X keysym for unicode 025B?

2015-09-02 3:24 GMT+02:00 Alan Coopersmith <alan.coopersmith at oracle.com>:

> On 09/ 1/15 06:16 PM, Mats Blakstad wrote:
>
>> Hi
>>
>> I work to make a patch to add new keysym names to this file:
>> http://cgit.freedesktop.org/xorg/proto/x11proto/tree/keysymdef.h
>>
>> I noticed that unicode 01b1 is listed like this:
>>
>> #define XK_aogonek                       0x01b1  /* U+0105 LATIN SMALL
>> LETTER A
>> WITH OGONEK */
>>
>> However, unicode 01b1 is in fact the capital version of latin upsilon
>> <https://en.wikipedia.org/wiki/%C6%B1>, so it should be Ʊ.
>>
>> Or is the number on the side '0x01b1' not a unicode?
>>
>
> It is not.   It is the X keysym value defined before Unicode existed.
> The U+... in the comment is the Unicode value.
>
> And if so, how can I find out what code to use for different unicodes?
>>
>
> See the long comment near the top of the file, after the license info,
> which includes:
>
>  * For any future extension of the keysyms with characters already
>  * found in ISO 10646 / Unicode, the following algorithm shall be
>  * used. The new keysym code position will simply be the character's
>  * Unicode number plus 0x01000000. The keysym values in the range
>  * 0x01000100 to 0x0110ffff are reserved to represent Unicode
>  * characters in the range U+0100 to U+10FFFF.
>
> and
>
>  * Before adding new keysyms, please do consider the following: In
>  * addition to the keysym names defined in this file, the
>  * XStringToKeysym() and XKeysymToString() functions will also handle
>  * any keysym string of the form "U0020" to "U007E" and "U00A0" to
>  * "U10FFFF" for all possible Unicode characters. In other words,
>  * every possible Unicode character has already a keysym string
>  * defined algorithmically, even if it is not listed here. Therefore,
>  * defining an additional keysym macro is only necessary where a
>  * non-hexadecimal mnemonic name is needed, or where the new keysym
>  * does not represent any existing Unicode character.
>
> --
>         -Alan Coopersmith-              alan.coopersmith at oracle.com
>          Oracle Solaris Engineering - http://blogs.oracle.com/alanc
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg-devel/attachments/20150902/353a2e29/attachment.html>


More information about the xorg-devel mailing list