Take the 2-minute tour ×

For a long time, I've had my keyboard configured to use the layout currently known as "English (international AltGr dead keys)." I like this layout because without any modifier keys, it's identical to the US English keyboard, but when I hold Right Alt I can get accented letters and other characters not available on a standard US English keyboard.

In Oneiric, however, the layout is messed up. Right Alt+N produces "ñ" as expected. And another method works: Right Alt+`, E produces "è", also as expected. But there's no way to type "é", which is probably the accented letter I type the most. I expect Right Alt+A, E to do the trick. But instead of a dead key for the acute accent, it uses a method for combining characters to create the hybrid "́e". This hybrid looks like the proper "é" in some settings, but it isn't the same character and doesn't always work. (For example, in the text input box as I type this, it looks the same as the proper character, but when displayed on the site for all so see, it looks very wrong--at least on my machine.) Ditto for all other characters with an acute accent, though some are available directly as pre-composed characters: For example, Right Alt+I yields "í".

How can I change the acute accent on the A key to a proper dead key? Perhaps the more general version of this is: How can I tweak my keyboard layout?


I just tested this on my other machine, also running Oneiric, but upgraded from previous versions. I have no problems with the second machine. The problem machine was a fresh install of Oneiric, but I kept my old $HOME when I did the fresh install.


Even if an answer doesn't address my specific examples, I would still accept it if it provided enough detail for me to find the layout and tweak it according to my needs.

Major Update

After working through the information gained through Jim C's and Chascon's helpful replies, I've learned something new: The problem isn't with the layout itself, but with the fact that the selected layout isn't being applied. When I look at the definition in /usr/share/X11/xkb/symbols/us of the layout I've been running for a long time, I found that the definition doesn't match what I get when I type. In addition, the keyboard layout dialog that's supposed to show the current layout looks different from the way the layout is defined in the file I mentioned, and matches what actually happens when I type.

Following Jim C's suggestion, I created a new layout in /usr/share/X11/xkb/symbols/us containing some modifications to the layout I want. I can select my layout from the keyboard properties, and I can use in on the console following Chascon's post, but the layout I get when typing is unchanged.

Apparently, there's a different layout defined somewhere that's overriding what I've set. Where is that layout hiding?

This problem occurs in Unity (3D and 2D), but I was able to get the correct layout set in Xfce.

In case it's relevant, this problem has occurred since I installed Oneiric fresh on this machine (though I preserved my $HOME). I don't recall whether this problem occurred before the reinstall.

Also, in case it's relevant, I also run iBus so I can type Korean. I have a few difficulties with iBus, but I doubt they're related.

share|improve this question
Have you tried the sequence Right-Alt + ' + e ? –  enzotib Dec 19 '11 at 6:46
Doesn't work. RightAlt + ' produces , not a dead key. –  Scott Severance Dec 19 '11 at 7:39
Did you ever find a solution ? –  bodhi.zazen Mar 18 '12 at 2:37
@bodhi.zazen: No. The problem still exists. –  Scott Severance Mar 18 '12 at 12:28
Added Int. Keyboard with dead keys and pressing Right-Alt+e results in the letter è: The same with Right-Alt+a => á –  konrad Apr 18 '12 at 11:26

7 Answers 7

up vote 2 down vote accepted

I'll tell you what eventually worked best for me.

  1. Open the gnome preference "keyboard layout" pane
  2. Move the layout order, if you have more than one
  3. Delete all layouts except the default one (mine was a US layout)

The previous two steps have been suggested as fixes on their own (on the Ubuntu forums?). They did not work for me. I tried them together consecutively and this again did not work for me. Thus my next step.

  1. Press, "Reset to Defaults"
  2. Layout changes effectuated from both the layout pane and indicator now result in a change in layout.
  3. Of course, add layouts back before attempting to change to them. Use the preview function to find a layout that easily produces the diacritical marks you seek.

I think my problem was from the fact that some of the layouts had changed in name, at least that's my take considering that the layout names weren't exactly what I expected when reassigning them. Deleting my extra layouts and then assigning new ones from a fresh list seems to have circumvented my issues, that being that the layouts of my choice now point to existing layouts with names to match.

share|improve this answer
At long last! Thanks a lot. This finally worked. –  Scott Severance Oct 28 '12 at 6:48

I am not certain this will help you, but when I asked this question of a German co-worker of mine (who also uses Ubuntu) he sent me this link:


As I am unfamiliar with keyboard layout definitions, I can't be certain it will work for you but I thought I'd send it along just in case.

Best of luck in solving this!

share|improve this answer
The bounty period has now ended. My problem hasn't been solved, but since this post solved my first question (which turned out to be irrelevant), I'm awarding the bounty. But, the problem remains unsolved. –  Scott Severance Apr 25 '12 at 11:02
Thanks, Scott, that was kind of you. I hope someone can help figure out what is overriding your keyboard layout choice. –  Jim C Apr 30 '12 at 17:20

You should be able to run the following to reselect your keyboard.

sudo dpkg-reconfigure keyboard-configuration

If it doesn't stick, you'll probably need to change /etc/default/keyboard. I think I have your keyboard and my pertinent file shows the following, running through an old IBM clone 104 keyboard.


So do that with gksudo gedit /etc/default/keyboard or however kids are editing files these days. Read pertinent info here for what to plug in.

I see sudo udevadm trigger --subsystem-match=input --action=change is suggested elsewhere herein.

If that doesn't work, your layout is probably corrupt or just wrong, and I can't be sure what would help but I would try reinstalling xkb-data, iso-codes.

Perhaps updating your locale since language and layouts are intertwined. See this but something like:

dpkg-reconfigure locales 
update-locale LANG=en_US.UTF-8

I guess I should mention that I've made good use of "English International AltGr dead keys" layout, if you're looking for dead keys. I don't know what the /etc/default/keyboard file would reflect for this one but googling would surely bring an answer, but first try adding it via the Keyboard Layout pane. Warning, there seems to be a limit of 4 before you can't add any more.

Other than that I'd point you towards xmodmap. It's capable of overriding layout defaults. Let me know if any, or which ones help.

What languages are you writing other than English? Spanish (because of the ñ)? and?

share|improve this answer
I've made a discovery which changes the game significantly. See my updated question above. –  Scott Severance Apr 20 '12 at 1:40

I'm just wondering what happens if you modify or create a ~/.dmrc as in:

Language=de_DE.UTF-8   # change to your default lang
Layout=de   nodeadkeys # change to your keyboard layout

And then run:


Source: Permanently change keyboard layout

share|improve this answer
I had a .dmrc already, and it turns out that it was set to the wrong layout. I corrected it and ran your udevadm command. No dice. I rebooted, and still it didn't work. –  Scott Severance Apr 24 '12 at 1:31

I had this problem / here was my solution.

1. remove the keyboard layout.
2. add the layout back
3. make sure 3rd layer is set to Right Alt

enter image description here

then test Right Alt + backtick -> Shift + E = È & Right Alt + Shift + i = Í

also if this does not work remove and or reinstall xkb-data

share|improve this answer
Thanks for your answer. However, it had no effect. –  Scott Severance Apr 19 '12 at 8:20

There's a bug in ibus that causes it to not use the system default layout by default.

Try setting ibus preferences->advanced->keyboard layout->use system keyboard layout to on. If it's already set to on, or if setting it to on doesn't help, post a comment and I'll continue looking into it for you.

share|improve this answer
Good suggestion, but that setting was already on and toggling it didn't help. –  Scott Severance Apr 24 '12 at 0:34
Just out of interest, does disabling ibus correct the issue? Just so we can isolate whether the problem has anything to do with ibus. –  Chris Browne Apr 25 '12 at 10:42
It has no effect. –  Scott Severance Apr 25 '12 at 10:59
What happens if you choose your layout using sudo dpkg-reconfigure keyboard-configuration? –  Chris Browne Apr 25 '12 at 11:51
I've done that already. It sets the correct layout on the console, but doesn't help from within Unity. –  Scott Severance Apr 25 '12 at 12:36

I found a How-To that confirms that dpkg-reconfigure keyboard-configuration should work.

writes the /etc/default/keyboard file, which is read by HAL and X, for the console and graphic setup. If you want to apply changes you must restart HAL.

So it writes to /etc/default/keyboard and it's supposed to setup X and console considering that both read that file. You have to restart HAL though, and I don't think that's been mentioned.

Assuming Ubuntu isn't veering away too far from Debian, if you notice that /etc/default/keyboard is being written to (reflects the layout you want after running dpkg-reconfigure keyboard-configuration), but there's no change in the layout implemented, then the problem is with the system not picking up on it. Obviously, if it's not being written to, then dpkg-reconfigure keyboard-configuration is at fault (at least in this instance). And if it gets written to but doesn't stick on reboots, then you need to ID the culprit or process that is awry.

Someone more familiar with the insides of Debian/Ubuntu should be able to ID the possible culprits from the above scenario.

I'd like to add that I've had a similar problem and selecting the layout from lightdm actually works. So another way to get at it is to find out what lightdm is writing to when selecting a layout.

Lastly, try restarting HAL after running dpkg-reconfigure keyboard-configuration. I've never done this manually but I imagine something such as the following might work.

/etc/init.d/hal restart
share|improve this answer
Actually, Ubuntu hasn't used hal for several versions. That role is filled by udev these days. Anyway, /etc/default/keyboard is correct on my system, thanks to a previous answer. My machine has been rebooted several times since then. Unfortunately, the problem persists. Thanks for your effort, though. –  Scott Severance May 8 '12 at 2:27

Your Answer


