I edited the file /usr/share/X11/xkb/symbols/us and added a definition with my new layout as followspartial alphanumeric_keys modifier_keysxkb_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 usI set the new layout$ setxkbmap 'us(us_pl)'$ setxkbmap -queryrules:      evdevmodel:      pc105layout:     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
Changing one character in keyboard layout
x11;keyboard layout;xkb
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.