DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR Pending]

Link: http://www.fltk.org/str.php?L1760
Version: 1.3.0
Fix Version: 1.3.0 (r7816)


As Matt wrote, Alt can't be used on Mac OS as menu shortcuts 
because alt-key produces non ascii characters that vary with
keyboard layouts. Also, it's not satisfactory to display
menus with underscored letters if these letters aren't shortcuts. 

The Command key can be used as shortcut with this change:
#ifdef __APPLE__
  if (require_alt && Fl::event_state(FL_META)==0) return 0;
#else
  if (require_alt && Fl::event_state(FL_ALT)==0) return 0;
#endif
at line 345 of fl_shortcut.cxx
(Using Fl_CTRL instead of FL_META does not produce shortcutable menus).

I wonder whether the best solution would not be to forget about
shortcuts for opening menus on Mac OS, because this is not a behavior
found in Mac applications. This requires to put this:

#ifndef __APPLE__ // don't show shortcuts for Mac OS menu titles
      if (underline_at && underline_at >= buf && underline_at < (buf +
buflen))
        callthis("_",1,xpos+int(fl_width(buf,underline_at-buf)),ypos-desc);
#endif
around line 315 of fl_drwa.cxx


Link: http://www.fltk.org/str.php?L1760
Version: 1.3.0
Fix Version: 1.3.0 (r7816)

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

Reply via email to