Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.6
-
None
Description
A key press event for the Control key surprisingly has Control modifier set as well, resulting in e.g. key sequences such as Ctrl+Control.
This should only be the case if pressing an additional control key, while holding an existing control key.
The same applies for the other modifiers.
The windows key mapper seems to have some logic for this, but it's actually setting the modifier state instead, since it's XOR'ing the state:
// Invert state logic: // If the key actually pressed is a modifier key, then we remove its modifier key from the // state, since a modifier-key can't have itself as a modifier if (code == Qt::Key_Control) state = state ^ Qt::ControlModifier; else if (code == Qt::Key_Shift) state = state ^ Qt::ShiftModifier; else if (code == Qt::Key_Alt) state = state ^ Qt::AltModifier; else if (code == Qt::Key_AltGr) state = state ^ Qt::GroupSwitchModifier;