[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[RP] [PATCH] do not distinguish modifiers X11 does not dinstinguish

From: Bernhard R. Link
Subject: [RP] [PATCH] do not distinguish modifiers X11 does not dinstinguish
Date: Sat, 21 Apr 2007 15:16:53 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

When X does not distinguish two modifiers by binding them both to the
same core modifier. like for example:

mod1        Alt_L (0x40),  Alt_L (0x7d),  Meta_L (0x9c)
mod4        Super_L (0x7f),  Hyper_L (0x80)

ratpoison (starting somewhere between 1.4.0 and 1.4.1) wants all
modifiers specified instead of a single one.

In the example that means that s-a or H-a will never trigger, but only

For Meta and Alt ratpoison has the workaround to remove Alt when it
overlapps with Meta. Which has the disadvantage that A-whatever and
even the correct M-A-whatever will never work. But due to the lead
of emacs, most people will not even know there is Alt but think
the name for Alt was Meta, so this does not harm much.

While such a workaround could also be implemented for Super and Hyper,
it would be hard to choose one over the other.

The attached patch therefor fixes the problem another way:
When looking what to do with a specific key, it compares the X11
modifier mask instead of the ratpoison state.

Advantages: Every key matches on every description that is
indistinguishable in the eye of X. The Special case to throw out Alt
is not needed, as M-whatever means the same as M-A-whatever if both
Alt and Meta share the same modifer.

Disadvantages: Multiple key-binding can be for the same key, though
different descriptions, but only the first one will be served.
While this could be considered confusing, it also has something of
a feature, as what is the same key now, can be different later.
(Like two definekey in .ratpoisonrc that are indistinguishable when
they are executed, but different once the before started xkbcomp
or xmodmap finishes).

        Bernhard R. Link

Attachment: modifiers.diff
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]