Closed Bug 1692205 Opened 3 years ago Closed 3 years ago

Too easy to hit CTRL+Q instead of CTRL+W [linux][macOS]

Categories

(Firefox :: Keyboard Navigation, defect, P3)

Firefox 87
All
Linux
defect

Tracking

()

RESOLVED DUPLICATE of bug 1726736
Tracking Status
firefox87 --- affected

People

(Reporter: BenB, Unassigned)

References

Details

(4 keywords, Whiteboard: Workaround (FF 87+): set browser.quitShortcut.disabled to true)

+++ This bug was created as a clone of Bug #52821 +++

I frequently open new windows on almost every page i visit. Then I have a bunch
of browser windows to close. Several times recently I've hit the <ctrl>-q
rather than <ctrl>-w - which of course closes mozilla and loses all the context
I've set up. It would be nice to be able to disable the <ctrl>-w key so this
does not occur.

This is a long-standing bug 52821. That bug added a hidden preference, but that doesn't fix the problem for end users.

We already have a warning prompt when you close the window and there are multiple tabs open. That prompt is very annoying, because it's a common operation to open tabs, and it's obviously also a very common operation to close the window. That prompt shouldn't be there. It has a "[ ] Don't show this message again" option, which I always immediately enable for all new profiles, and even for novice users that I set up Firefox for. Firefox tabs are fairly unusable with that prompt enabled.

OTOH, as said above, hitting Ctrl-Q instead of Ctrl-W is very easy and usually not intentional. There, a warning is very much warranted and needed. If somebody really wants to use that keyboard shortcut, he could easily check "[ ] Don't show this message again" option (even with the keyboard, and only once per profile, it's only 2 keystrokes). But new users will be protected from htting this this destructive keystroke by accident.

The pref added in bug 52821 protects only those users who have already been hurt by this bug, probably multiple times, and are so annoyed and upset that they are actively searching for a solution, e.g. on Google. This is not good. We need to protect people from accidentally hitting this destructive keystroke, either by entirely removing or changing the shortcut, or by showing a warning. Those who really really want it just need 2 keystrokes to remove the warning, but everybody else is going to be protected.

This has been annoying so many people. Please fix it properly for everybody, not only those who are upset enough to actively search for a solution.

I saw a suggestion somewhere to change CTRL+Q to CTRL+SHIFT+Q. Maybe that would be an idea?

(In reply to Ellie from comment #1)

I saw a suggestion somewhere to change CTRL+Q to CTRL+SHIFT+Q. Maybe that would be an idea?

I wish this change would be optional (either opt-in or opt-out) as most apps use Ctrl+Q and I am use it it. Also K am a touch typist and I know by touch what key I am about to press.

That said, I wish one could configure each and every keyboard shortcut for each and every command in Firefox. By that I am enable, disable lr override, but also setting a particular keyboard shortcut to a different command or an extension action, which is currently not possible. That way one could set even the quit action to any keyboard shortcut one likes and use the default shortcut for anything else.

(In reply to Ben Bucksch (:BenB) from comment #0)

Firefox tabs are fairly unusable with [the warn before closing multiple tabs] prompt enabled.

hitting Ctrl-Q instead of Ctrl-W is very easy and usually not intentional.

This has been annoying so many people.

All of these are opinions with no supporting data. cmd-q is the standard shortcut to quit applications on macOS, and ctrl-q is quasi-standard on Linux. On Windows, the shortcut is Ctrl-Shift-Q which is harder to mis-hit when just closing tabs. Windows is also where most of our users are and so the supposition that this "has been annoying so many people" (also given that shortcut use isn't as common as that supposes, and that closing Windows is more commonly done with alt+f4 there) is implausible.

I approved Tom's patch exactly because it doesn't affect the status quo (though it already adds maintenance costs), but frankly, I think any movement here has to come from a concerted UX effort to improve the experience as a whole, and stopgap solutions like trying to somehow come up with yet another, additional dialog to warn people, are a no-go.

But new users will be protected from htting this this destructive keystroke by accident.

... or wonder why Firefox doesn't work properly when activating standard shortcuts. We're not going to enable this preference by default.

Also, you've been here long enough to know how to use bugzilla, Ben -- in future please do not clone the bug, keeping all the references and the entire CC list, spamming tons and tons of people. (Fixed the dep list, but mass-removing people from CC isn't possible, so...)

No longer blocks: 73812, tb-keyboard-tracker
Severity: normal → --
No longer depends on: 1325692, 550559
Keywords: helpwanted
Priority: P5 → --
Summary: Too easy to hit CTRL+Q instead of CTRL+W → Too easy to hit CTRL+Q instead of CTRL+W and don't want to use browser.quitShortcut.disabled
Whiteboard: Workaround: https://addons.mozilla.org/firefox/addon/disable-ctrl-q-and-cmd-q/ (WebExtension for Firefox 57+) (Gnome/linux - use Keyboard application to add custom shortcut handled by Ctrl-Q) || Workaround Gnome-Linux: Open Keyboard application and add c…

Just for reference, Chromium had the default shortcut Ctrl-Shift-Q for some time but for a couple of year(s?) it has been removed completely in favor of Alt-F to activate the overflow menu (3 dots) and then press X to choose 'Exit'.

and ctrl-q is quasi-standard on Linux.

Do you have any supporting data?

In my experience Linux and Windows mostly share keyboard shortcuts, so I'm used to Alt+F4 on Linux, too. Some WMs also have a global shortcut to send a quit event to the active application, so no there's even less need to implement a custom quit shortcut than on Windows.

Severity: -- → S3
Keywords: blocked-ux
Priority: -- → P3
Keywords: parity-chrome

Windows ... closing windows is more commonly done with alt+f4 there

Not sure whether the problem here is clear. The problem is exactly that the user did not intent to close the app nor window (Alt-F4 on Windows, as you say), but to close the current tab (Ctrl-W), and accidentally closes all windows at once (Ctrl-Q - right next to Ctrl-W), without session storage, irreversibly killing all open tabs (data loss).

opinions with no supporting data

That's easy to say, given that bug reporters and affected users have no way to generate any such data. (And you didn't present any, either.)

The bug had 125 CCs, 94 votes, 320 comments, lots of DUPs, and tons of upset users on the bug. Despite it being open for 20 years (!), people keep complaining about it. The problem is not going away by just ignoring it.

[Other apps]

No other application has this usage profile. How many other apps have 500 tabs open at the same time? I know no other app like that. Or users close tabs using Ctrl-W maybe a 100 times a day? If I accidentally hit Ctrl-Q just once, I lose all my open tabs.

concerted UX effort

So, who's responsible for the UX these days?

See e.g. bug 52821 comment 194 (just one of many testimonials):
"I usually jump in on these [bugs] when my wife (way not power-user) starts cursing Mozilla, so here I am. :)"

and don't want to use browser.quitShortcut.disabled

(I'm going to just assume that you didn't read my description carefully enough, instead of assuming ill-intent of intentionally mis-representing the problem.)

It's not about people who don't want to use browser.quitShortcut.disabled pref, but people who don't know about the pref.

Summary: Too easy to hit CTRL+Q instead of CTRL+W and don't want to use browser.quitShortcut.disabled → Too easy to hit CTRL+Q instead of CTRL+W

I thought I would add a large, though qualitative, data point and a few comments.

We already have a warning prompt when you close the window and there are multiple tabs open. That prompt is very annoying, because it's a common operation to open tabs, and it's obviously also a very common operation to close the window. That prompt shouldn't be there.

It absolutely should be there.

It has a "[ ] Don't show this message again" option, which I always immediately enable for all new profiles, and even for novice users that I set up Firefox for. Firefox tabs are fairly unusable with that prompt enabled.

Have you considered not making that profile change and seeing how your users get on? Perhaps that is something that should be their choice to do after they have gotten a feel for the browser.

I've spent a couple of decades now taking care of computer labs at a large university. I've seen the history of web browsers (all the way back to NCSA Mosaic) used by complete novices and experts and everyone in between. The usage pattern of many browser windows open may once have been common (I did it that way) but now is vanishingly small. Users are more likely to have multiple instances of one browser (different profiles) or multiple different browsers open than multiple windows of one instance.

I'm going to summarize Firefox's behaviour (78.7 ESR on Linux) when quitting, by Ctrl-Q or closing the window:

Pref Settings Result of Quit Command
fresh profile warning dialog
restore previous session close without warning
restore + warn when quitting warning dialog
warn when quitting (no restore) * warning dialog

* can only be set by setting restore, then setting warn, then unsetting restore

As far as I am concerned the addition of a setting to disable ctrl-q entirely - something that is perfectly reasonable to have "hidden" - means this bug is resolved. Keep in mind that you will be able to set browser.quitShortcut.disabled as well as the existing browser.sessionstore.warnOnQuit and browser.warnOnQuit via policy.

This is a bug filed against Firefox and shouldn't be tracked against a Thunderbird bug, as any fix would be independent, so removing that dependency again. If TB has the same issue, file a bug against TB.

(In reply to Ben Bucksch (:BenB) from comment #6)

Windows ... closing windows is more commonly done with alt+f4 there

Not sure whether the problem here is clear. The problem is exactly that the user did not intent to close the app nor window (Alt-F4 on Windows, as you say), but to close the current tab (Ctrl-W), and accidentally closes all windows at once (Ctrl-Q - right next to Ctrl-W), without session storage, irreversibly killing all open tabs (data loss).

You removed the part of my comment where I explained that this doesn't happen on Windows, where most of our users are, because the quit shortcut is ctrl-shift-q, which isn't "right next to" ctrl-w. It's next to ctrl-shift-w, which closes windows, but if you're a Windows user you are probably more likely to close windows with alt+f4 than ctrl-shift-w.

opinions with no supporting data

That's easy to say, given that bug reporters and affected users have no way to generate any such data.

They do, you could submit a patch to gather telemetry on the use of the existing warning dialogs. Or gather data on which linux apps are most commonly installed (presumably apt and yum and whatnot have these kinds of statistics?) and what quit shortcuts, if any, they support (or which WMs have a quit app shortcut by default), and/or if they warn if you use them. Or run an unbiased (that part is going to be tricky...) qualitative survey to see how many people perceive this as an issue.

(And you didn't present any, either.)

I pointed out this objectively isn't an issue for most of our users. Most of them (90+%) are on Windows, where this problem just doesn't happen, and most of the rest are on macOS, where again cmd-q is considered normal behaviour and supported by pretty much every app under the sun. This is all public data, by the way, to which you too have access - https://data.firefox.com/dashboard/hardware .

In terms of further data: I would be exceedingly surprised if "most" users turned off the warning dialog for closing multiple tabs that already exists, just because you turn it off. Data we have shows that most people (well over 90%; I'd have to doublecheck but probably around 98%) don't turn on session restore, either. So the data we have suggests that this is a minority issue - of course, we don't have direct data about how many people "meant to" quit the browser when they did, because sadly mind-reading is not yet in our featureset...

No other application has this usage profile. How many other apps have 500 tabs open at the same time? I know no other app like that. Or users close tabs using Ctrl-W maybe a 100 times a day? If I accidentally hit Ctrl-Q just once, I lose all my open tabs.

500 tabs puts you in like the 0.00001% cohort of users, and that's before we've talked about turning off the multiple-tab-close warning dialog and being a heavy keyboard shortcut user (though there's probably overlap on that last one).

concerted UX effort

So, who's responsible for the UX these days?

I don't think this problem is big enough to justify UX attention right now - unfortunately, they're under-resourced as it is and we have bigger fish to fry. We recently considered looking at the existing warning dialog for closing multiple tabs, and even there decided not to make any changes for now because we just don't have the resources to attack the whole problem. This one feels related but has much less impact.

(I'm going to just assume that you didn't read my description carefully enough, instead of assuming ill-intent of intentionally mis-representing the problem.)

It's not about people who don't want to use browser.quitShortcut.disabled pref, but people who don't know about the pref.

I apologize for my bad phrasing, but my point was that there is a workaround and it should be in the summary. People will search the internet and find the pref, if it really annoys them, just like they've found the add-ons before the pref. Putting it right at the top of the page will make that easier. I've tried again, hopefully this is better.

(In reply to Jan Niklas Hasse from comment #5)

and ctrl-q is quasi-standard on Linux.

Do you have any supporting data?

Sure, google "quit app shortcut linux" and it's literally in the call-out box at the top of the results. Same thing on duckduckgo (which gets it from a different source, even!).

In my experience Linux and Windows mostly share keyboard shortcuts, so I'm used to Alt+F4 on Linux, too.

This closes just one window, it doesn't quit/exit the entire app.

No longer blocks: tb-keyboard-tracker
Severity: S3 → N/A
Type: defect → enhancement
Priority: P3 → P5
Summary: Too easy to hit CTRL+Q instead of CTRL+W → [linux][macOS] Quit shortcut should be changed/disabled, or warn when used, by default (workaround on Firefox 87 and later: set browser.quitShortcut.disabled to true)

Oops, I thought the priorities were from the cloned bug, didn't realize Dão set them, so I'm reverting my change. Apologies for the bugspam.

Severity: N/A → S3
Type: enhancement → defect
Priority: P5 → P3

(In reply to :Gijs (he/him) from comment #9)

Oops, I thought the priorities were from the cloned bug, didn't realize Dão set them, so I'm reverting my change. Apologies for the bugspam.

I didn't have the full picture. jmgonk and you make good points. That said, I already assumed that we'd only be talking about macOS and Linux at this point, and I think parity with Chrome is compelling here.

I didn't realize that the shortcut is different on Windows, I didn't understand that in your earlier comment, sorry. I've tried to change the metadata to clarify that.

There are several possible solutions to that problem "Too easy to hit CTRL+Q instead of CTRL+W", and I do not want the bug subject to impose solutions, just state the problem. But whatever is the solution, the solution should work before people run into the bug and lose data. We shouldn't let users run into such problems and lose data 10 times, until they are so annoyed and upset that they actively search for a solution.

OS: All → Linux
Summary: [linux][macOS] Quit shortcut should be changed/disabled, or warn when used, by default (workaround on Firefox 87 and later: set browser.quitShortcut.disabled to true) → Too easy to hit CTRL+Q instead of CTRL+W (Linux/Mac)
Whiteboard: Workaround (FF 87+): set browser.quitShortcut.disabled to true
Summary: Too easy to hit CTRL+Q instead of CTRL+W (Linux/Mac) → Too easy to hit CTRL+Q instead of CTRL+W [linux][macOS]

Another fun way you can shoot yourself in the foot: when you have a terminal in a browser tab (yes, that happens), and hit CTRL+S to freeze the screen (XOFF), and later hit CTRL+Q to unfreeze (XON) and... you just closed the browser.

(In reply to Mike Hommey [:glandium] from comment #12)

Another fun way you can shoot yourself in the foot: when you have a terminal in a browser tab (yes, that happens), and hit CTRL+S to freeze the screen (XOFF), and later hit CTRL+Q to unfreeze (XON) and... you just closed the browser.

That happened to me too, but with Ctrl+W in nano (shortcut to search the open file).

That said, IMHO that this is a different issue and it should be solved separately by prohibiting any browser shortcut when one focuses a webconsole, with a special key (e.g. right Ctrl) to toggle this behaviour (just like VirtualBox or Remmina does).

(In reply to Mike Hommey [:glandium] from comment #12)

Another fun way you can shoot yourself in the foot: when you have a terminal in a browser tab (yes, that happens), and hit CTRL+S to freeze the screen (XOFF), and later hit CTRL+Q to unfreeze (XON) and... you just closed the browser.

Surely any user advanced enough to be using a terminal in a browser tab is capable of configuring some combination of the exposed preferences (see my table in #7, but also see the important note below) or setting the new browser.quitShortcut.disabled to true?

* Important note: the results in the table only apply when multiple tabs are open. Ctrl-q always quits without warning if just one tab is open. That is certainly not obvious from the prefences UI and probably a separate issue. Anyone else have thoughts on if it is relevant to this issue?

The most obvious way to involuntarily hit CTRL+Q is using CTRL+W and missing, not really terminal or advanced use related. So this affects casual users.

(In reply to Ellie from comment #15)

The most obvious way to involuntarily hit CTRL+Q is using CTRL+W and missing, not really terminal or advanced use related. So this affects casual users.

Yes but by default if you ctrl-q with more than one tab open Firefox will ask if you are sure you want to close multiple tabs and quit. See the table in comment 7. I guess the questions are: what usage patterns are not resolved by existing preferences plus the new ctrl-q disable setting, and what is a reasonable solution?

(In reply to jmgonk from comment #16)

(In reply to Ellie from comment #15)
I guess the questions are: what usage patterns are not resolved by existing preferences plus the new ctrl-q disable setting, and what is a reasonable solution?

IMHO:

  • the users should have an option (in the Preferences) to change or disable any and all keyboard shortcuts, be it default (used by Firefox itself) and/or those of the user-installed extensions;
  • there should be a way to disable all keyboard shortcuts at runtime (by a website with user permission or by user) for a particular website (or just a webpage), either by rule or only for specified time (e.g. only when using a webconsole, or when in fullscreen); then the keyboard shortcuts should be processed by the webpage.

I believe this is fixed by bug 1726736.

Flags: needinfo?(enndeakin)

Yes, there is now a preference in General -> Tabs to warn on pressing the keyboard shortcut.

Status: NEW → RESOLVED
Closed: 3 years ago
Flags: needinfo?(enndeakin)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.