FLTK defines
typedef int(*Key_Func) (int key, Fl_Text_Editor *editor);
What is the meaning of the int returned by such Key_Func? I am guessing that 1 means the key press event is consumed, and 0 means it is falling thru (to some parent widget?)
Yes, it appears to be the same as the handle() method's
return value,
which returns 1 if an event is 'handled', and 0 if not.
In the case of key bindingings, it's the same thing.
If the key isn't handled(), the event is propagated through
the rest of the
FLTK event hierarchy, and if no widgets respond to the event,
the event
is resent as an FL_SHORTCUT, so widgets (e.g. menus) that have
hot keys
programmed can handle the key.
For the RefPerSys project (GPLv3+ licensed, for Linux, its C++ variant) we want to catch most (and perhaps all) key presses in a subclass of Fl_Text_Editor. Indeed a lot of them would extend FLTK default editor.