Hacker News new | ask | show | jobs
by dgrealy 3451 days ago
One thing that bites me occasionally with the current browsers is when I'm closing a lot of tabs with cmd-w but go too far and accidentally close the last one and loose the window. Windows close with cmd shift w so this behavior makes sense to me.

I like your attention to those shortcuts though I think we have similar standards:)

3 comments

In a few apps on the Mac I have made good use of the Keyboard Shortcuts part of System Preferences to prevent this.

If destructive behavior is a bit too "easy" in an app, I remap the command to something complex. I think my Quit in Firefox for instance is now command-shift-control-Q or something.

Command shift T will bring back a window that has been closed (at least of Mac, I'm sure there's some macro on Windows).
It's CTRL-SHIFT-T on Windows but same idea.
The three browsers I use have command shortcuts that undo the accidental window closures.

Though I have to wonder how much resources are taken by the undo feature.

> accidental window closures

Really? Not just tabs. The danger is you have 5 tabs open, you only want one of them but you accidentally close all of them, now you've lost the window with the tab you wanted.

I'm not ek750, but this is true for both of the browsers I use regularly. In Chrome on OS X, Cmd+Shift+T reopens the last-closed tab, whether it was in a different/closed window or the one that is currently focused. In Firefox on Linux, Ctrl+Shift+T restores the last-closed tab in the currently focused window, and Ctrl+Shift+N restores the last-closed window.

I have both of these browsers configured to save my sessions and start from where I left off when I quit the application entirely. Both of them persist my closed tab/window history between sessions as well, so I can for example close my way out of 15 tabs across 2 windows, then reboot my laptop, then when I start my browser it will reopen whatever tabs/windows I didn't explicitly close and if I want to restore the ones I closed before the reboot I can use the restore shortcut(s) to get them back.