You are not logged in.

#1 2008-08-02 17:52:13

kandrews
Member
Registered: 2007-04-21
Posts: 119

How do I bind Caps_Lock to Shift+Caps_Lock in xmodmap?

Hi,

I've scoured the internet for how to do this for awhile with no success. It was easy to get this working in keymaps for the console, but I can't get it working for X. It looks like I should be able to add the Caps_Lock as the second argument in Xmodmap as

keycode 55 = Escape Caps_Lock

, but this doesn't work. If anyone has done this, please help.

Thanks.

Offline

#2 2008-08-03 05:24:43

pauldonnelly
Member
Registered: 2006-06-19
Posts: 776

Re: How do I bind Caps_Lock to Shift+Caps_Lock in xmodmap?

Probably you have to "add Lock = Caps_Lock" afterwards or something, but I think X will then toggle caps lock whenever that key is pressed, with or without shift. Why not put caps lock on the escape key?

Offline

#3 2008-08-03 06:35:50

kandrews
Member
Registered: 2007-04-21
Posts: 119

Re: How do I bind Caps_Lock to Shift+Caps_Lock in xmodmap?

Why not put caps lock on the escape key?

Mainly because I keep hitting escape anyway. Secondarily, I find Shift+Caps_Lock very intuitive in and of itself. It was really easy to do what I wanted in console, so I am hoping there is any way here.

Offline

#4 2008-08-03 19:04:39

pauldonnelly
Member
Registered: 2006-06-19
Posts: 776

Re: How do I bind Caps_Lock to Shift+Caps_Lock in xmodmap?

kandrews wrote:

Why not put caps lock on the escape key?

Mainly because I keep hitting escape anyway. Secondarily, I find Shift+Caps_Lock very intuitive in and of itself. It was really easy to do what I wanted in console, so I am hoping there is any way here.

Well, I hope I'm wrong, since your idea does sound good, but I think you may have to settle for a swap.* It's pretty easy to get used to, really. I juggled my caps lock, backspace, right control, and compose key around yesterday and I'm getting the hang of it fine.

* As I understand it, something like "keycode 22 = Caps_Lock" means that key 22 now types a Caps_Lock symbol, just like key 55 might type the symbol V. While Caps_Lock doesn't produce a letter, a program like Emacs could still detect this keypress and respond to it. But if you want the Caps_Lock key to have its normal effect, you also have to "add Lock = Caps_Lock" to it. Unfortunately, for reasons I can't imagine, X seems to apply the Lock behavior to any press of the key, regardless of which modifiers are being held down or symbol is actually being produced. I could be wrong, but this is what my experiments seem to show. If you figure out how to make it work, I'd be interested in knowing.

Offline

#5 2008-08-03 20:04:25

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: How do I bind Caps_Lock to Shift+Caps_Lock in xmodmap?

Why not disable Caps lock altogether? Why do you need it at all?

I can't think of a single use for it to be honest. I've had it disabled for years, never missed it. Plus holding the shift key TO WRITE IN ALL CAPS IS PRETTY EASY.

Offline

#6 2008-08-03 20:12:48

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: How do I bind Caps_Lock to Shift+Caps_Lock in xmodmap?

I keep Backspace at Caps Lock, makes correcting typos faster.

Offline

Board footer

Powered by FluxBB