Skip to content

Commit a7b9e17

Browse files
SG-40373: Alt+Shift key up doesn't clear Alt modifier (#879) (#880)
<!-- Thanks for your contribution! Please read this comment in its entirety. It's quite important. When a contributor merges the pull request, the title and the description will be used to build the merge commit! ### Pull Request TITLE It should be in the following format: [ 12345: Summary of the changes made ] Where 12345 is the corresponding Github Issue OR [ Summary of the changes made ] If it's solving something trivial, like fixing a typo. --> ### Linked issues <!-- Link the Issue(s) this Pull Request is related to. Each PR should link to at least one issue, in the form: Use one line for each Issue. This allows auto-closing the related issue when the fix is merged. Fixes #12345 Fixes #54345 --> ### Summarize your change. This update includes Alt in handling that already exists for clearing modifiers after a modifier mismatch occurs. ### Describe the reason for the change. `Alt` + `Shift` modifier key-down was incorrectly identifying as `Meta` + `Shift` on key-up. As a result, `Alt` state continued after key up, which caused operators to think RV was hung -- spacebar wouldn't play/pause, dragging cursor on screen wouldn't scrub timeline, etc. ### Describe what you have tested and on which operating system. Reproduced Alt+Shift issue on Linux RHEL 9.4 and RHEL 7.2, using: * Latest OpenRV main branch * RV 2023.0.3 * RV 7.2.6 Confirmed it did not happen on MacOS Sequoia. ### Add a list of changes, and note any that might need special attention during the review. ### If possible, provide screenshots. Signed-off-by: Will Wira <[email protected]> Signed-off-by: pbergeron-adsk <[email protected]> Co-authored-by: pbergeron-adsk <[email protected]>
1 parent 09aea51 commit a7b9e17

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/lib/app/RvCommon/QTTranslator.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,10 @@ namespace Rv
133133
// is that in many cases this code causes the control modifier
134134
// to be lost.
135135
//
136-
if (m_modifiers & Qt::ControlModifier || m_modifiers & Qt::MetaModifier)
136+
// Alt modifier included in handling, as a mismatch can
137+
// occur when pressing Alt + Shift. Qt can incorrectly
138+
// substitute Meta button for Alt on key up.
139+
if (m_modifiers & Qt::ControlModifier || m_modifiers & Qt::AltModifier || m_modifiers & Qt::MetaModifier)
137140
{
138141
m_modifiers = inputEvent->modifiers() & 0xffff0000;
139142
}

0 commit comments

Comments
 (0)