Why we should try to use a hammer less, an introduction to automation, how to make custom keyboard shortcuts in macOS

Neal Stephenson, in his essay, , “In The Beginning Was The Command Line” talks about how different interfaces have different strengths, and also weaknesses, a very entertaining and also instructive read. It’s only about 100 pages, so I strongly recommend it.

 In 1966, . Abraham Maslow (who was a key founder of humanistic psychology) said, “I suppose it is tempting, if the only tool you have is a hammer, to treat everything as if it were a nail.”

Four years earlier, Abraham Kaplan (who was a professor of philosophy) commented similarly; calling it “the law of the instrument”.

The English phrase, “a Birmingham screwdriver,” had been printed in British papers as far back as the 1860s. The idea that people take what is familiar or comfortable to them, and try to solve every problem with it, is probably as old as being a human. It’s considered a cognitive bias, and we’ve probably all done it; I know I still have some hammers in my workflows to this day, but some times they also slow us down in ways we don’t notice.

I remember my friend Eric Knapp saying when he taught a programming class to beginning freshmen students he would at least once a semester have to tell the class to always save their code by pressing command or control s. “I can save code three times faster from my keyboard than you can with your mouse through the file menu,” he said.

There are jokes about how a computer is just a dumb box of rocks, or how it’s a genie that does exactly what you tell it to even if that’s not what you actually wanted. A computer might indeed be a dumb box of rocks, but it still does repetitive tasks very fast, the way it can help us the most is by  saving humans a lot of time. If you’re reading this, you have some kind of computer, that includes smartphones and tablets. Having computers save lots of time is called automation, it’s great, and we all should be doing it. I talked about keyboard shortcuts earlier, that might be the simplest form of automation, find what tasks you use in your apps, and find a keyboard shortcut to do them. Memorize it, and use it. As Eric said, he could save code 3 times faster with command-s than with the mouse. Beyond just saving time, that means you might be more likely to save your code or document or whatever project you’re working on more often, which means in the end you will lose less data.

The problem with many developers, however, is that they have a hammer—I mean mouse, and they assume many others also use their hammer–mouse so they more often than I would like, forget to add more keyboard shortcuts to their apps. Way too often, I’ve asked someone how to do something, and they say “Grab the mouse…” Yes, keyboard shortcuts may be difficult for some to remember, but I’d rather have them even if I forget them then to not have them at all.

I haven’t used Microsoft Windows in over a decade, but here is where, within limits, you can  make custom keyboard shortcuts in Windows. Unfortunately making a keyboard shortcut for an exact feature inside of a program, is seemingly not supported much beyond Microsoft Word. Fortunately for macOS users, making custom keyboard shortcuts inside your favorite programs has been a feature for years, here’s how to do it.

In the Apple Mail program, there is a nice menu item called “Add Sender to Contacts”, however, it doesn’t have a keyboard shortcut. When I want to use this feature, I don’t want to go looking for it in the menu though, so let’s make one.

1. Go to the “Keyboard Preference Pane”

2. select the Shortcuts tab.

3. press tab once to get to the table of the keyboard shortcuts categories, and select the bottom most one, App Shortcuts.

4. press tab once to progress to the table of apps.

5. activate the Add button and move to the popup button next to it which will have an app selected.

6. for this example, press the popup button and select the mail app. Pressing ma may be enough to select mail, then press enter. I had to actually type mail completely, because I had other apps installed beginning with ma.

7. Move to the field called “Menu Title” and type or paste in the exact wording you found in the menu item you want to use. In this case, “Add Sender to Contacts” without the quotes.

I don’t know how to copy the text of a menu item as a sighted person, but VoiceOver has a nifty command control-option-shift-c that copies the last string VoiceOver spoke to the clipboard. I love that feature.

8. Progress to the “keyboard Shortcut” field and press the keys you want your keyboard shortcut to be. I used command-control-shift-c, but what you use is up to you, as long as it doesn’t conflict with some other keyboard shortcut on your system. For example, I couldn’t use command-option-c because that’s a global keyboard shortcut I have to make a new Drafts draft from the clipboard.

9. activate the Add button, and you’re done.

Now, when in the Apple Mail program, and someone sends you an email who you want to add to your contacts list, press your keyboard shortcut and breathe easier knowing you saved time not finding it in the message menu.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s