<table><tr><td style="">graesslin created this revision.<br />graesslin added reviewers: KWin, Plasma on Wayland, bshah.<br />Restricted Application added subscribers: kwin, plasma-devel.<br />Restricted Application added projects: Plasma on Wayland, KWin.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D2768" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>When triggering global shortcuts we are more interested in the hold<br />
keys than the currently active modifiers. E.g. capslock should not<br />
be seen as "shift is hold". Similar we need to remove consumed<br />
modifiers. Shift+5 is % and not Shift+% - the shift modifier is<br />
consumed and needs to be removed from shortcut evaluation.</p>

<p>To support this we need to have the actual state directly from<br />
xkbcommon. Thus a new method is added which exposes the modifiers<br />
relevant for global shortcut matching. In addition on every key press<br />
all consumed modifiers are calculated and kept so that they can be<br />
used for shortcut matching.</p>

<p>In addition a workaround is added for Backtab. Similar workaround<br />
exists in kglobalaccel for X11. The problem is that our shortcuts are<br />
stored incorrectly: Shift+Tab instead of Backtab. Thus a mapping back<br />
is required. To make everything worse KWin registers the wrong key<br />
sequence "Alt+Shift+Backtab" which doesn't make any sense and is<br />
broken on X11 at least.</p>

<p>The workaround supports both special cases. The one for Backtab should<br />
be turned into Shift+Tab and also KWin's special case of adding shift<br />
to backtab.</p>

<p>CCBUG: 368581</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>rKWIN KWin</div></div></div><br /><div><strong>BRANCH</strong><div><div>shortcuts-consumed-modifiers</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D2768" rel="noreferrer">https://phabricator.kde.org/D2768</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>autotests/integration/globalshortcuts_test.cpp<br />
autotests/integration/tabbox_test.cpp<br />
globalshortcuts.cpp<br />
input.cpp<br />
keyboard_input.cpp<br />
keyboard_input.h</div></div></div><br /><div><strong>EMAIL PREFERENCES</strong><div><a href="https://phabricator.kde.org/settings/panel/emailpreferences/" rel="noreferrer">https://phabricator.kde.org/settings/panel/emailpreferences/</a></div></div><br /><div><strong>To: </strong>graesslin, KWin, Plasma on Wayland, bshah<br /><strong>Cc: </strong>plasma-devel, kwin, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas<br /></div>