On 06.04.2010, at 02:45, Greg Ercolano wrote:

> Greg Ercolano wrote:
>>      regarding FL_COMMAND and FL_CONTROL being Apple keyboard-centric naming
>>      should probably be highlighted in the docs, as to the casual glance of 
>> an app programmer,
>>      one might not easily catch FL_CTRL and FL_CONTROL are two entirely 
>> different things
> 
>> #  define FL_COMMAND  FL_META   ///< Apple-centric keyboard name, aka. 
>> "Apple" or "Cloverleaf" key: an alias for FL_CTRL on WIN32 and X11, or 
>> FL_META on MacOS X
>> #  define FL_CONTROL  FL_CTRL   ///< Apple-centric keyboard name, an alias 
>> for FL_META on WIN32 and X11, or FL_CTRL on MacOS X
> 
>       Just thinking aloud: I wonder if it wouldn't be 'self documenting'
>       to name these macros:
> 
>               FL_APPLE_COMMAND
>               FL_APPLE_CONTROL
> 
>       ..which would make it clearer these are apple-centric keyboard names,
>       and thereby deprecate the old names?

This is not neccesarily Apple centric. The original code contained only 
FL_COMMAND and was supposed to provide a shortcut for whatever is commonly used 
as a shortcut key modifier on a give platform (which modifier do you use to 
copy selected text?). On MSWindows and Unix this is usually the Ctrl key. On 
Mac, it is the Meta key. FL_CONTROL was added later to give the inverse of 
FL_COMMAND.

So unless you have a very technical application that must use FL_CTRL for some 
reason, FL_CTRL is always wrong. In 99% of all cases, FL_(modifier) is used to 
define menu shortcuts, and FL_COMMAND should be used to stay cross platform 
compatible. I am happy to rename FL_CONTROL into something doesnt get confused 
with FL_CTRL.
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to