Subject: FVWM: Caps Lock as modifier

From: Jay Dobies <[email-masked]>
Date: Mon, 29 Nov 2004 08:04:24 -0500

I've been using FVWM for about 3 months now, and have grown quite
accustomed to my keyboard shortcuts. In particular, I use the Windows
Key for a ton of different things; I don't like to tie up Ctrl or Alt
because they are used a lot by other programs I use (for instance
IntelliJ). But I wanted to use a more standard key than Windows, in
case I'm on a laptop and don't have one available. I don't use the
Caps Lock for it's actual purpose, so I wanted to disable it as far as
capital letters is concerned and instead use it as a modifier. I think
I have used it as a modifier before (I'd have to dig through backup
copies of .fvwm2rc), but how can I disable it such that it won't make
my letters capital?

Thanks, 

Jason Dobies 
Technical Lead 
Gestalt LLC
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Dan Espen <[email-masked]>
Date: Mon, 29 Nov 2004 08:16:06 -0500

> copies of .fvwm2rc), but how can I disable it such that it won't make

Give this to xmodmap:

remove Lock = Caps_Lock
keysym Caps_Lock = Control_L
add Control = Control_L

-- 
Dan Espen                           E-mail: [email-masked]

---

From: Roeland Moors <[email-masked]>
Date: Mon, 29 Nov 2004 14:25:34 +0100

> copies of .fvwm2rc), but how can I disable it such that it won't make

Place this line in your XF86Config file where you define you
keyboard:

Option      "XkbOptions"    "ctrl:nocaps"

--
Roeland

---

From: Louis LeBlanc <[email-masked]>
Date: Mon, 29 Nov 2004 08:24:18 -0500

> copies of .fvwm2rc), but how can I disable it such that it won't make

I think that needs to happen in the X config.  I'm using X.org on one
machine and XFree86 on another, and I am using the following line in
my keyboard sections for both:

HTH
Lou
-- 
Louis LeBlanc               [email-masked]
Fully Funded Hobbyist, KeySlapper Extrordinaire :)
http://www.keyslapper.org                     Ô¿Ô¬

Time is an illusion, lunchtime doubly so.
    -- The Hitchhiker's Guide to the Galaxy
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Louis LeBlanc <[email-masked]>
Date: Mon, 29 Nov 2004 08:28:47 -0500

>         Option "XkbOptions"     "ctrl:nocaps"

Of course, you want to keep in mind that this (and the other
suggestions given in this thread) won't actually disable that key, it
will just convert it to another control key.

The X docs and xmodmap docs should contain details on giving it a
different function.

Lou

Parts that positively cannot be assembled in improper order will be.

---

From: Jason Dobies <[email-masked]>
Date: 29 Nov 2004 08:37:52 -0500

>         Option "XkbOptions"     "ctrl:nocaps"

That got the caps lock to no longer output caps, but now it appears to
function the same as the Ctrl key. Is there something I need to add to
xmodmap? 

Thanks

---

From: Louis LeBlanc <[email-masked]>
Date: Mon, 29 Nov 2004 09:12:49 -0500

> function the same as the Ctrl key. Is there something I need to add to

The xmodmap manpage has the following for swapping the left control
and capslock:

            !
            ! Swap Caps_Lock and Control_L
            !
            remove Lock = Caps_Lock
            remove Control = Control_L
            keysym Control_L = Caps_Lock
            keysym Caps_Lock = Control_L
            add Lock = Caps_Lock
            add Control = Control_L

I'm *guessing* that if you use just the first command, you'll either
get a plain shift key or a disabled key.

On the other hand, there is another entry in the manpage for the
'clear' command:

  clear MODIFIERNAME
    This removes all entries in the modifier map for the given mod-
    ifier,  where valid name are: Shift, Lock, Control, Mod1, Mod2,
    Mod3, Mod4, and Mod5 (case does not matter in  modifier names,
    although  it  does  matter  for all other names).  For example,
    ``clear Lock'' will remove all any keys that were bound to  the
    shift lock modifier.

It looks like this is a little more definitive, so feeding the
following into xmodmap should turn the key off altogether:

     clear Lock

Can't hurt too much to experiment for the right affect.

Lou

Mitchell's Law of Committees:
  Any simple problem can be made insoluble if enough meetings are
  held to discuss it.
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Jason Dobies <[email-masked]>
Date: 29 Nov 2004 10:23:20 -0500

I think I got it working. I ran

clear Lock
add Mod5 = Caps_Lock

through xmodmap and then reconfigured my key bindings in fvwm to use 5
instead of L.

I'll keep the thread posted if this doesn't work for some reason, and
please let me know if this seems bad for some reason.

Thanks to everyone for replying!

- J