Revert unrelated optimization

This commit is contained in:
Jacob Poteet 2024-02-10 16:29:29 -05:00
commit afbb7243fb

View file

@ -747,17 +747,48 @@ namespace CalculatorApp
{ {
int viewId = Utilities.GetWindowId(); int viewId = Utilities.GetWindowId();
if (controlKeyPressed && !altPressed) if (controlKeyPressed)
{ {
return shiftKeyPressed ? s_VirtualKeyControlShiftChordsForButtons[viewId] : s_VirtualKeyControlChordsForButtons[viewId]; if (altPressed)
} {
else if (altPressed && !controlKeyPressed) return null;
{ }
return shiftKeyPressed ? null : s_VirtualKeyAltChordsForButtons[viewId]; else
{
if (shiftKeyPressed)
{
return s_VirtualKeyControlShiftChordsForButtons[viewId];
}
else
{
return s_VirtualKeyControlChordsForButtons[viewId];
}
}
} }
else else
{ {
return shiftKeyPressed ? s_VirtualKeyShiftChordsForButtons[viewId] : s_virtualKey[viewId]; if (altPressed)
{
if (shiftKeyPressed)
{
return null;
}
else
{
return s_VirtualKeyAltChordsForButtons[viewId];
}
}
else
{
if (shiftKeyPressed)
{
return s_VirtualKeyShiftChordsForButtons[viewId];
}
else
{
return s_virtualKey[viewId];
}
}
} }
} }