Add Ctrl+F4 as shortcut to close tab

Hi,
I’d like to suggest adding Ctrl+F4 as a shortcut to close the current tab.

Currently, under keyboard shortcuts in gnome only following options show up,

Hence, it has limitations to customize tab related keyboard shortcuts! :frowning:

This, as follow up of Add Ctrl+F4 as shortcut to close tab (#3453) · Issues · GNOME / Files · GitLab

The shortcuts are not nautilus specific, but it’s the GNOME HIG recommended shortcuts for all GNOME apps.

Action Shortcut Description
Close Ctrl+W Closes the current tab or window.
Quit Ctrl+Q Closes the app, including all its windows.

Refer: Standard Keyboard Shortcuts - GNOME Human Interface Guidelines

That said, the HIG also recommends Alt+F4 to close the current window as well as other Ctrl/Alt shorcuts related to tab/window management (Ctrl+Tab vs Alt+Tab), so I think Ctrl+F4 would be helpful in keeping with the Alt is for window management, and Ctrl is for within the app (ie tab) management.

Honestly, I don’t use either Ctrl+Q or Ctrl+W since those shortcuts are more of a Mac thing in my book, and the fact that they are so close to each other is another downside. I usually have to middle click on the Nautilus tab to close it to not risk losing the current state.

And that is before how much Ctrl+W is unintuitive, I can remember that “Q” means quit in English when I’m using a Mac, but I’d much rather be able to just Alt+F4 or Ctrl+F4 it.

There are other shortcuts that are unintuitive to a previous windows user, like Alt+# to go to a tab, instead of Ctrl+# as it is on Windows, but after some 8 years using linux I’ve forced myself to learn this new way.

As I mentioned in the issue, I tried to use python extensions to enable this in Nautilus, but it seems that some changes in the source code prevent it. I don’t know of any other Ctrl+F4 usages except for closing tabs, so AFAIK it wouldn’t clash with any existing app or specially Nautilus.

1 Like

Honestly, I think Ctrl+F4 to be uncomfortable for usage.

I prefer Ctrl+W and Ctrl+Q shortcuts. They have been used for several years, and there has been no complaints about the proximity of the shortcut keys. Primary reason I believe is because the keys (Q and W) are in a prime location (next to Tab, and the next key) where they are easily distinguishable from muscle memory:

  • little finger always rests on Tab key.
  • little finger + 1 (ring finger) rests on Q key.
  • little finger + 2 (middle finger) rests on W key.

This is compared to say E/R, R/T etc, which are easy for misuse (as they don’t have a reference key like the Tab key)

3 Likes

Firefox and Chrome also uses Ctrl+W to close tabs

1 Like

And considering that they implement both shortcuts to close tabs, I think adding Ctrl+F4 would be an improvement.

I have trouble with shortcuts E/R/T as well though haha, so the Ctrl, Shift and Alt modifiers are what make the difference for me. Alt is for window management, Ctrl for app management, Win and Win+Alt for system shortcuts. Within that framework, F4 is really ingrained with the “close” behavior, so adding Ctrl+F4 don’t seen to clash with any app that I know, and users that currently use Ctrl+W in Nautilus could continue using it as normally.

1 Like

Not able to edit, cannot update the tag! :frowning:

What would you like to update in tag?

Gnome HIG instead of nautilus

There is no HIG tag.

I’ve removed nautilus tag, so the topic is common to all GNOME apps.

I think that such discussions might be interesting, but pragmatically not very useful. Some of today-Linux-users are spoiled by long years spent with Windows :slight_smile:

Personally, I meanwhile use F11 for full screen, but still F3/Shift+F3 for find next/prev. And I stopped using Alt+X for closing applications only recently.

BTW, exit or quit? Once this was a hot discussion.

The only solution is customization (of programs), or re-education (of users) :slight_smile:

Can the Nautilus tag be readded? My initial gitlab issue was about it. The apps that I use that have tabs are Firefox, Nautilus, Ptyxis, Zed and gnome-text-editor. Considering the “close tab” shortcut is not even listed on the gnome-settings page, I’m not sure a syste-wide setting would be useful here.

  • Firefox and Zed already allows both Ctrl+F4 and Ctrl+W by default. They also aren’t gnome apps per se.

  • Ptyxis allows customization of shortcuts, so it is not affected by this.

For Nautilus and gnome-text-editor, I would like if both did as Firefox. But since I rarely use gnome-text-editor, and even less its multi-tab aspect, I don’t mind if Ctrl+F4 is not added.

Some of today-Linux-users are spoiled by long years spent with Windows :slight_smile:

I don’t really need per app shortcut customization, and framing this shortcuts discussion as being “spoiled by windows” doesn’t make sense, since Ctrl+W to me is being “spoiled by Mac”.

About “re-education (of users)” aspect, this seems like needless user-hostile behavior. Shortcuts are about UI as much as they are about accessibility. I have trouble with shortcuts that contain letter in the top roll (QWER) and having a less destructive (Ctrl+W) right next with a highly destructive (Ctrl+Q) shortcut is bonkers to me (like the Monsters vs Alien big red button scene).

Personally, I meanwhile use F11 for full screen, but still F3/Shift+F3 for find next/prev. And I stopped using Alt+X for closing applications only recently.

I use Enter/Shift+Enter to find next/prev, and avoid apps that don’t allow it. We are not in the 90s, and contextual shortcuts are a must in every text editor/reader app.

BTW, exit or quit? Once this was a hot discussion.

This seems to be still ongoing with the way gnome removed native support for tray icons and then added that useless “background apps” subsection of the top panel. But I don’t think it is really relevant here, since apps could just implement both shortcuts without affecting existing users.

Tab view and tab closure shortcut comes from libawaita. Adding extra keys only for 1 app makes little sense.

1 Like

Nope, I want it for other apps as well including gnome text-editor, VS Code and so on. So not only for nautilus but for most tab supporting app as a general customization option!