FLTK logo

[fltk/fltk] Fl_Sys_Menu_Bar menu item shortcuts using Escape or Tab do not work properly on Mac (Issue #469)

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.issues  ]
 
Previous Message ]New Message | Reply ]Next Message ]

[fltk/fltk] Fl_Sys_Menu_Bar menu item shortcuts using Escape or Tab do not work properly on Mac (Issue #469) Daniel Harding Jul 18, 2022  
 

The Problem

Fl_Sys_Menu_Bar menu item shortcuts using Escape or Tab do not work properly on Mac.
The shortcuts display incorrectly in the menu and the keyboard shortcuts do not invoke the callback.
This works correctly in Windows and Linux.

"Escape" is displayed in the menu as a semicolon (;) and "Tab" is displayed as a closing parenthesis ()).
Note that neither Escape/Tab nor semicolon/parenthesis invoke the callback.

It's possible that this is just user-error on my part but that seems pretty unlikely.
I couldn't find any bug reports of a similar bug so I wanted to submit this and see if there is any known workaround.

Thanks!

Screenshots

Mac

mac1
mac2

Windows

windows1
windows2

Linux

linux1
linux2

The Code

For Escape:

OS_MENU_ITEM("&Stop", FL_Escape, (Fl_Callback *)stop_cb, this, FL_MENU_DIVIDER),

For Tab:

OS_MENU_ITEM("&Next Channel", FL_Tab, (Fl_Callback *)next_channel_cb, this, 0),
OS_MENU_ITEM("&Previous Channel", FL_SHIFT + FL_Tab, (Fl_Callback *)previous_channel_cb, this, 0),

where OS_MENU_ITEM is a convenience macro defined as:

#ifdef __APPLE__
#define OS_MENU_ITEM_PREFIX ""
#define OS_MENU_ITEM_SUFFIX ""
#else
#define OS_MENU_ITEM_PREFIX " "
#define OS_MENU_ITEM_SUFFIX "         "
#endif

#define OS_MENU_ITEM(l, s, c, d, f) {OS_MENU_ITEM_PREFIX l OS_MENU_ITEM_SUFFIX, s, c, d, f, FL_NORMAL_LABEL, OS_FONT, OS_FONT_SIZE, FL_FOREGROUND_COLOR}


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <fltk/fltk/issues/469@github.com>

Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.