D10337: First approach to a plasmoid that can display the state of caps lock

2018-02-20 Thread Friedrich W . H . Kossebau
kossebau added a comment.


  Quick note before I forget again: doesn't this need some Messages.sh? There 
are some i18n calls in the QML.

REPOSITORY
  R114 Plasma Addons

REVISION DETAIL
  https://phabricator.kde.org/D10337

To: apol, #plasma, jriddell
Cc: kossebau, graesslin, abetts, broulik, plasma-devel, ZrenBot, lesliezhai, 
ali-mohamed, jensreuterberg, sebas, apol, mart


D10337: First approach to a plasmoid that can display the state of caps lock

2018-02-19 Thread Aleix Pol Gonzalez
This revision was not accepted when it landed; it landed in state "Needs 
Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit R114:1ab3d012b2d5: First approach to a plasmoid that can 
display the state of caps lock (authored by apol).

CHANGED PRIOR TO COMMIT
  https://phabricator.kde.org/D10337?vs=26665=27585#toc

REPOSITORY
  R114 Plasma Addons

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D10337?vs=26665=27585

REVISION DETAIL
  https://phabricator.kde.org/D10337

AFFECTED FILES
  applets/CMakeLists.txt
  applets/keyboardindicator/contents/ui/main.qml
  applets/keyboardindicator/metadata.desktop

To: apol, #plasma, jriddell
Cc: graesslin, abetts, broulik, plasma-devel, ZrenBot, lesliezhai, ali-mohamed, 
jensreuterberg, sebas, apol, mart


D10337: First approach to a plasmoid that can display the state of caps lock

2018-02-06 Thread Aleix Pol Gonzalez
apol added a comment.


  F5695536: VID_20180206_195933.mp4  this 
is a very clunky video of what it looks like. Hope this helps.
  Design input very welcome.

REPOSITORY
  R114 Plasma Addons

REVISION DETAIL
  https://phabricator.kde.org/D10337

To: apol, #plasma, jriddell
Cc: graesslin, abetts, broulik, plasma-devel, ZrenBot, progwolff, lesliezhai, 
ali-mohamed, jensreuterberg, sebas, apol, mart


D10337: First approach to a plasmoid that can display the state of caps lock

2018-02-06 Thread Aleix Pol Gonzalez
apol updated this revision to Diff 26665.
apol added a comment.


  Also expose numlock, somewhat

REPOSITORY
  R114 Plasma Addons

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D10337?vs=26638=26665

BRANCH
  arcpatch-D10337

REVISION DETAIL
  https://phabricator.kde.org/D10337

AFFECTED FILES
  applets/CMakeLists.txt
  applets/keyboardindicator/contents/ui/main.qml
  applets/keyboardindicator/metadata.desktop

To: apol, #plasma, jriddell
Cc: graesslin, abetts, broulik, plasma-devel, ZrenBot, progwolff, lesliezhai, 
ali-mohamed, jensreuterberg, sebas, apol, mart


D10337: First approach to a plasmoid that can display the state of caps lock

2018-02-06 Thread Martin Flöser
graesslin added a comment.


  In https://phabricator.kde.org/D10337#202007, @apol wrote:
  
  > In https://phabricator.kde.org/D10337#201998, @graesslin wrote:
  >
  > > 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.
  > >
  > > Anyway: I would recommend to make it only available for platform xcb 
right now.
  >
  >
  > 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.
  >  Or have the data engine work on Wayland.
  
  
  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.
  
  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.
  
  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.
  
  [1] KModifierKeyInfo doesn't support Wayland yet, so in practice it doesn't 
work

REPOSITORY
  R114 Plasma Addons

REVISION DETAIL
  https://phabricator.kde.org/D10337

To: apol, #plasma, jriddell
Cc: graesslin, abetts, broulik, plasma-devel, ZrenBot, progwolff, lesliezhai, 
ali-mohamed, jensreuterberg, sebas, apol, mart


D10337: First approach to a plasmoid that can display the state of caps lock

2018-02-06 Thread Aleix Pol Gonzalez
apol added a comment.


  In https://phabricator.kde.org/D10337#201998, @graesslin wrote:
  
  > 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.
  >
  > Anyway: I would recommend to make it only available for platform xcb right 
now.
  
  
  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.
  Or have the data engine work on Wayland.

REPOSITORY
  R114 Plasma Addons

REVISION DETAIL
  https://phabricator.kde.org/D10337

To: apol, #plasma, jriddell
Cc: graesslin, abetts, broulik, plasma-devel, ZrenBot, progwolff, lesliezhai, 
ali-mohamed, jensreuterberg, sebas, apol, mart


D10337: First approach to a plasmoid that can display the state of caps lock

2018-02-06 Thread Martin Flöser
graesslin added a comment.


  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.
  
  Anyway: I would recommend to make it only available for platform xcb right 
now.

REPOSITORY
  R114 Plasma Addons

REVISION DETAIL
  https://phabricator.kde.org/D10337

To: apol, #plasma, jriddell
Cc: graesslin, abetts, broulik, plasma-devel, ZrenBot, progwolff, lesliezhai, 
ali-mohamed, jensreuterberg, sebas, apol, mart


D10337: First approach to a plasmoid that can display the state of caps lock

2018-02-06 Thread Andres Betts
abetts added a comment.


  Does this have a look yet?

REPOSITORY
  R114 Plasma Addons

REVISION DETAIL
  https://phabricator.kde.org/D10337

To: apol, #plasma, jriddell
Cc: abetts, broulik, plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, 
jensreuterberg, sebas, apol, mart


D10337: First approach to a plasmoid that can display the state of caps lock

2018-02-06 Thread Kai Uwe Broulik
broulik added inline comments.

INLINE COMMENTS

> main.qml:29
> +
> +Plasmoid.onActivated: toggle()
> +

I don't see a `toggle()` function

> main.qml:34
> +engine: "keystate"
> +connectedSources: "Caps Lock"
> +}

I know QML does this magically but I'd prefer explicit array

  connectedSources: ["Caps Lock"]

> main.qml:61
> +source: plasmoid.icon
> +active: parent.containsMouse || root.capsLock
> +}

You change the icon *and* let it glow when caps lock is enabled?

> metadata.desktop:3
> +Name=Keyboard Indicator
> +Comment=Shows the state of the keyboard
> +Type=Service

Is this supposed to be augmented to show Num Lock etc otherwise this is oddly 
unspecific

REPOSITORY
  R114 Plasma Addons

REVISION DETAIL
  https://phabricator.kde.org/D10337

To: apol, #plasma, jriddell
Cc: broulik, plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, mart


D10337: First approach to a plasmoid that can display the state of caps lock

2018-02-06 Thread Aleix Pol Gonzalez
apol created this revision.
apol added reviewers: Plasma, jriddell.
Restricted Application added a project: Plasma.
Restricted Application added a subscriber: plasma-devel.
apol requested review of this revision.

REPOSITORY
  R114 Plasma Addons

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D10337

AFFECTED FILES
  applets/CMakeLists.txt
  applets/keyboardindicator/contents/ui/main.qml
  applets/keyboardindicator/metadata.desktop

To: apol, #plasma, jriddell
Cc: plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas, apol, mart