Keyboard shortcut for "Close Tab/Window"

I recently switched to Fedora 34, because I really love the Gnome 40 UI. It’s a lot like macOS, only more consistent, and it works great with a laptop touchpad.

In macOS, Windows and Ubuntu, however, I am used to the Ctrl-W shortcut that closes the current tab, and if there is only one tab or the window does not have tabs, it closes the window instead. That doesn’t work in Gnome 40. (It works in LibreOffice and Firefox, but in most Gnome apps, e.g. Control Center, it does not work.)

Is there a way to make it work? I really don’t want to use two shortcuts, one for “Close Tab” and another one for “Close Window”. I tried to change the shortcut for closing windows to Ctrl-W, and that does actually work, but then Ctrl-W always closes the entire window, even if the current window has multiple tabs.

Tabs are under application control, so a shortcut to close tabs can’t be implemented by the system.

The contention is to use Ctrl-W as you describe, but it’s usually only implemented by applications that use tabs. That’s why it works in Files (nautilus), but not Settings (gnome-control-center).

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.