Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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

share|improve this question
add comment

2 Answers

up vote 0 down vote accepted

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.

share|improve this answer
add comment

You don't need to remove the AD06 definition of the basic layout.

If you define some 3d level values for a given key, then you need to also define a way to trigger that 3d level. for example: setxkbmap 'us(us_pl)' -option 'lvl3:ralt_switch' (it will define the right alt key (often labelled "AltGr") as the key to switch to 3d level symbols.

You can also add a line: include "level3(ralt_switch)" to your "us_pl" definition. Or build it on "us(euro)" instead of "us(basic)"

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.