From 27b77537feafbc05c6cb503a4e26e3a0bedf8ea3 Mon Sep 17 00:00:00 2001 From: Jamie Robertson Date: Sat, 20 Jan 2024 08:43:48 -0600 Subject: [PATCH] Fix keyboard modifier typos in Update Win32_Window.h Typos in vsgWin32::KeyboardMap::getKeySymbol prevented VK_RSHIFT and VK_RMENU key's (Right shift & Right Alt) being mapped to MODKEY_Shift and MODKEY_Alt keys. --- include/vsg/platform/win32/Win32_Window.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/vsg/platform/win32/Win32_Window.h b/include/vsg/platform/win32/Win32_Window.h index 3795b432c..212e57351 100644 --- a/include/vsg/platform/win32/Win32_Window.h +++ b/include/vsg/platform/win32/Win32_Window.h @@ -91,11 +91,11 @@ namespace vsgWin32 // Check if the modifier keys are down (these are non-toggle keys, so the high-order bit is relevant!) // again, vsg only has a side-independent modifier if (keyState[VK_LSHIFT] & 0x80) modifierMask |= vsg::KeyModifier::MODKEY_Shift; - if (keyState[VK_LSHIFT] & 0x80) modifierMask |= vsg::KeyModifier::MODKEY_Shift; + if (keyState[VK_RSHIFT] & 0x80) modifierMask |= vsg::KeyModifier::MODKEY_Shift; if (keyState[VK_LCONTROL] & 0x80) modifierMask |= vsg::KeyModifier::MODKEY_Control; if (keyState[VK_RCONTROL] & 0x80) modifierMask |= vsg::KeyModifier::MODKEY_Control; if (keyState[VK_LMENU] & 0x80) modifierMask |= vsg::KeyModifier::MODKEY_Alt; - if (keyState[VK_LMENU] & 0x80) modifierMask |= vsg::KeyModifier::MODKEY_Alt; + if (keyState[VK_RMENU] & 0x80) modifierMask |= vsg::KeyModifier::MODKEY_Alt; // This is the final keyModifier keyModifier = static_cast(modifierMask);