Ubuntu Geek

Ubuntu Linux Tips,Howtos&Tutorials|Edgy,Feisty,Gutsy,Hardy,Intrepid

  • RSS Feed

    subscribe to the ubuntu Geek RSS feed


  • Sponsor



  • Categories

  • Meta

  • Sponsor

  • Archives

  • Support Ubuntugeek

    Amount $:
    Website(Optional):


  • Favourite Sites

Disable and Enable Caps Lock in Ubuntu

Posted by admin on January 27th, 2007 Email This Post Email This Post

Solution 1

If you want to disable Caps Lock in Ubuntu you need to type the following command in your terminal

xmodmap -e “clear Lock”

If you want to Enable Caps Lock in Ubuntu you need to type the following command in your terminal

xmodmap -e “add Lock = Caps_Lock”

Solution 2

1) create an appropriate xmodmap-file

xmodmap -pke > ~/.xmodmap.myown

2) Search the line with capslock in it, it’s keycode 66 in my case. Replace it with something you wouls like, my line looks like this

keycode 66 = slash backslash

so You need to slash and backslash on your capslock.

3) make two entries for the xmodmap in autostart

xmodmap -e “clear Lock”
xmodmap ~/.xmodmap.myown

with the first command, the capslock function is disabled, with the second the modified keymap is loaded.

Share/Save/Bookmark

If you want to be notified the next time we write something please subscribe to our RSS feed.Thanks for Visiting!

Related Articles

6 Responses to “Disable and Enable Caps Lock in Ubuntu”

  1. Peter Gasston Says:

    Pardon me for asking, but what possible reason could you have for wanting to disable caps lock???

  2. sb Says:

    Hey Admin, why not just use the Keyboard control panel? Layout Options -> Ctrl Key Position. Trivial.

    Peter Gasston: Because control is much easier to chord if you move it somewhere where you don’t have to crane your pinky so bad. As it is, the default control position plus emacs is almost a guaranteed recipe for carpal tunnel.

  3. AR Says:

    This is very usefull tip. Caps Lock is very annoying button.
    It can also be written without another file:

    xmodmap -e “clear Lock”
    xmodmap -e “keycode 66 = Tab”

    (now caps_lock is tabulator too)

  4. Bannog Says:

    In a word: Warcraft. But for the times that I’ve failed to attack something then typed:

    “sORRY PEOPLE MY KEYBOARD ISN’T COOPERATING.”

    AR’s post should eliminate that problem… Will see tonight if ‘t works.

  5. Nero Says:

    Jef Raskin in The Humane Interface perfectly stated why the caps lock key should be disabled; it serves almost no function. Few people use it except by accident. Typing in upper-case is generally a temporary mode you want to be in, accomplished by using the shift key. Hitting the caps lock key is almost always a distraction and a loss of productivity. The best purpose the caps lock key can serve is to be mapped to a completely different function.

    One time I thought I had found a use for Caps Lock. Typing an XML file, every character needed to be in uppercase according to our specification, but even that wasn’t good. when I needed to write documentation or switch to other applications like email, I’d always forget that Caps Lock was on. In the end, it was easier to just run my files through a tool that converted to uppercase and forget about Caps Lock forever.

  6. Ben Says:

    Thanks for the tip. This is great. I can’t tell you how annoying a find caps lock and insert. The insert key is particularly egregious because I use a small form factor keyboard, and my sausage fingers like to meander down and “press” insert while I am holding shift sometimes.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>