fltk 1.1.8

Apparently when an Fl_Input has keyboard focus, and one presses
the enter key, the focus advances to the next widget in the tab order.
However, if when() is FL_ENTER_KEY or FL_WHEN_ENTER_KEY_ALWAYS,
the Enter key no longer changes the keyboard focus.  (I originally
thought this had to do with a callback I'd attached, but
experimentation indicates that having a callback or not is
irrelevant.. it's just the when() that does it).

I've searched in vain for mention of any interaction
between callbacks and event handling, and, for that matter,
for a detailed spec on keyboard navigation in fltk. Does
anyone have any pointers?

For reference, sample code below.

TIA,
Stan

///////////////////////////////////////////////////////////

#include <FL/Fl.H>
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Input.H>
#include <FL/Enumerations.H>

int main()
{
        Fl_Double_Window win1(300, 300, "Window 1");
        new Fl_Input(100, 100, 100, 20, "Input1");
        Fl_Input* w2 = new Fl_Input(100, 120, 100, 20, "Input2");
        new Fl_Input(100, 140, 100, 20, "Input3");
        win1.end();
        w2->when(FL_WHEN_ENTER_KEY);
        win1.show();
        return Fl::run();
}


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

Reply via email to