Merge pull request #878 from mike402/master

Fix #877 "Shift key stuck if both shifts switch keymap"
This commit is contained in:
OpenSceneGraph git repository 2019-12-23 14:56:44 +00:00 committed by GitHub
commit aa94cd4fef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -357,7 +357,7 @@ osgGA::GUIEventAdapter* EventQueue::mouseButtonRelease(float x, float y, unsigne
osgGA::GUIEventAdapter* 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;
@ -403,7 +403,7 @@ osgGA::GUIEventAdapter* EventQueue::keyPress(int key, double time, int unmodifie
osgGA::GUIEventAdapter* 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;