On Sun, Apr 26, 2009 at 5:58 PM, Alex Holkner <[email protected]>wrote:
>
> Well, one reason is that semantically they do different things.  For
> example, Alt is used in Windows for using the keyboard to focus
> between widgets, whereas Option on Mac is used as a modifier in
> conjunction with Command.  Similarly, the Windows key is reserved for
> the operating system on Windows, but the Command key on Mac is used by
> both applications and the OS.


Fair enough as far as mimicking desktop software, but do games really care
about these distinctions? In particular, almost all 3D tools allow you to
modify mouse strokes by holding down the alt key, which requires some thing
like this:

ALT = (MOD_OPTION if sys.platform == 'darwin' else MOD_ALT)

and I have no idea (until I test it) whether that will work for linux as
well.

Also, by the same logic, should we differentiate between Control on Windows,
and Control on Mac? The first performs key commands, and the second is used
to emulate a 2-button mouse.

Note also the existence of MOD_ACCEL, which is Ctrl on Windows and
> Command on Mac, for smoothing the differences between the platforms.
>

Hadn't seen that one - very handy, and it halfway solves the previous issue.
However, if we want to emulate a native GUI, we still need a bunch of code
dependent on the value of sys.platform.
It isn't clear to me that halfway dealing with the differences is any more
useful than ignoring them entirely - but others may well disagree with me on
that point.

-- 
Tristam MacDonald
http://swiftcoder.wordpress.com/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to