keyboard-applet gets confused by layouts which swapped Ctrl and Caps Lock

Asked by Bogdan Butnaru on 2007-09-09

Binary package hint: gnome-control-center

Hello! I'm using Ubuntu Gutsy, up-to-date, and I noticed an unpleasant issue with the gnome-keyboard-preferences applet.

Said applet offers the very useful possibility of customizing the keyboard configuration through using its third tab, "Layout Options". One of the options I'm very fond of is to switch the Caps Lock and the Left Control keys. I find that it's much easier to type Ctrl-key combinations this way. I also use Dvorak and I touch type, and this helps relieve tension in my little finger.

Understandably, most people can't use the keyboard at all on my laptop due to my customizations. (A fact complicated a bit by the fact that the keyboard is actually a French model.) So I resorted at having two layouts selected, my own and the one printed on the keyboard. The problem is that the Layout Options (thus the caps/ctrl switch) apply to _all_ selected layouts, which confuses people. Since it's inconvenient to change the layout options every time (the layout is easy to switch from the panel applet), I created a custom layout (by cloning a file in /usr/share/X11/xkb/symbols and hacking the appropriate rules file) and I exchanged the CapsLock and Left Control keys directly there using these two lines:

    key <CAPS> { [ Control_L ] };
    key <LCTL> { [ Caps_Lock ] };

The problem is that when I select the new keyboard layout using the Keyboard Preferences applet the hack doesn't work. Interestingly enough, the layout preview _does_ show the swapped keys correctly. However, when I actually try to use it the two keys work "normally", i.e. CapsLock is CapsLock and Ctrl is Ctrl.

Any ideas what to look for next?

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu gnome-control-center Edit question
Assignee:
No assignee Edit question
Last query:
2007-09-09
Last reply:
2008-02-25
Bogdan Butnaru (bogdanb) said : #1

This is an example layout file (derived from the us layout) that shows the problem. To use it you must copy it in "/usr/share/X11/xkb/symbols". Note that you must add it in "/usr/share/X11/xkb/rules/base.[lst|xml]".

Sebastien Bacher (seb128) said : #2

Thank you for taking the time to report this issue and helping to make Ubuntu better. Examining the information you have given us, this does not appear to be a bug report and subsequently we are closing it and converting it to a question in the support tracker. We appreciate the difficulties you are facing, but it would make more sense to raise problems you are having in the support tracker at [WWW] https://answers.launchpad.net/ubuntu if you are uncertain if they are bugs. For help on reporting bugs, see [WWW] https://help.ubuntu.com/community/ReportingBugs .

Launchpad Janitor (janitor) said : #3

This question was expired because it remained in the 'Open' state without activity for the last 15 days.