Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question
1  
Wow, J is 2 rows above K. Good luck with that. :) –  intuited Apr 5 '11 at 5:07
add comment

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.

share|improve this answer
    
But on Colemak setting that option doesn't help--the caps lock key still acts like a backspace. –  Jon Mar 23 '11 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ük Mar 23 '11 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. –  Jon Mar 23 '11 at 14:00
1  
I have finally found it on Ubuntu 11.10 on Preferences > Keyboard > Format COnfiguration > Options.look my screen t.co/0F9tiNHv –  papachan Dec 20 '11 at 23:47
add comment

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.

share|improve this answer
    
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. –  vemv Mar 29 '13 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) –  vemv Mar 29 '13 at 22:18
add comment

Your Answer

 
discard

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.