Hey folks, AFAIU you can now register new keyboard shortcuts from a shell extension, by providing the relevant gsettings schema and calling Main.wm.addKeyBinding to provide the handler for the binding. However, to make the key attached to the binding configurable through a UI, it seems that a a lot of (boilerplate) code is currently needed. As an example, look at the "Window demands attention shortcut" extension [1], which serves a single purpose: It adds a shortcut for jumping to the most recent active window. The actual extension is fairly simple, but it's accompanied by a 366-line prefs.js to build a settings panel with for configuring just one keyboard shortcut. [1]: https://github.com/awamper/window-demands-attention-shortcut/ Ideally, I'd expect these shortcuts to be integrated in gnome-control-center, just like all other keyboard shortcuts. Looking at gnome-control-center, it seems it loads the list of shortcuts to configure from xml files in /usr/share/gnome-control-center/keybindings/. Wouldn't it make sense to allow shell extensions to ship e.g. a keybindings.xml as well, and make gnome-control-center load those? It's probably more complicated than it sounds, since gnome-control-center doesn't necessarily have access to the listf (enabled) extensions, but that's probably solvable? Gr. Matthijs
Attachment:
signature.asc
Description: Digital signature