On Keyboard Shortcuts

  • Posted on: 1 June 2014
  • By: John Franklin

I’m a command line guy, through and through. It comes from doing a lot of BSD and Linux system administration where there is no graphical interface. When I build a new Drupal site, the first thing I do is build a new Ubuntu server VM with no graphical interface and configure it all without ever touching the mouse. Adding packages, configuring them, setting up a fresh Drupal install, restarting the web server -- all easily done with a few commands and a good text editor. (Vim, if you’re wondering.)

When I’m working on the browser side of the equation, I’ll use keyboard shortcuts for most common tasks. It’s not that I have a hatred of rodentia input devices, it’s just that I can touch type, so staying on the keyboard can make my work go faster and smoother.

But, from time to time it causes grief, too. Most commonly from my old nemesis, Cmd-Q.

On the Mac, Cmd-Tab shifts between applications. Cmd-W closes a window. Cmd-A usually selects all. Hiding between those three is Cmd-Q, the universal “Quit Application” shortcut. I’ve lost count of the number of times I’ve tried to change apps or close one tab, but instead accidentally quit the browser and lost a score of tabs and everything I was working on.

Chrome has a nice feature you can enable that will warn you when you hit Cmd-Q and force you to hit it again or simply hold it down for a couple seconds to quit. Firefox, my current standard, does not have this. It used to ask if you want to ‘save all tabs,” and remember your preference so that you could set once and it’d use thereafter, but that’s been disabled for several releases now. Good riddance, too. Quitting the app changed from a keyboard shortcut to two steps and requiring the mouse, and I don’t remember where, or if, you could unset the preference. It may have been buried in Firefox’s “about:config” page.

While Firefox may not have a quit warning natively, there is a wonderful extension called warn-before-quit that does nearly exactly the same thing as Chrome’s built-in feature. Hit Cmd-Q and it notifies you that you have two seconds to hit it again to quit Firefox, otherwise the notice goes away and it stays running. That’s it. Like the most command line tools, it does one thing and does it well.

As a web developer tired of losing everything to a fat-fingered shortcut, this is my New Favorite Firefox Extension. If you do web development, research online, or otherwise live on the web, check it out. I bet It’ll become your favorite, too.