From 0c085703f6b81d138a207c1ca08bd0bffe3c94c5 Mon Sep 17 00:00:00 2001 From: Greg Ercolano Date: Wed, 4 Jun 2014 23:21:10 +0000 Subject: 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 --- documentation/src/events.dox | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'documentation/src') diff --git a/documentation/src/events.dox b/documentation/src/events.dox index a6234d25a..82718bec6 100644 --- a/documentation/src/events.dox +++ b/documentation/src/events.dox @@ -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() -- cgit v1.2.3