Add support for app-defined global keyboard shortcuts

This is unfortunately not a standardized feature. There is no standards-track Wayland protocol for it, and so far it exists only via the portal mechanism. However, a cursory look suggest that the gtk, wlr, xapp, and cosmic portals don't seem to support it, while the gnome, kde and hyprland portals do.

Hyperland has a global shortcuts protocol that I think is actually quite nice. It puts control fully in the compositor's hands: the app just says that it wants to register a shortcut, and it's up to the compositor to ask the user what the shortcut should be. The client doesn't even get/need to know what the shortcut is; the client gets events when the user presses and releases the selected shortcut keys. It maps well onto the portal's interface too.

There's also xx-hotkey-v1, which works similarly to how Windows, macOS, and X11 work, with the added ability for the compositor to reject a keybinding. I think that presents the best UX, but would require me to write a portal backend for it, unless someone else does. Also it's not been merged (and judging from some of the strangely-angry-sounding arguments against from some of the gatekeepers, it may not end up getting merged).

The lack of standardization on the compositor side is just annoying, and the fact that this is only standardized via the portal model (which is overly security-focused in a way that I don't think any user wants or needs) is frustrating.

Edited by Brian Tarricone