[comp.windows.x] ctrlLock, metaLock ?

mansfiel@scrsu1.sdr.slb.COM (Niall Mansfield) (02/17/89)

It is conventional to provide a capsLock or shiftLock key on keyboards.

It would be useful (for diabled people, and others who need to work
one-handed) to have metaLock and ctrlLock.  How would you do this in X -- I
can't see any 'lock'-style specifications available in xmodmap or wherever?

			mansfiel%scrsu1%sdr.slb.com@relay.cs.net
			mansfiel%scr@sdr.slb.com

rws@EXPO.LCS.MIT.EDU (Bob Scheifler) (02/17/89)

There is a "simple" way to do this, but it requires help from the
server.  The reason CapsLock and ShiftLock are distinct keysyms is
that they have different semantics.  It's expected that only one
of them is actually attached to the Lock modifier.  The Lock modifier
is different than the Shift modifier because the semantics of the
two can be different.  However, a MetaLock would (I infer) have the same
semantics as Meta, and a ControlLock would (I infer) have the same
semantics as Control.  Thus, it isn't necessary to have distinct
modifier bits for these, nor is it even necessary to have distinct
keysyms for these.  All it requires is to have keys that actually
lock (or appear to lock, by emulating a lock with toggling).  Given
such a key, you could put a Meta or Control keysym on it, and map
it to the same modifier bit as a shifting Meta or Control, and clients
would be happy.

So, what it would require is some specification to the server that
particular keys should be treated as logical locking keys.  There
is no support for this in the core protocol, but it would be pretty
straightforward to add it to some particular server implementation,
say controlled with command line options.

meo@stiatl.UUCP (Miles O'Neal) (02/18/89)

In article <8902171035.AA13382@ATHENA.MIT.EDU> mansfiel@scrsu1.sdr.slb.COM (Niall Mansfield) writes:
>It would be useful (for diabled people, and others who need to work
>one-handed) to have metaLock and ctrlLock.  How would you do this in X -- I
>can't see any 'lock'-style specifications available in xmodmap or wherever?

To do similar latching of command buttons, we wrote a procedure that
keeps track of the state; once the key is pressed, it is set ON until
pressed again (via a state variable). You would probably want to give
some visual feedback, like a [Ctrl LOCK] label appearing on the screen
when the key is "locked".

-Miles