On 31.08.2012, at 14:27, Furqan <[email protected]> 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.
> 
> 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)? 


int MyGlWidget::handle(int event) 
{
  switch (event) {
    case FL_PUSH: 
      return 1;
     ...
  }
  return Fl_Gl_Window::handle(event); << unless the event is handled above
}
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to