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?
Update
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.
Clarification
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.
I'll tell you what eventually worked best for me.
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.
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.
You should be able to run the following to reselect your keyboard.
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:
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?
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:
http://ubuntuforums.org/showthread.php?t=1654199&highlight=.Xmodmap
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!
I'm just wondering what happens if you modify or create a ~/.dmrc as in:
And then run:
Source: Permanently change keyboard layout
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
toon
. If it's already set toon
, or if setting it toon
doesn't help, post a comment and I'll continue looking into it for you.I found a How-To that confirms that
dpkg-reconfigure keyboard-configuration
should work.So it writes to
/etc/default/keyboard
and it's supposed to setupX
and console considering that both read that file. You have to restartHAL
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 runningdpkg-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, thendpkg-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 whatlightdm
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.I had this problem / here was my solution.
then test Right Alt + backtick -> Shift + E = È & Right Alt + Shift + i = Í
also if this does not work remove and or reinstall xkb-data