aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dw/fltkviewport.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/dw/fltkviewport.cc b/dw/fltkviewport.cc
index 992df22b..11994d0d 100644
--- a/dw/fltkviewport.cc
+++ b/dw/fltkviewport.cc
@@ -229,13 +229,20 @@ int FltkViewport::handle (int event)
switch(event) {
case FL_KEYBOARD:
- /* Tell fltk we want to receive KEYBOARD events as SHORTCUT.
- * As we don't know the exact keybindings set by the user, we ask
+ /* When the viewport has focus (and not one of its children), FLTK
+ * sends the event here. Returning zero tells FLTK to resend the
+ * event as SHORTCUT, which we finally route to the parent. */
+
+ /* As we don't know the exact keybindings set by the user, we ask
* for all of them (except Tab to keep form navigation). */
if (Fl::event_key() != FL_Tab)
return 0;
break;
+ case FL_SHORTCUT:
+ /* send it to the parent (UI) */
+ return 0;
+
case FL_FOCUS:
/** \bug Draw focus box. */
break;