FLTK logo

Re: [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 ]

Re: [fltk/fltk] Fl_Sys_Menu_Bar menu item shortcuts using Escape or Tab do not work properly on Mac (Issue #469) ManoloFLTK Jul 27, 2022  
 

Plain FLTK prevents Tab from being recognized as a menu item shortcut because the program flow goes to function nav_key() (in Fl_Group.cxx) which recognizes Tab and Shift-Tab keystrokes as focus navigation commands and prevents the same keystroke to be processed as an FL_SHORTCUT event where it could be recognized as a menu item shortcut.

If an app derives Fl_Window or Fl_Double_Window and overrides its handle(int) method as follows

class myWindow : public Fl_Double_Window {
  public:
  myWindow(int w, int h) : Fl_Double_Window(w,h) {}
  int handle(int event) {
    if (event == FL_KEYBOARD) {
      int retval = Fl_Double_Window::handle(FL_SHORTCUT);
      if (retval) return retval;
    }
    return Fl_Double_Window::handle(event);
  }
};

then Tab and shift-Tab are recognized as menu shortcuts by unchanged FLTK both under Linux and macOS (and, presumably, Windows too).

Does your application modify the windows' handle method similarly?
If yes, this would mean this issue could be closed considering the last changes committed to the main branch (FLTK 1.4).


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/1196370705@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'.