Fix #877 "Shift key stuck if both shifts switch keymap"
Adapted the patch from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=687332
This commit is contained in:
committed by
Robert Osfield
parent
7e8665308d
commit
f4fe1e5cec
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user