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 <[email protected]>: > 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- [email protected] > Oracle Solaris Engineering - http://blogs.oracle.com/alanc >
_______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
