[PATCH 0/4] LockMods can lock another group on key release #865

Andreas Wettstein wettstein509 at solnet.ch
Sat Nov 10 08:08:10 PST 2012

The following patches attempt to resolve ticket #865.  The request is
(in my formulation) that at a key press, modifiers should be set, and at
the release of the key, if no other key was pressed in the meantime, a
group lock should occur.  Currently modifier and group actions are
distinct and, therefore, mutually exclusive.  Without a change to XKB,
the request can not be fulfilled.

The solution that I suggest is to make 'LockMods' (which can replace a
'SetMods', but is more general) more powerful, so that it can do what
'LockGroup' does besides its traditional job.  I use the two unused
bytes it the modifier action data structure, which is sufficient to
carry the additional information.

This is a backwards compatible extension of XKB.  I have no clue what is
the policy regarding extending XKB, or whether and where such extensions
should be documented.  Anyway, I believe it is fairly simple and
straightforward.  The disadvantage of my proposal is that besides the
change to the server, some follow-up changes to support and use the
extension are required.  The changes for support are included in the
patches that follow, the changes to use the extension have to go to

If you go to ticket #865, you will see that an alternative solution has
been proposed.  The advantage of that proposal is that it has been used
successfully for some time already, and that it requires no changes
besides a small one for the server.  The disadvantages are that it
violates the XKB specification, is not fully backward compatible, and
only works if the 'GroupLock' is on a higher shift level, and Level1 of
the same key contains the 'SetMods'.  The latter restriction is serious,
as some users want to achieve the GroupLock with Level1 (see comment
108).  Therefore, I prefer my solution.



More information about the xorg-devel mailing list