<table><tr><td style="">graesslin added a comment.
</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/D10337" rel="noreferrer">View Revision</a></tr></table><br /><div><div><blockquote style="border-left: 3px solid #8C98B8;
          color: #6B748C;
          font-style: italic;
          margin: 4px 0 12px 0;
          padding: 8px 12px;
          background-color: #F8F9FC;">
<div style="font-style: normal;
          padding-bottom: 4px;">In <a href="https://phabricator.kde.org/D10337#202007" style="background-color: #e7e7e7;
          border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: none;" rel="noreferrer">D10337#202007</a>, <a href="https://phabricator.kde.org/p/apol/" style="
              border-color: #f1f7ff;
              color: #19558d;
              background-color: #f1f7ff;
                border: 1px solid transparent;
                border-radius: 3px;
                font-weight: bold;
                padding: 0 4px;" rel="noreferrer">@apol</a> wrote:</div>
<div style="margin: 0;
          padding: 0;
          border: 0;
          color: rgb(107, 116, 140);"><blockquote style="border-left: 3px solid #8C98B8;
          color: #6B748C;
          font-style: italic;
          margin: 4px 0 12px 0;
          padding: 8px 12px;
          background-color: #F8F9FC;">
<div style="font-style: normal;
          padding-bottom: 4px;">In <a href="https://phabricator.kde.org/D10337#201998" style="background-color: #e7e7e7;
          border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: none;" rel="noreferrer">D10337#201998</a>, <a href="https://phabricator.kde.org/p/graesslin/" style="
              border-color: #f1f7ff;
              color: #19558d;
              background-color: #f1f7ff;
                border: 1px solid transparent;
                border-radius: 3px;
                font-weight: bold;
                padding: 0 4px;" rel="noreferrer">@graesslin</a> wrote:</div>
<div style="margin: 0;
          padding: 0;
          border: 0;
          color: rgb(107, 116, 140);"><p>Please be aware that this will not work on Wayland. The modifier state is only available to the window which currently has keyboard focus. We either need a dedicated Wayland protocol to send all modifier changes to Plasma or some other way to have KWin feed in the state.</p>

<p>Anyway: I would recommend to make it only available for platform xcb right now.</p></div>
</blockquote>

<p>Note this is using a Plasma Data Engine that is used by several plasmoids and components throughout plasma. In turn, we should make sure that if the data engine doesn't have any data, it doesn't work.<br />
 Or have the data engine work on Wayland.</p></div>
</blockquote>

<p>The data engine can partially work. If you are interested only in the data engine while you have keyboard focus, it actually does work [1]. An example would be the lockscreen which uses the data engine and has keyboard focus.</p>

<p>The concept of this data engine just doesn't match the Wayland world: there are no global keyloggers. KWayland::Server could send the modifier changes to all applications, but this would on the one side trigger wakeups whenever a modifier changes for all applications (bad) or in the worst case even trigger crashes in applications as they don't expect modifier changes when not having keyboard focus.</p>

<p>So in summary: it depends a lot on what the use case for the engine is. This plasmoid unfortunately is an example for a usage pattern which does not work in a Wayland world. The only possibility I see is exposing a DBus service in KWin and have the data engine talk to it, but this would mean it's kwin dependent and still doesn't work on Wayland in general.</p>

<p>[1] KModifierKeyInfo doesn't support Wayland yet, so in practice it doesn't work</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R114 Plasma Addons</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D10337" rel="noreferrer">https://phabricator.kde.org/D10337</a></div></div><br /><div><strong>To: </strong>apol, Plasma, jriddell<br /><strong>Cc: </strong>graesslin, abetts, broulik, plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, sebas, apol, mart<br /></div>