BLOGGER TEMPLATES AND TWITTER BACKGROUNDS

Monday, March 26, 2012

(UNIX) Keyboarding as God Intended - Ubuntu

For most users, Caps Lock is a redundant, rarely-used feature; for the rest, it should be.  It occupies, however, a piece of prime real estate on the keyboard: right next to the letter 'A'.  Meanwhile, the far more important Ctrl key, used every few minutes to accomplish tasks in less time, is in a decidedly more awkward position.  There are ways to fix it, though; this short stub will explain how to set up the keyboard in my favourite layout, which puts Ctrl where Caps Lock is, Alt where Ctrl is, and Caps Lock where Alt is.  This article supports most UNIXes and Linuxes, but for the last part which is Ubuntu-specific.

We will be creating what is known as a .xmodmaprc file.  To do this, open the terminal.  If you don't know how to do this, look it up on a search engine.  At the prompt, type vim ~/.xmodmaprc and press Enter.  The screen should change; if you don't have Vim installed, find out which editors are installed and use one of them.  Type i to activate insert mode; then type the following exactly as seen here. 

! UNIX-style keyboard
remove Lock = Caps_Lock
remove Control = Control_L
remove Mod1 = Alt_L
keysym Caps_Lock = Control_L
keysym Control_L = Alt_L
keysym Alt_L = Caps_Lock
add Lock = Caps_Lock
add Control = Control_L
add Mod1 = Alt_L


When finished, type [Esc]:wq (that is, the Escape key, followed by a colon, followed by w for write and q for quit).

What we now need to do is to make this run at start-up.  If you are running anything other than Ubuntu, you need to find this on an Internet search engine.  If you are running Ubuntu, type [Alt]+F2 (simultaneously) and enter gnome-session-properties into the box, typing [Enter] afterwards.  In the dialogue box that appears, click the Add button and then the box captioned Name.  Enter something memorable, such as UNIX-style key swap and type [Tab].  In the following box, type /usr/bin/xmodmap /home/[user]/.xmodmaprc, where [user] is your user name.  Exit both dialogue boxes and restart your machine for the settings to take effect.

No comments:

Post a Comment