From 74e74d76d9f4d066d669337bde4fb511bbcbc7d7 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 4 Apr 2018 13:40:51 +0100 Subject: [PATCH] Added focus classifiction of handling of keyboard events --- src/osgViewer/CompositeViewer.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/osgViewer/CompositeViewer.cpp b/src/osgViewer/CompositeViewer.cpp index cd1e5ad83..99fdd6e55 100644 --- a/src/osgViewer/CompositeViewer.cpp +++ b/src/osgViewer/CompositeViewer.cpp @@ -1020,6 +1020,12 @@ void CompositeViewer::eventTraversal() classification = EVENT_FOR_ALL_VIEWS; break; + case(osgGA::GUIEventAdapter::KEYDOWN): + case(osgGA::GUIEventAdapter::KEYUP): + classification = EVENT_FOR_VIEW_ASSOCIATED_WITH_FOCUS; + if (_previousEvent.valid()) event->copyPointerDataFrom(*_previousEvent); + break; + case(osgGA::GUIEventAdapter::PUSH): case(osgGA::GUIEventAdapter::RELEASE): case(osgGA::GUIEventAdapter::DOUBLECLICK):