How do I edit keyboard preferences from the command line?

Posted by jumpnett on Ask Ubuntu See other posts from Ask Ubuntu or by jumpnett
Published on 2012-06-29T00:01:57Z Indexed on 2012/06/29 3:23 UTC
Read the original article Hit count: 182

Filed under:

I want to swap the Caps Lock and Escape key as specified in this answer:

Use the keyboard preferences to swap Caps Lock and Escape - seriously, how often do you use Caps Lock? Using vim you will be using Escape all the time, and having it available on the home row makes a huge difference. With the standard Ubuntu desktop, go through the menus: System -> Preferences -> Keyboard -> Layouts tab. Then hit the "Layout Options" button, click on the triangle next to "Caps Lock key behaviour" and select "Swap ESC and CapsLock".

but, I'm using Ubuntu Server with no gui, so how would I do this from the command line?

© Ask Ubuntu or respective owner

Related posts about keyboard-layout