Global shortkeys and keyboard focus
Martin Peres
martin.peres at free.fr
Fri Jul 4 05:39:24 PDT 2014
Le 04/07/2014 09:58, Pekka Paalanen a écrit :
> On Thu, 3 Jul 2014 22:38:34 +0200
> Fabrice Rey <fabounet03 at gmail.com> wrote:
>
>> Hi all,
>> This topic came up in my previous one about window placement, and I'd like
>> to go further.
>> So currently there is no such thing as Global shortkeys and keyboard focus,
>
> Have you tried searching for the wayland-devel mailing list
> archives for hotkeys/shortcuts?
>
> I think there was a pretty decent plan, IIRC based on a conference
> presentation on something about security and global hotkeys, where
> clients register or subscribe to actions and compositors map global
> keys to them or such. We just haven't heard from it on the list
> since.
You have a good memory Pekka! You are referring to [0].
Peter Hutterer proposed a semantic approach to global shortcuts which
could partially address the issue.
I have not addressed the issue of global shortcuts in my blog article
about how to handle privileged clients [1] mostly because I haven't made
up my mind with it just yet.
However, I was looking into a KDE-like solution where a
compositor-exported application centralizes the global shortcuts. Any
application running could listen to semantic events such as
"play/pause". Applications may register new semantic actions. In this
case, application would request to add a semantic action + a default
shortcut for it. The compositor would then prompt the user to ask if the
application is allowed to add a semantic event with the default shortcut
proposed by the application. If no conflict exist,
the user could press "Add the shortcut", "Cancel", "Customize the
shortcut". If a conflict exists, only the last two would be allowed. If
the user presses the "Customize the shortcut" button, the compositor
would launch the global keyboard center to let the user add the shortcut
he/she wants. If the user wants to update the shortcuts, the application
should send a request for the compositor to launch the shortcut
application (this should be part of a semantic way of launching
applications, like: launch the default camera application, or launch the
calculator).
Some applications may actually want to be launched at a particular event
(run kcalc when pressing the "CALC" button on the keyboard). For those,
I'm not sure if the package manager should ask the compositor to add the
shortcut or add a file containing the new shortcuts defined and
their definition. In the latter case, the shortcut manager could detect
the added file and if there is a conflict, ask the user to deal with it.
These are my current thoughts on the matter, I would love to hear from
what you would like to have but as Steve said, I'm very busy at the
moment as I am writing my PhD thesis :s
Cheers,
Martin
[0]
https://www.youtube.com/watch?v=hJpiJii44oo&list=UUYhzLcUuRRyyhPqGxqr9E3A#t=2102
[1]
http://mupuf.org/blog/2014/02/19/wayland-compositors-why-and-how-to-handle/
More information about the wayland-devel
mailing list