After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 751705 - Allowing application developers to register keybindings
Allowing application developers to register keybindings
Status: RESOLVED OBSOLETE
Product: gnome-settings-daemon
Classification: Core
Component: media-keys
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
Depends on:
Blocks:
 
 
Reported: 2015-06-30 09:31 UTC by Oliver Sauder
Modified: 2019-03-20 11:27 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Oliver Sauder 2015-06-30 09:31:34 UTC
It would be great for application developers to have the ability to register  keybindings for their application during installation which the user can then change as need to in the keyboard settings and gsd handles it.

This way the application doesn't have to implement any global hotkeys itself but can leave this up to the desktop environment which has already implemented this.

One option to do this would be for an application to register a custom keybinding. Currently custom keybindings are using relocatable schemas which can not be overwritten with gschema overrides. As described in Bug 725292 [0] this is also not really desirable to implement.

So therefore to allow application developers to register keybindings gsd would need to be adjusted.

I am available to create a patch to implement this in gsd but wanted to raise this report first to see whether there would be an interest to add such a feature and if yes to start a discussion what the best way to implement this would be (e.g. one option would be to expand the xml files located at /usr/share/gnome-control-center/keybindings/ but there might be better ways).


[0] https://bugzilla.gnome.org/show_bug.cgi?id=725292
Comment 1 Bastien Nocera 2015-07-01 18:46:44 UTC
This used to be possible, when we used GConf, but this isn't something we're interested in anymore, as it has security ramifications. The best way to fix this problem is to make the Keyboard panel better at adding application-defined shortcuts.

Florian or Hans might remember where we kept the public details of those discussions about Wayland (non-)implementation of application-defined global shortcuts.
Comment 2 Hans de Goede 2015-07-01 18:58:49 UTC
(In reply to Bastien Nocera from comment #1)
> This used to be possible, when we used GConf, but this isn't something we're
> interested in anymore, as it has security ramifications. The best way to fix
> this problem is to make the Keyboard panel better at adding
> application-defined shortcuts.
> 
> Florian or Hans might remember where we kept the public details of those
> discussions about Wayland (non-)implementation of application-defined global
> shortcuts.

Here is what my notes from our cross desktop wayland meeting say on this:

2) Global hotkey bindings

Offer a compositor API to replace passive keygrabs in X to allow apps to
register a global hotkey? Conclusion: No, global hotkeys can only be
configured / set through / by the compositor.
Comment 3 Oliver Sauder 2015-07-01 19:19:31 UTC
Makes sense that global hotkeys need to be set through the compositor so one place to register them and handle them to avoid conflicts.

What I would like to see is as you describe is to make the Keyboard panel better at adding application-defined shortcuts. This could happen through a xml KeyListEntry definition file or similar.
Comment 4 GNOME Infrastructure Team 2019-03-20 11:27:40 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnome-settings-daemon/issues/271.