No I am not using any kind of GlWidget of fltk for OpenGL display. I am using the traditional OpenGL subroutines and added into Fl_Double_Window. In this way, I created a menu bar in Fl_Double_Window.
> On 31.08.2012, at 14:27, Furqan <fur...@real3d.pk> wrote: > > > After spending so many days, finally I got it. Unintentionally I = > pressed the shortcut key when the menu was opened. It worked. So, the = > issue was menu was not selected or opened. > > But this seems awkward, anytime and anywhere shortcut keys should = > work. I am using OpenGL, the full window is covered with opengl display = > except the upper part of menu. > > Shortcut key does not work until I open that specific menu in which = > the key is specified. > > For example, the menu "FILE" has New(Ctrl+n) and Save(Ctrl+s). Ctrl+n = > or Ctrl+s do not work until I open the "FILE" menu. > >=20 > > What is this strange issue and how to solve it ? > > This is not the intended behavior and this is not how it works for me. I = > use shortcuts in all my apps and they behave exactly as you would like = > them to behave in your app. There must be something else going on. > > Did you write you own handle(int event) function for your OpenGL view? = > If so, did you make sure that all events are also handled by the base = > class (unless you don't want them to propagate)?=20 > > > int MyGlWidget::handle(int event)=20 > { > switch (event) { > case FL_PUSH:=20 > return 1; > ... > } > return Fl_Gl_Window::handle(event); << unless the event is handled = > above > }= > _______________________________________________ fltk mailing list fltk@easysw.com http://lists.easysw.com/mailman/listinfo/fltk