<table><tr><td style="">graesslin created this revision.<br />graesslin added reviewers: KWin, Plasma.<br />graesslin added a task: T5220: Create InputEventSpy for ModifierOnlyShortcuts.<br />Restricted Application added a project: KWin.<br />Restricted Application added subscribers: kwin, plasma-devel.
</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/D4578" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>The functionality regarding triggering modifier only shortcuts is moved<br />
out of Xkb - where it doesn't belong to - and is turned into an input<br />
event spy listening for the changes it is interested in. Previously<br />
the state got queried by asking e.g. for the pressed buttons, now it's<br />
tracked directly.</p>

<p>The X11 side needs a larger change due to that as now pushing the events<br />
into Xkb does not trigger modifier only shortcuts any more. Instead the<br />
"normal" way through the platform API needs to be used which triggers the<br />
processing of filters and spies.</p>

<p>The problem here is that our redirections only process events if they are<br />
inited and that only happens on Wayland. We cannot call init on them as<br />
that would create all the Wayland filters and spies and processing would<br />
probably break. As an intermediate solution the spies are now processed<br />
and there we know that it won't matter. A future solution would be to<br />
remove the init checks completely and just send through both filters and<br />
spies and ensure that on X11 only the supported ones are loaded.</p>

<p>Closes <a href="https://phabricator.kde.org/T5220" style="background-color: #e7e7e7;
          border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: none;" rel="noreferrer">T5220</a></p></div></div><br /><div><strong>TEST PLAN</strong><div><p>Tested on Wayland and X11</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R108 KWin</div></div></div><br /><div><strong>BRANCH</strong><div><div>modifier-only-shortcuts</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D4578" rel="noreferrer">https://phabricator.kde.org/D4578</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>CMakeLists.txt<br />
keyboard_input.cpp<br />
keyboard_input.h<br />
modifier_only_shortcuts.cpp<br />
modifier_only_shortcuts.h<br />
plugins/platforms/x11/standalone/x11_platform.cpp<br />
plugins/platforms/x11/standalone/xinputintegration.cpp<br />
plugins/platforms/x11/standalone/xinputintegration.h<br />
pointer_input.cpp</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<br /><strong>Cc: </strong>plasma-devel, kwin, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol<br /></div>