Comments on: Switching Caps Lock and Backspace Linux. GNU. Freedom. Sun, 17 Sep 2017 02:25:05 +0000 hourly 1 By: Nick Stolwijk Wed, 02 Jan 2008 08:14:22 +0000 To auto enable/disable the repeat have a look at

By: Philip Hofstetter Thu, 08 Mar 2007 14:10:20 +0000 Hi Aaron,

I WAS paying attention and I was fully aware how nice your hack works. I just wanted to give some trivia of how my particular keyboard layout works.


By: Aaron Thu, 08 Mar 2007 13:41:05 +0000 Phillip- You're not paying attention. I am aware of the accented characters in different languages. Pressing the double-shift would have the EXACT behavior that the caps lock does now. Nothing would change.

By: Philip Hofstetter Thu, 08 Mar 2007 12:45:42 +0000 Hi,

about Caps Lock being usless: With the swiss german keyboard layout, capslock doesn't at all work like it would if you pressed and hold shift:

Caps Lock only affects normal letters that actually have a uppercased form.

So if Caps Lock is enabled and you press the a-Key, it'll convert it to A. But if you press the 5-key, it'll do nothing. This is different from any other keyboard layout I know where it would be converted to Shift-5 (% here).

This is interesting, because we have some accented characters available on shifted keys.

Let's take the ö-Key:

unshifted, no caps lock: ö
shifted, no caps lock: é
unshifted, caps lock: Ö
shifted, caps lock: É

Pressing shift when caps lock is enabled will revert the uppercasing again.

So caps lock is - with the swiss layout - actually doing what its name implies: It locks your keyboard so it only creates capitalized letters.

Actually, to write Ö, we only have two options:

1) Caps lock on and the ö-key
2) Hit the dead-key ¨ and then Shift-O

I prefer the Caps lock way as it means one fewer key press.

Granted. Not that many nouns (remember, in german you capitalize nouns) begin with a ö, so it doesn't happen all that often, but still, I prefer Caps Lock to be where it is.

Still, you provide us with a nice trick. I just wanted to add some trivia 🙂


By: phoenyx Wed, 07 Mar 2007 18:35:06 +0000 Here's how I changed mine:

xmodmap -pke > ~/.xmodmaprc

Edit the .xmodmaprc file to taste. (It automatically uses it when you start up.)

By: Bill Wed, 07 Mar 2007 16:43:40 +0000 But it makes the little light go on and off.

Look at the pretty light.

By: Aaron Wed, 07 Mar 2007 13:42:29 +0000 Ralesk- The point, as you pointed out, is to move the caps lock away from the user, and put in it's place a much more used key, in my case, the backspace.

Miles- I'm not removing it, but moving it. The caps lock still exists on my system.

Can Bican- Good idea! Placing the caps lock as a meta key under/above the scroll lock is a perfect idea.

Garren- If you have put the switch in your ~/.xmodmap file, it will take effect at startup. Setting the repeat is the only thing that you need to do manually. However, you can have a script launch that at startup as well.

Brian- The code for the escape key is 0x09. Now that I think about it, putting the escape key is where the Windows key is is a great idea, just because of vim.

By: Brian Wed, 07 Mar 2007 08:27:09 +0000 Does anybody know the code for the escape key? Would be a lot quicker when using Vi..

By: Dan Wed, 07 Mar 2007 07:33:55 +0000 I tried to do this, but realized that I am uneducated and stubborn.

By: Garren Wed, 07 Mar 2007 06:03:50 +0000 I was wondering how to have it stay like this at startup

By: Garren Wed, 07 Mar 2007 06:03:08 +0000 I was wondering how I get it to stay like this at startup

By: Can Bican Wed, 07 Mar 2007 00:32:24 +0000 The keyboard is full of stuff nobody ever used, layout is inconvenient for any language on earth, so if caps lock is the last problem yet to be solved, let's solve it but not lose it. How about giving the function of caps lock to scroll lock? 😉

By: Miles Tue, 06 Mar 2007 23:02:23 +0000 But, I need Caps Lock on Linux. Not on Windows, but I need it on Linux. Without it, I wouldn't even be able to type caracters such as Ç or É.

By: Chris Humphries Tue, 06 Mar 2007 20:40:12 +0000 But my control key is there! 😉

By: Rick Tue, 06 Mar 2007 18:44:53 +0000 I love this tip. Using caps lock for control has been so nice on the hands and I try to get as many shortcuts to a control combo as I can. Ctrl-q for yakuake, ctrl-space for gnome-launch-box. Good stuff. One tip, in gnome in ubuntu you can make this change by going to System->keyboard->Layout Options->Ctrl Key Position. It gives you several options on just what you want to do with it.

By: Ralesk Tue, 06 Mar 2007 18:28:05 +0000 Interesting choice!

I’m not a fan of wasting time with unlearning and then re-learning so many reflexes, which you have to revert the very moment you have to sit at a computer that’s not yours — hence why I still use a QWERTY layout (although yes, under AltGr I can reach anything I need, including Hungarian characters); but as I don’t use Caps Lock either, and I got severely annoyed by its presence a couple times before, I too changed it to something more fun: it’s become my Compose key. Works like a charm 🙂