Clarification for need to return 1 from FL_FOCUS et al

to receive keyboard events.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10182 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Greg Ercolano 2014-06-04 23:21:10 +00:00
parent e3959bbaff
commit 0c085703f6

View File

@ -161,7 +161,9 @@ it, it will change the event into a \p FL_SHORTCUT event.
FL_KEYBOARD events are also generated by the character palette/map.
To receive \p FL_KEYBOARD events you must also respond to the
\p FL_FOCUS and \p FL_UNFOCUS events.
\p FL_FOCUS and \p FL_UNFOCUS events by returning 1. This way
FLTK knows whether to bother sending your widget keyboard events.
(Some widgets don't need them, e.g. Fl_Box.)
If you are writing a text-editing widget you may also want to call the
Fl::compose()