Re: [Vala] Global key shortcuts



On 08/20/2016 04:43 AM, Michael Gratton wrote:
On Sat, Aug 20, 2016 at 4:33 AM, rastersoft <raster rastersoft com> wrote:
I'm working on a program that needs to respond to an specific key
always, so when I press it, it will show its window. How can I do it
from Vala? Is it possible to do that in a way compatible with wayland?
(let's say: register a DBus method to be called when that key is
pressed, or something like that...)

So even when the window is hidden or not focused or whatnot? That's more
of a desktop integration issue, isn't it? Maybe there is a FDO/XDG
method for registering them.


I don’t know, but this may be difficult with Wayland. I presume it is
necessary to either a) inject your program into the other program via
LD_PRELOAD or similar or to b) have the user add a keyboard shortcut to
the window compositor. I mean, isn’t isolating windows from each other
the whole point of Wayland?

Mumble uses LD_PRELOAD or a custom application launcher (`mumble-overlay
supertuxkart`) to put an overlay above the window [1]. Steam require
their application launcher I believe.

That said, it seems there is enough demand for this feature for an XDG
standard to exist. In particular, desktop environments like GNOME may
want to manage this as part of the preferences/permissions. I don’t know
about such a standard though.

[1] https://wiki.mumble.info/wiki/Overlay


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]