How do you enable/disable global shortcuts in GNOME 48?

I’ve been using Fedora Workstation for a couple of years now, and I was happy to see global shorcuts coming to GNOME 48 under wayland. I usually will test the next version of Fedora in a VM before updating and I will also wait about a month after new releases of GNOME/Fedora in order for any major bugs to be worked out before updating. When I was trying out GNOME 48 in a VM, I got the global shortcuts popup on certain windows (ie: Discord, OBS etc.). However, after upgrading to Fedora 42 and GNOME 48, I haven’t ever seen a popup to enable global shortcuts in any applications. As far as I can tell, there isn’t any way to enable/configure these shortcuts within GNOME. There is probably a way to do it in the terminal, but since this a new feature I’m having trouble finding documentation on how exactly to remedy this issue I’m having. I’ve waited for quite a bit now thinking this was a bug that would get patched out, but I don’t see anyone else talking about this anywhere.

1 Like

Settings > Keyboard > Customize keyboard shortcuts.

For example, you can set Ctrl + Q to the “close window” action, and you will be sure that any application will be closed with Ctrl + Q

This is not what I am talking about with global shortcuts. Global shortcuts and keyboard shortcuts are two different things. I’m going to be simplifying this explanation quite a bit because I’m not a developer, and I don’t want to make it sound like I know everything about Wayland, X11 and how global shortcuts work.

In X11, applications are able to listen in on key presses which allowed shortcuts for the application to work even when they aren’t focused. This was useful for applications like Discord and OBS. In Discord as an example, you can have a push to talk, or toggle mute keybind set, and even if Discord isn’t focused, the keybind would still work outside of the application. In Wayland, keyboard presses are not passed through to applications unless they are focused (this is for better security). So, any time an application isn’t focused, keyboard shortcuts in that application will not be registered, even if they are supposed to/intended to be. Global shortcuts are the solution to this. Many Wayland compositors, mostly tiling window managers, have their own solution to pass certain key presses to applications even if they aren’t focused. GNOME hasn’t had an implementation for global shortcuts until GNOME 48 was released. As far as I can tell, the way it is supposed to work, is when an application is first opened that can (and should) utilize a global shortcut, it will prompt the user to edit these shortcuts. It’s not an elegant solution, I think if you skip this pop up there isn’t an easy way to do it again, and the only way to change the shortcuts is (supposed to be) in the settings menu under applications, but it’s not there if you ignore the prompt initially.

The issue I’m having is I have never been prompted to assign a global shortcut at any point when I open applications like Discord and OBS (where I want to have them) and there is no way to enable them within the settings application.

1 Like

The global shortcuts of an applications can be configured in the GNOME Control Center. Check the page for the application in question in the Applications category. If the application has registered global shortcuts, there will be a field to configure the shortcuts:

This is one of the issues that I have run into - this setting does not exist on my system.

Above is Discord as an example. Most of the application permissions on my system look like this, some of them have more permission toggles, but none related to global shortcuts. I have checked through the first few dozen listed applications, I have just over 100 installed applications, so I didn’t check through all of them, but I am certain it is not there on any of them. and at the bare minimum, there is no global shortcuts option on any of the applications I want to utilize them.

By the way, I am almost certain that I must be missing an essential package for Global Shortcuts to work within GNOME 48. As I have said before, there isn’t a lot of documentation on this feature yet, at least everywhere that I have looked. I have no idea which packages I would be missing if that is the case here.

To my knowledge, the global shortcuts are implemented by xdg-desktop-portal-gnome, which recieves the input from the shell.

So, it could be that xdg-desktop-portal-gnome is not installed.

Another possiblity might be that xdg-desktop-portal (the cross-platfrom API) is not configured to use GNOME’s portal for the shortcuts.
Documentation for the portal configuration is found here:

This is the wall that I ran into before. I don’t understand how the configuration for the xdg-desktop-portal backend works. I found the section on global shortcuts, but this seems to require a lot of context that I do not have.

1 Like

The page about global shortcuts you’ve found is the API, so this is only relevant for developers. The page I linked is about the configuration file.

Anyhow, I would first check that xdg-desktop-portal-gnome is installed.

If it is installed, other portals are working, but not the global shortcut one, you could check if the configuration files are in the right format. That being said, unless you have a manual override, the distribution-provided configuration should in theory be correct.

1 Like

Both xdg-desktop-portal packages are installed, but I have no idea where to even begin with checking the configs for this. It’s like I’ve said before, this is such a new feature, it’s been hard to find any information about configuration.

There is no configuration required to enable the portal. Either your applications are not capable of interacting with the global shortcuts portal, or they don’t interact with it the way you expect (e.g. require configuration of the requested shortcuts themselves before requesting them as global).

If you are certain that the global shortcuts portal itself is misbehaving (e.g. inspecting with dbus-monitor whether requests to the org.freedesktop.portal.GlobalShortcuts interface are made) please file an issue to xdg-desktop-portal-gnome in gitlab and CC me (user: @carlosg). If these requests are not made at all, this is on the application side.

1 Like

So, with the context you just gave me in mind, I made a fresh Fedora 42 VM and sure enough, the popup for global shortcuts doesn’t appear anymore in the applications that they used to. If I had to guess, the application developers removed the popup for global shortcuts and will potentially add it again in the future.

1 Like