Re: Alt and Command keys in the quartz backend



On Tue, 2011-09-06 at 06:37 -0700, John Ralls wrote:
> On Sep 6, 2011, at 1:27 AM, Michael Natterer wrote:
> 
> > Hi all,
> > 
> > Currently, the mapping of the Alt and Command keys on the mac
> > is completely screwed:
> > 
> > - The key labeled "Command" maps to GDK_MOD1_MASK (which is
> >  essentially interpreted as Alt by all existing code)
> > 
> > - The key labeled "Alt" isn't mapped to any modifier at all
> > 
> > Now there is a lot of discussion in these bug reports:
> > 
> > https://bugzilla.gnome.org/show_bug.cgi?id=607115
> > https://bugzilla.gnome.org/show_bug.cgi?id=605799
> > 
> > but at the bottom of all that is the above mentioned
> > problem. After it's fixed we can fix whatever keymap
> > issues in GTK on top.
> > 
> > It seems pretty obvious to me that the key labeled
> > "Alt" should produce GDK_MOD1_MASK because all existing
> > code considers that being the "Alt" key.
> > 
> > The only question is what to map "Command" to, and we
> > are free to choose whatever, since the behavior will
> > change away from the current one of producing GDK_MOD1_MASK
> > anyway.
> > 
> > I personally prefer GDK_META_MASK because it's what the
> > "Windows" key is mapped to on PC keyboards, but that's not
> > a strong reason (and it is, as saidm completely arbitrary
> > anyway).
> > 
> > Opinions? I volunteer to patch up all 3 branches once
> > we come to an agreement.
> 
> How long have you been using a Mac as your primary computer? On what mac-native programs that you use daily is the alt/OPTION key used as a stand-alone modifier for shortcuts with default settings (any preference changes you've made don't count)?

I don't see how this is relevant, but i bow to your experience.

> How does the code "know" what key produces the mod1 bit? Why would it care?

Code *knows* that MOD1 is Alt, and there is a key named "Alt"
on the keyboard. Therefore it must produce MOD1. There is nothing
to argue here.

There is no reason to not use that consistency across
3 platforms when we can get it for free.

--Mitch




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