Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using Compiz, but not sure if that's the problem or not.

My alt keys are working fine, but I'm trying to do something particular with the Alt-Gr key for a custom Russian keyboard layout.

Glad to provide specific information on request.

Any help would be greatly appreciated.

Steps already taken:

  1. I've gone into Keyboard Layout Settings --> Options, and made sure the correct Compose key option is set (at Right Alt).
  2. Chosen my custom keyboard layout (from the Keyboard Layouts section) and then brought up the onscreen keyboard which allows me to check which key is being pressed with onscreen feedback cue.

Doing this indicates that my Compose key is indeed the right alt, and it does flash when pressed. It also indicates that in my custom keyboard layout is correct on the key that I want: for the z key I have mapped 'З' (pronounced "ze") and for Alt-Gr + z I have mapped 'Ж' ('zhe'). This information shows up in the onscreen keyboard. However, trying this key combination produces no text on the first press, and on subsequent (joint / combo) presses, this produces only the non-altered 'З', same as I'm expecting from the non-combo z press only.

In summary, the Compose key is mapped correctly, and the character I want is mapped correctly (all 4 options (2 letters each with upper and lower case) appear in the onscreen keyboard), but the combination does nothing (on first press) and then the non-altered thing subsequently.

This is what my \usr\share\X11\xkb\symbols\ru file looks like: [...] key <AB10> { [ U0417, U0437, U0416, U0436 ] };

According to the documentation I've seen, the first two entries should be produced by pressing the z key and shift + z respectively (I'm working in Dvorak, so that's the key just to the left of the right-shift key), and the last two should be produced with the Compose + z and shift + Compose + z respectively. But, as mentioned, the actual behaviour I'm getting with Alt-Gr is nothing and then the default z and shift+z behaviour only.

share|improve this question
up vote 0 down vote accepted

You have modified \usr\share\X11\xkb\symbols\ru to follow a Dvorak layout, and you have modifed the key <AB10> section within the name[Group1]= "Russian" section by adding 2 additional keys.

Extra keys that are defined in the keyboard layout file in this way are not Compose key sequences. These keys are 3rd/4th-level keys.

In order to reach Ж that you defined in key <AB10>, you need to use a 3rd level chooser rather than the compose key. The 4th-level key is reached with 3rd-level-chooser+Shift

In the Keyboard Layout Options dialog, open Key to choose 3rd level, and choose whatever key works best for you.

I modified my Russian keyboard with the changes you indicate, set menu as the 3rd level chooser and menu+key-to-left-of-right-shift now correctly inserts Ж.

I chose menu because I never use it otherwise, and because I prefer Right-Alt as the Compose key.

The main point here is that the same key can't serve as both the Compose key and the 3rd level chooser. The system won't complain, but the 3rd level setting will have no effect.

If you prefer Right-Alt as the 3rd level chooser, be sure to select something else for the Compose key. When trying out different combinations, sometimes I've had to logout out before they took effect.

(Btw, you seem to have the capital/small letters in the swapped positions, unless that is what you want.)

share|improve this answer
You have understood correctly. I made my own "Dvorak phonetic layout" option. This is the second time I've done this; the first was for a custom Hebrew phonetic Dvorak layout I designed and wanted to use. I'm attempting your suggestion now. Didn't work at first, but maybe need to deselect the right-alt as Compose key option also. will update. – Wylie Кулик Jul 11 '13 at 10:12
and you're right, I have the upper and lower case reversed. Mistake haven't bothered fixing until I get this other issue worked out. – Wylie Кулик Jul 11 '13 at 10:14
Yeah it worked only after I deselected 'Right-Alt' from under the Options --> Compose Key Position. THANKS!!! – Wylie Кулик Jul 11 '13 at 10:16
Hmm, I also used Right-Alt as the Compose key and it worked for me with that still set. Sometimes these settings can conflict in hard to diagnose ways, but I'm glad it works for you and thanks for the accept. – chaskes Jul 11 '13 at 16:31
Ok, once I saw your suggested edit about not using AtlGr for both, I realized I had not made that explicit. Thanks for pointing that out. I expanded on your edit a little bit and added an statement about what 3rd level keys are. – chaskes Jul 11 '13 at 17:43

I think this is what you're looking for:

Choose your current keyboard layout:

enter image description here

share|improve this answer
yeah sorry should've mentioned that i'd done that already. will update original question. – Wylie Кулик Jul 9 '13 at 15:27
@JoshuaCullick Please include all the things you've tried in your question. It's always sad to see answers coming in with approaches the asker already tried. Thanks. – gertvdijk Jul 9 '13 at 16:01
thanks. yeah i think the edit got it all. As mentioned, the key is registered correctly as "Compose" key and works by itself. But the combination does not work as advertised. I'll add this line: This is what my ru file looks like: [...] key <AB10> { [ U0417, U0437, U0416, U0436 ] }; – Wylie Кулик Jul 9 '13 at 19:24

Your Answer


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.