In the /usr/share/X11/xkb/symbols
directory there are various keyboard layouts listed. I made a copy of the /usr/share/X11/xkb/symbols/us
file under the name /usr/share/X11/xkb/symbols/new_test_layout
.
The symbols corresponding to the keys being pressed are indicated in the file as in the given example:
xkb_symbols "basic"{
//other keys
key <AD01> {[q, Q]};
//other keys
};
This means that the symbol lowercase q appears when the key AD01 is pressed normally, and uppercase Q appears when the key AD01 is pressed along with shift key. From my understanding, the third symbol listed will appear when the key is pressed along with alt-gr key, and the fourth symbol when it is pressed along with alt-gr and shift both.
I can replace the symbols provided under each key with a symbol of my choice. However, in this file the symbols are not being directly represented as string characters or by their Unicode values. For example in the file there is
key <AB10> {[slash, question]};
I am very new to Linux, so I am not sure what these are, but I am guessing that they are variables defined in another file. Anyhow slash
will correspond to the symbol /
and question
will correspond to the symbol ?
In this webpage, there is an example of an xkb
layout for a Farsi keyboard.
Here you can see for example,
key <AD10> {[Arabic_hah, bracketleft, 0x100202c]};
So the key AD10 (which is the P key in a regular QWERTY keyboard) should give the character ه which is listed as U0647 (ARABIC LETTER HEH) under Unicode. The letter is being referred to as Arabic_hah
. Where do I find a listing of these names? If I were to simply use U0647 in its place, would it still be recognised in any file within the xkb
directory? In Urdu there is a letter choti he, ہ that looks similar to the Arabic heh, but has a different Unicode listing: U06C1 (ARABIC LETTER HEH GOAL). I do not know the name that is being used for choti he in Linux because I cannot find the Urdu keyboard layout anywhere in the /usr/share/X11/xkb/symbols
directory, even though the files for Dari (af
) and Arabic (ara
) are present.
Will it be sufficient if I were to simply use the Unicode values for all symbols that are supported by Linux in any file within the xkb
directory?