I edited the file /usr/share/X11/xkb/symbols/us
and added a definition with my new layout as follows
partial alphanumeric_keys modifier_keys
xkb_symbols "us_pl" {
include "us(basic)"
name[Group1]= "English (with Polish characters)";
key <AD06> { [ z, Z, zabovedot, Zabovedot ] };
};
I commented the line 27 (for xkb_symbols "basic")
// key <AD06> { [ y, Y ] };
Then I compiled the changed layouts
$ xkbcomp -xkm -m basic us
$ xkbcomp -xkm -m us_pl us
I set the new layout
$ setxkbmap 'us(us_pl)'
$ setxkbmap -query
rules: evdev
model: pc105
layout: us(us_pl)
Now, I'd like to test my newly defined character but nothing changed. Where am I doing a fault?
Note, that I'd like to change more characters later, so I'd like this example to work.
OS: Ubuntu 12.04
Best Answer
After searching I have found this similar question, which solves part of my problem. There is still the problem with Alt-gr key, which is not working.
I will let this answer here for a while, for others to see the solution and then I will delete it as duplicate.