[comp.windows.open-look] K/B modifier to act as Lock key ?

devil@techunix.BITNET (Gil Tene) (02/20/91)

Hello XFolk !

I am trying to figure out how to make a modifier key
act as a switch key (ala Caps Lock), and not as a shift key
(ala shift).

I just found out about the Mode_switch Keysym in R4, it is GREAT!
It let's me map an alternate keyboard very easily, and doesn't
really affect the "main" keyboard mapping. There is only one
thing wrong: it seems I can only use it as a "shift-like"
modifier, and not "caps-lock-like" : e.g. : I can't seem
to find a way to cause the key mapped to Mode_switch to
act as a switch (on/off), instead of a hold-it-down-to-use
key.

Experimenting under OpenWindows 2, I found that I must
map Mode_switch as modifier mod3, otherwise it won't work.
I also found that num-lock must be mapped as mod4. When
I switch the Num_Lock and Mode_switch modifier settings
(mod3 = Num_Lock, mod4 = Mode_switch) The Num_Lock key acts
as a Mode_switch key (just what I wanted, a switch mode
Mode_switch key), and the Mode_switch key (Alt Graph on the KB)
acts like a Num_Lock, only it doesn't lock, and must be
used as a shift key.

What I want to do is define Mode_switch to act as a lock key,
without hurting my Num_lock definitions. Does anyone out there
know how to do this ?

AdvThanks,

-- Gil.
--
--------------------------------------------------------------------
| Gil Tene                      "Some days it just doesn't pay     |
| devil@techunix.technion.ac.il   to go to sleep in the morning."  |
--------------------------------------------------------------------