[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    Re: Review Request 124954: Add support for modifier only shortcuts on Wayland
From:       Martin_Gräßlin <mgraesslin () kde ! org>
Date:       2015-08-31 11:32:08
Message-ID: 20150831113208.10622.3846 () mimi ! kde ! org
[Download RAW message or body]

--===============0185146381109214985==
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit



> On Aug. 27, 2015, 9:04 p.m., Thomas Pfeiffer wrote:
> > Since this is indeed a very often required feature, why do we keep it hidden? If \
> > it can have negative side-effects, it we should warn users about them, not hide \
> > the whole feature from them.
> 
> Thomas Lübking wrote:
> or restricte to wayland? same process would work for kglobalaccel on X11.
> Afaiu the restriction has always been the shortcut editor widget?
> 
> Martin Gräßlin wrote:
> > why do we keep it hidden?
> 
> Because it's extremely technical the way it's implemented. I don't want to have a \
> UI which exposes internal, technical functionality to setup DBus calls. 
> The question is what do people want to do with it? Open the launcher with meta. \
> What else? Nothing? Anybody who wants shift to act as a launcher? unlikely or Alt \
> on a German keyboard? Unlikely. 
> If we want to have Meta to trigger opening the launcher, Plasma should provide a \
> default config for KWin. It's nothing KWin cares about, we support multiple desktop \
> shells and won't add it directly to KWin. The feature is implemented in a generic \
> way, but that also means it's very technical to configure. Thus nothing to be \
> exposed in a config. 
> After all isn't it you guys who tell me that our config dialogs are too complex? \
> ;-) 
> Thomas Lübking wrote:
> which launcher?
> kickoff?
> homerun?
> krunner?
> 
> while at it: should we allow modifier combinations? (eg. Meta: kickoff, Shift+Meta: \
> homerun, ctrl+Meta: krunner) 
> Martin Gräßlin wrote:
> > which launcher?
> 
> I'd say that's up to Plasma to come up with a solution for that. E.g. a DBus call \
> to open the currently used launcher (assuming that users don't put multiple \
> launchers in their panel). 
> > should we allow modifier combinations?
> 
> nah that just complicates it ;-)
> 
> Thomas Lübking wrote:
> would one rather emit a dbus signal then?
> st. like "modifierHit(int/qstring modifier)"
> 
> This allows interested clients to hook onto it and/or provide a checkbox/combobox \
> whether they should (on what modifier) 
> Complexity shouldn't be too much, ignore other modifier presses and check modifiers \
> on first modifier release. 
> Martin Gräßlin wrote:
> Brings the disadvantage of:
> * all (connected) apps wake up whenever someone presses shift (I do that a lot and \
>                 then don't type)
> * multiple actions can get triggered - there are no checks
> 
> If we would want that we would rather have to make it part of KGlobalaccel.
> 
> Thomas Lübking wrote:
> shiftModiferHit(int modifiers)
> ctrlModiferHit(int modifiers)
> altModiferHit(int modifiers)
> metaModiferHit(int modifiers)
> 
> (why do you press shift w/o typing btw.?)
> 
> 
> About the multiple invocation: either we
> - accept that
> - utilize kglobalaccel (collision check mechanism)
> - leave the entire thing unconfigurable (where the user cannot control which runner \
> he gets for the shortcut) 
> => are multiple bindings really an expectable problem?
> And if they are, doesn't that imply so widespread usage so that user configuration \
> becomes "mandatory"? 
> Hans Chen wrote:
> Two questions:
> 
> 1. From a non-technical point of view, does it make sense to make this part of \
> KWin? For example, if I choose a different window manager with Plasma, why should I \
> lose this feature that has little to do with window management? Having this to be \
> part of KGlobalaccel seems much more reasonable from a user's perspective (since it \
> has to do with shortcuts). 
> 2. Will there be a timeout, i.e., holding down a modifier for long enough will make \
> it not trigger the DBus call, for example if you want to press a Super+<something> \
> shortcut but then change your mind. (Maybe it's already there and I'm just blind.)
> 
> About use cases other than Super to show the application menu, some Vim users may \
> want to map e.g. Ctrl to Escape. Personally I also map Alt to my Tmux key. With \
> that said, you could argue that such users know how to archieve this without a GUI. \
> The large majority probably just wants the "Windows key to launch application menu" \
> functionality. 
> Thanks for CC:ing me by the way, much appreciated.
> 
> Martin Gräßlin wrote:
> > From a non-technical point of view, does it make sense to make this part of KWin?
> 
> This is for Wayland. An application like KSuperKey cannot work on Wayland at all \
> (no global keyloggers). We either make it part of KWin or cannot offer it at all. 
> > For example, if I choose a different window manager with Plasma, why should I \
> > lose this feature that has little to do with window management?
> 
> Wayland :-) If you choose a different compositor for Plasma you will lose more than \
> just this feature. 
> > Will there be a timeout, i.e., holding down a modifier for long enough will make \
> > it not trigger the DBus call, for example if you want to press a \
> > Super+<something> shortcut but then change your mind.
> 
> The shortcut triggers on key release and not on key press. Given that a timeout is \
> not needed. That is also why it's not (yet) in KGlobalAccel as KGlobalAccel \
> operates on presses. 
> > some Vim users may want to map e.g. Ctrl to Escape
> 
> That's what keymaps are for.
> 
> Hans Chen wrote:
> > Wayland :-) If you choose a different compositor for Plasma you will lose more \
> > than just this feature.
> 
> I understand the connection to Wayland, I was just questioning whether it makes \
> sense to make this part of what traditionally was "just a window manager". But \
> given KWin's role as a compositor for Plasma, I guess that's just the way it is. 
> > The shortcut triggers on key release and not on key press. Given that a timeout \
> > is not needed. That is also why it's not (yet) in KGlobalAccel as KGlobalAccel \
> > operates on presses.
> 
> Yes I know :) ksuperkey does have a timeout though, if you hold the modifier long \
> enough it won't trigger the action (default timeout is 500 ms). This is nice for \
> "destructive" actions like generating Escape. However, for something like opening \
> the application launcher it might not be needed; as far as I know Windows doesn't \
> have a timeout. 
> > That's what keymaps are for.
> 
> I meant a similar mechanism as ksuperkey where Ctrl acts both as a modifier and \
> Escape (typically you map Caps Lock to Ctrl). But this isn't really important for \
> the current discussion, I just wanted to give another use case for a mechanism like \
> ksuperkey.

> I was just questioning whether it makes sense to make this part of what \
> traditionally was "just a window manager".

we need to get over that: KWin is a compositor (and also a window manager) and yes \
for a compositor it makes sense to handle input as otherwise input redirection is not \
possible. It's just that on X11 the input redirection never matured. And on Wayland \
we need to consider the constraints of Wayland. Features like ksuperkey are \
impossible as nobody except the compositor has access to all key events. That's also \
the reason why kglobalaccel is merged into kwin on Wayland (but not on X11).

> I meant a similar mechanism as ksuperkey where Ctrl acts both as a modifier and \
> Escape

allthough a little bit offtopic: I really think that's not what ksuperkey or this \
functionality is for, but that is what keymaps are for. If users want to have the key \
act as Escape: modmap it


- Martin


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/124954/#review84486
-----------------------------------------------------------


On Aug. 27, 2015, 6:04 p.m., Martin Gräßlin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/124954/
> -----------------------------------------------------------
> 
> (Updated Aug. 27, 2015, 6:04 p.m.)
> 
> 
> Review request for kwin, Plasma and Hans Chen.
> 
> 
> Repository: kwin
> 
> 
> Description
> -------
> 
> On popular demand!
> 
> This change tracks how modifiers are used and detects a modifier only
> key press/release. That is:
> * no other key is pressed when the modifier gets pressed
> * no other key gets pressed before the modifier gets released
> 
> If such a press/release is detected, we call a configurable dbus call.
> The possible shortcuts can be configured in kwinrc, group
> "ModifierOnlyShortcuts". The following keys are supported:
> * Shift
> * Control
> * Alt
> * Meta
> 
> As value it takes a QStringList (comma seperated string) with
> service,path,interface,method,additionalargs
> 
> E.g. to invoke Desktop Grid effect on Meta key:
> 
> [ModifierOnlyShortcuts]
> Meta=org.kde.kglobalaccel,/component/kwin/,org.kde.kglobalaccel.Component,invokeShortcut,ShowDesktopGrid
>  
> I do not intend to add a config interface for it. Let's keep it a hidden
> way.
> 
> 
> Diffs
> -----
> 
> input.h cfb693dc06a18ea9ca7cffb99b9a1318ee443e3a 
> input.cpp 92724d7b7559dd460a8f5fbe17deb3c72024eed6 
> options.h 07c5193e3bd205c5c8c22a305f4c1d87e16d175f 
> options.cpp 64269d64bc49640bf2e4e925ce1969f2a5d6b96b 
> 
> Diff: https://git.reviewboard.kde.org/r/124954/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Martin Gräßlin
> 
> 


--===============0185146381109214985==
MIME-Version: 1.0
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 8bit




<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 \
solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">  \
<tr>  <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://git.reviewboard.kde.org/r/124954/">https://git.reviewboard.kde.org/r/124954/</a>
  </td>
    </tr>
   </table>
   <br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On August 27th, 2015, 9:04 p.m. CEST, <b>Thomas \
Pfeiffer</b> wrote:</p>  <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;">  <pre style="white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">Since this is indeed a very often required feature, \
why do we keep it hidden? If it can have negative side-effects, it we should warn \
users about them, not hide the whole feature from them.</p></pre>  </blockquote>




 <p>On August 27th, 2015, 9:08 p.m. CEST, <b>Thomas Lübking</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">or \
restricte to wayland? same process would work for kglobalaccel on X11. Afaiu the \
restriction has always been the shortcut editor widget?</p></pre>  </blockquote>





 <p>On August 28th, 2015, 7:57 a.m. CEST, <b>Martin Gräßlin</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><blockquote \
style="text-rendering: inherit;padding: 0 0 0 1em;border-left: 1px solid \
#bbb;white-space: normal;margin: 0 0 0 0.5em;line-height: inherit;"> <p \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">why do we keep it hidden?</p> </blockquote>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">Because it's extremely technical the way it's \
implemented. I don't want to have a UI which exposes internal, technical \
functionality to setup DBus calls.</p> <p style="padding: 0;text-rendering: \
inherit;margin: 0;line-height: inherit;white-space: inherit;">The question is what do \
people want to do with it? Open the launcher with meta. What else? Nothing? Anybody \
who wants shift to act as a launcher? unlikely or Alt on a German keyboard? \
Unlikely.</p> <p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">If we want to have Meta to trigger opening the \
launcher, Plasma should provide a default config for KWin. It's nothing KWin cares \
about, we support multiple desktop shells and won't add it directly to KWin. The \
feature is implemented in a generic way, but that also means it's very technical to \
configure. Thus nothing to be exposed in a config.</p> <p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">After \
all isn't it you guys who tell me that our config dialogs are too complex? \
;-)</p></pre>  </blockquote>





 <p>On August 28th, 2015, 8:05 a.m. CEST, <b>Thomas Lübking</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">which \
launcher? kickoff?
homerun?
krunner?</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">while at it: should we allow modifier combinations? \
(eg. Meta: kickoff, Shift+Meta: homerun, ctrl+Meta: krunner)</p></pre>  </blockquote>





 <p>On August 28th, 2015, 8:19 a.m. CEST, <b>Martin Gräßlin</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><blockquote \
style="text-rendering: inherit;padding: 0 0 0 1em;border-left: 1px solid \
#bbb;white-space: normal;margin: 0 0 0 0.5em;line-height: inherit;"> <p \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">which launcher?</p> </blockquote>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">I'd say that's up to Plasma to come up with a solution \
for that. E.g. a DBus call to open the currently used launcher (assuming that users \
don't put multiple launchers in their panel).</p> <blockquote style="text-rendering: \
inherit;padding: 0 0 0 1em;border-left: 1px solid #bbb;white-space: normal;margin: 0 \
0 0 0.5em;line-height: inherit;"> <p style="padding: 0;text-rendering: \
inherit;margin: 0;line-height: inherit;white-space: inherit;">should we allow \
modifier combinations?</p> </blockquote>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">nah that just complicates it ;-)</p></pre>  \
</blockquote>





 <p>On August 28th, 2015, 8:25 a.m. CEST, <b>Thomas Lübking</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">would \
one rather emit a dbus signal then? st. like "modifierHit(int/qstring modifier)"</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">This allows interested clients to hook onto it and/or \
provide a checkbox/combobox whether they should (on what modifier)</p> <p \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">Complexity shouldn't be too much, ignore other modifier presses and check \
modifiers on first modifier release.</p></pre>  </blockquote>





 <p>On August 28th, 2015, 8:30 a.m. CEST, <b>Martin Gräßlin</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">Brings the disadvantage of: <em style="padding: 0;text-rendering: \
inherit;margin: 0;line-height: inherit;white-space: normal;"> all (connected) apps \
wake up whenever someone presses shift (I do that a lot and then don't type) </em> \
multiple actions can get triggered - there are no checks</p> <p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">If we \
would want that we would rather have to make it part of KGlobalaccel.</p></pre>  \
</blockquote>





 <p>On August 28th, 2015, 8:54 p.m. CEST, <b>Thomas Lübking</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">shiftModiferHit(int modifiers) ctrlModiferHit(int modifiers)
altModiferHit(int modifiers)
metaModiferHit(int modifiers)</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">(why do you press shift w/o typing btw.?)</p> <p \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
                inherit;">About the multiple invocation: either we
- accept that
- utilize kglobalaccel (collision check mechanism)
- leave the entire thing unconfigurable (where the user cannot control which runner \
he gets for the shortcut)</p> <p style="padding: 0;text-rendering: inherit;margin: \
0;line-height: inherit;white-space: inherit;">=&gt; are multiple bindings really an \
expectable problem? And if they are, doesn't that imply so widespread usage so that \
user configuration becomes "mandatory"?</p></pre>  </blockquote>





 <p>On August 31st, 2015, 4:13 a.m. CEST, <b>Hans Chen</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Two \
questions:</p> <ol style="padding: 0;text-rendering: inherit;margin: 0 0 0 \
2em;line-height: inherit;white-space: normal;"> <li style="padding: 0;text-rendering: \
inherit;margin: 0;line-height: inherit;white-space: normal;"> <p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">From \
a non-technical point of view, does it make sense to make this part of KWin? For \
example, if I choose a different window manager with Plasma, why should I lose this \
feature that has little to do with window management? Having this to be part of \
KGlobalaccel seems much more reasonable from a user's perspective (since it has to do \
with shortcuts).</p> </li>
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: normal;"> <p style="padding: 0;text-rendering: inherit;margin: \
0;line-height: inherit;white-space: inherit;">Will there be a timeout, i.e., holding \
down a modifier for long enough will make it not trigger the DBus call, for example \
if you want to press a Super+&lt;something&gt; shortcut but then change your mind. \
(Maybe it's already there and I'm just blind.)</p> </li>
</ol>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">About use cases other than Super to show the \
application menu, some Vim users may want to map e.g. Ctrl to Escape. Personally I \
also map Alt to my Tmux key. With that said, you could argue that such users know how \
to archieve this without a GUI. The large majority probably just wants the "Windows \
key to launch application menu" functionality.</p> <p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">Thanks for CC:ing me by the way, much appreciated.</p></pre>  </blockquote>





 <p>On August 31st, 2015, 8:32 a.m. CEST, <b>Martin Gräßlin</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><blockquote \
style="text-rendering: inherit;padding: 0 0 0 1em;border-left: 1px solid \
#bbb;white-space: normal;margin: 0 0 0 0.5em;line-height: inherit;"> <p \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">From a non-technical point of view, does it make sense to make this part of \
KWin?</p> </blockquote>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">This is for Wayland. An application like KSuperKey \
cannot work on Wayland at all (no global keyloggers). We either make it part of KWin \
or cannot offer it at all.</p> <blockquote style="text-rendering: inherit;padding: 0 \
0 0 1em;border-left: 1px solid #bbb;white-space: normal;margin: 0 0 0 \
0.5em;line-height: inherit;"> <p style="padding: 0;text-rendering: inherit;margin: \
0;line-height: inherit;white-space: inherit;">For example, if I choose a different \
window manager with Plasma, why should I lose this feature that has little to do with \
window management?</p> </blockquote>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">Wayland :-) If you choose a different compositor for \
Plasma you will lose more than just this feature.</p> <blockquote \
style="text-rendering: inherit;padding: 0 0 0 1em;border-left: 1px solid \
#bbb;white-space: normal;margin: 0 0 0 0.5em;line-height: inherit;"> <p \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">Will there be a timeout, i.e., holding down a modifier for long enough will \
make it not trigger the DBus call, for example if you want to press a \
Super+&lt;something&gt; shortcut but then change your mind.</p> </blockquote>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">The shortcut triggers on key release and not on key \
press. Given that a timeout is not needed. That is also why it's not (yet) in \
KGlobalAccel as KGlobalAccel operates on presses.</p> <blockquote \
style="text-rendering: inherit;padding: 0 0 0 1em;border-left: 1px solid \
#bbb;white-space: normal;margin: 0 0 0 0.5em;line-height: inherit;"> <p \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">some Vim users may want to map e.g. Ctrl to Escape</p> </blockquote>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">That's what keymaps are for.</p></pre>  </blockquote>





 <p>On August 31st, 2015, 1:02 p.m. CEST, <b>Hans Chen</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><blockquote \
style="text-rendering: inherit;padding: 0 0 0 1em;border-left: 1px solid \
#bbb;white-space: normal;margin: 0 0 0 0.5em;line-height: inherit;"> <p \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">Wayland :-) If you choose a different compositor for Plasma you will lose \
more than just this feature.</p> </blockquote>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">I understand the connection to Wayland, I was just \
questioning whether it makes sense to make this part of what traditionally was "just \
a window manager". But given KWin's role as a compositor for Plasma, I guess that's \
just the way it is.</p> <blockquote style="text-rendering: inherit;padding: 0 0 0 \
1em;border-left: 1px solid #bbb;white-space: normal;margin: 0 0 0 0.5em;line-height: \
inherit;"> <p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">The shortcut triggers on key release and not on key \
press. Given that a timeout is not needed. That is also why it's not (yet) in \
KGlobalAccel as KGlobalAccel operates on presses.</p> </blockquote>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">Yes I know :) ksuperkey does have a timeout though, if \
you hold the modifier long enough it won't trigger the action (default timeout is 500 \
ms). This is nice for "destructive" actions like generating Escape. However, for \
something like opening the application launcher it might not be needed; as far as I \
know Windows doesn't have a timeout.</p> <blockquote style="text-rendering: \
inherit;padding: 0 0 0 1em;border-left: 1px solid #bbb;white-space: normal;margin: 0 \
0 0 0.5em;line-height: inherit;"> <p style="padding: 0;text-rendering: \
inherit;margin: 0;line-height: inherit;white-space: inherit;">That's what keymaps are \
for.</p> </blockquote>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">I meant a similar mechanism as ksuperkey where Ctrl \
acts both as a modifier and Escape (typically you map Caps Lock to Ctrl). But this \
isn't really important for the current discussion, I just wanted to give another use \
case for a mechanism like ksuperkey.</p></pre>  </blockquote>








</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><blockquote \
style="text-rendering: inherit;padding: 0 0 0 1em;border-left: 1px solid \
#bbb;white-space: normal;margin: 0 0 0 0.5em;line-height: inherit;"> <p \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">I was just questioning whether it makes sense to make this part of what \
traditionally was "just a window manager".</p> </blockquote>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">we need to get over that: KWin is a compositor (and \
also a window manager) and yes for a compositor it makes sense to handle input as \
otherwise input redirection is not possible. It's just that on X11 the input \
redirection never matured. And on Wayland we need to consider the constraints of \
Wayland. Features like ksuperkey are impossible as nobody except the compositor has \
access to all key events. That's also the reason why kglobalaccel is merged into kwin \
on Wayland (but not on X11).</p> <blockquote style="text-rendering: inherit;padding: \
0 0 0 1em;border-left: 1px solid #bbb;white-space: normal;margin: 0 0 0 \
0.5em;line-height: inherit;"> <p style="padding: 0;text-rendering: inherit;margin: \
0;line-height: inherit;white-space: inherit;">I meant a similar mechanism as \
ksuperkey where Ctrl acts both as a modifier and Escape</p> </blockquote>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">allthough a little bit offtopic: I really think that's \
not what ksuperkey or this functionality is for, but that is what keymaps are for. If \
users want to have the key act as Escape: modmap it</p></pre> <br />










<p>- Martin</p>


<br />
<p>On August 27th, 2015, 6:04 p.m. CEST, Martin Gräßlin wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: \
1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; \
-webkit-border-radius: 6px;">  <tr>
  <td>

<div>Review request for kwin, Plasma and Hans Chen.</div>
<div>By Martin Gräßlin.</div>


<p style="color: grey;"><i>Updated Aug. 27, 2015, 6:04 p.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
kwin
</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">On popular demand!

This change tracks how modifiers are used and detects a modifier only
key press/release. That is:
* no other key is pressed when the modifier gets pressed
* no other key gets pressed before the modifier gets released

If such a press/release is detected, we call a configurable dbus call.
The possible shortcuts can be configured in kwinrc, group
&quot;ModifierOnlyShortcuts&quot;. The following keys are supported:
* Shift
* Control
* Alt
* Meta

As value it takes a QStringList (comma seperated string) with
service,path,interface,method,additionalargs

E.g. to invoke Desktop Grid effect on Meta key:

[ModifierOnlyShortcuts]
Meta=org.kde.kglobalaccel,/component/kwin/,org.kde.kglobalaccel.Component,invokeShortcut,ShowDesktopGrid


I do not intend to add a config interface for it. Let&#39;s keep it a hidden
way.</pre>
  </td>
 </tr>
</table>



<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>input.h <span style="color: \
grey">(cfb693dc06a18ea9ca7cffb99b9a1318ee443e3a)</span></li>

 <li>input.cpp <span style="color: \
grey">(92724d7b7559dd460a8f5fbe17deb3c72024eed6)</span></li>

 <li>options.h <span style="color: \
grey">(07c5193e3bd205c5c8c22a305f4c1d87e16d175f)</span></li>

 <li>options.cpp <span style="color: \
grey">(64269d64bc49640bf2e4e925ce1969f2a5d6b96b)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/124954/diff/" style="margin-left: \
3em;">View Diff</a></p>






  </td>
 </tr>
</table>







  </div>
 </body>
</html>


--===============0185146381109214985==--


[Attachment #3 (text/plain)]

_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic