Re: Exclude MOD1 from the virtual modifier mapping



On Tue, Oct 25, 2011 at 9:46 AM, Michael Natterer <mitch gimp org> wrote:
> Hi all,
>
> as a fallout of the recent cross-platform modifier
> key fixes that make Quartz work, it seems I broke
> modifiers on X11.
>
> The problem is that by enabling virtual modifiers
> (META, SUPER, HYPER) in GtkCellRendererAccel, they
> are now actually used :) which means that on a default
> PC keyboard keymap on X11, which maps MOD1 to META,
> entering Alt+foo now results in Alt+Meta+foo.
>
> Now almost all of GTK+ treats MOD1 as ALT, they
> are actually synonyms. I propose to simply go through
> with this "definition", and exclude MOD1 from any
> mapping, such as SHIFT and CONTROL aren't mappable
> to virtual either. This would nail down the MOD1 == ALT
> mapping that is so far only done by *alnmost* all
> the code in GTK+, which is inconsistent.
>
> See attached patch, please comment.

Just to clarify, what we loose with this patch is the ability to have
an Alt+x key combination match an accelerator of <Meta>+x, in the
common case where Meta is colocated with Alt on mod1. I don't think
this is a huge loss; I don't think there's a lot of accelerators
involving Meta, Super or Hyper out in the wild - if only because GTK+
didn't use to include these in its accelerator mask until a few years
ago.

So, I am tentatively in favor of this change. We might even consider
introducing a GDK_ALT_MASK to clarify the status of Alt.

Another thing that needs cleanup is the duplication between
gdk_keymap_add_virtual_mods and _gdk_keymap_add_virt_mods.


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