GNOME Bugzilla – Bug 751705
Allowing application developers to register keybindings
Last modified: 2019-03-20 11:27:40 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
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.
(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.
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.
-- 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.