So one of the things that really made text editing with vim easier for me is switching the caps lock and escape keys, which it turns out I can do in the GUI keyboard settings. But now when I'm using the Colemak keyboard layout, the caps lock key is mapped to a backspace, whereas I want it mapped to either caps lock or escape. Is there an easy way to change this?
2 Answers
You can force Caps Lock to be Esc on any layout:
In System ▸ Preferences ▸ Keyboard ▸ Layouts ▸ Options, set CapsLock key behavior to Make CapsLock an additional ESC.
-
1But on Colemak setting that option doesn't help--the caps lock key still acts like a backspace.– JonathanMar 23, 2011 at 3:50
-
@Jon It worked for me in 10.10. What release are you using, and do you have any other non-default keyboard options enabled?– ændrükMar 23, 2011 at 5:12
-
11.04. Tried it with all-default options and had the same issue. Maybe I'll try filing a bug and see if it gets fixed before the release.– JonathanMar 23, 2011 at 14:00
-
1I have finally found it on Ubuntu 11.10 on Preferences > Keyboard > Format COnfiguration > Options.look my screen t.co/0F9tiNHv– PapachanDec 20, 2011 at 23:47
A little late, but I struggled for a while to figure out how to fix this to my liking, and I wanted to share my solution.
I commented out the line that remaps the Caps Lock key in /usr/share/X11/xkb/symbols/us
, which is the keyboard mapping for the US layout. I have uploaded the resulting file here.
-
As a UK Colemak layout user, I've tried this but it works temporarily only, unfortunately. I can get it to work by switching to US Colemak and then to UK Colemak again (as the latter inherits most mappings from the former), but the effect won't persist across sessions. Mar 29, 2013 at 21:32
-
Performing
cd /usr/share/X11/xkb/symbols; setxkbmap ./gb -variant colemak
on startup fixed it. Strangely,setxkbmap
fails if one passes an absolute path to it. Also, one must re-run the command every time a new keyboard is connected (e.g. when a wireless keyboard powers up) Mar 29, 2013 at 22:18