opnsense-ports/graphics/osg/files/patch-shift-key-fix
Franco Fichtner 8cb1a96ede ports: pull in a snapshot of the FreeBSD ports tree
Taken from:	https://github.com/freebsd/freebsd-ports.git
Commit id:	5070672073b68be364139bc6b3a89100bd17d331
2014-11-09 14:03:21 +01:00

23 lines
1.3 KiB
Text

# Shift key not released if group switch is something other than Control-Shift:
# https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg1218650.html
--- src/osgGA/EventQueue.cpp.orig
+++ src/osgGA/EventQueue.cpp
@@ -337,7 +337,7 @@ void EventQueue::mouseButtonRelease(floa
void EventQueue::keyPress(int key, double time, int unmodifiedKey)
{
- switch(key)
+ switch(unmodifiedKey)
{
case(GUIEventAdapter::KEY_Shift_L): _accumulateEventState->setModKeyMask(GUIEventAdapter::MODKEY_LEFT_SHIFT | _accumulateEventState->getModKeyMask()); break;
case(GUIEventAdapter::KEY_Shift_R): _accumulateEventState->setModKeyMask(GUIEventAdapter::MODKEY_RIGHT_SHIFT | _accumulateEventState->getModKeyMask()); break;
@@ -381,7 +381,7 @@ void EventQueue::keyPress(int key, doubl
void EventQueue::keyRelease(int key, double time, int unmodifiedKey)
{
- switch(key)
+ switch(unmodifiedKey)
{
case(GUIEventAdapter::KEY_Shift_L): _accumulateEventState->setModKeyMask(~GUIEventAdapter::MODKEY_LEFT_SHIFT & _accumulateEventState->getModKeyMask()); break;
case(GUIEventAdapter::KEY_Shift_R): _accumulateEventState->setModKeyMask(~GUIEventAdapter::MODKEY_RIGHT_SHIFT & _accumulateEventState->getModKeyMask()); break;