On 03.04.2010, at 00:20, Greg Ercolano wrote:
> Fl_Menu_::add() supports two ways to set a shortcut; one as an integer,
> the other as a "string", e.g. "^C"
>
> FLTK currently uses these characters to specify the shortcut's shift states:
>
>    # - Alt (FL_ALT)
>    + - Shift (FL_SHIFT)
>    ^ - Control (FL_CTRL)
>
> Looks like we need one other to specify "FL_COMMAND".
> I'd like to add this cause my app needs this.
>
> Not sure which character to use, but maybe '&' or '%' because they look like
> the 'cloverleaf' key on the mac..?
>
> Feedback welcome.

 From the FLTK 1.1 docs (Enumerations):

FL_META - One of the meta/Windows keys is down.
FL_COMMAND - An alias for FL_CTRL on WIN32 and X11, or FL_META on MacOS X.

So, would this need to be platform dependent? How would it show up under
Windows in the shown menu text? Maybe as "^" because it's an alias for
FL_CTRL?

What about FL_META? What key *is* FL_META, btw., on real keyboards?

 From FLTK 1.3, FL/Enumerations.H:

#ifdef __APPLE__
#  define FL_COMMAND    FL_META   ///< An alias for FL_CTRL on WIN32 and 
X11, or FL_META on MacOS X
#  define FL_CONTROL  FL_CTRL   ///< An alias for FL_META on WIN32 and 
X11, or FL_META on MacOS X
#else
#  define FL_COMMAND    FL_CTRL         ///< An alias for FL_CTRL on WIN32 and 
X11, or FL_META on MacOS X
#  define FL_CONTROL  FL_META   ///< An alias for FL_META on WIN32 and 
X11, or FL_META on MacOS X
#endif // __APPLE__

Sorry for potential wrapping. The latter (FL_CONTROL = "An alias for 
FL_META on WIN32 and X11, or FL_META on MacOS X" is obviously wrong, 
this should probably read "An alias for FL_META on WIN32 and X11, or 
*FL_CTRL* on MacOS X". Should we fix this?

Having read all the other comments, I'm -1 on non-ASCII encodings,
and my suggestion would probably be '~', because it's similar to
"^" (FL_CTRL) on WIN32/X11.

Albrecht
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to