Automate Your Input Devices

We’ve talked about your keyboard already, and we return to it in several future chapters. But I want to take a moment to talk about other input devices, such as the one you use to move your pointer, as well as game controllers and other special-use input devices.

Remember when every Mac came with a one-button mouse? Now buttonless multi-touch trackpads and Magic Mice (with no visible buttons) are de rigueur, but it’s still easy to find third-party mice, trackballs, and other input devices with numerous configurable buttons, wheels, and other controls. Even Apple’s minimalist pointing devices can be configured to do special things with gestures and combinations of modifier keys and clicks.

Every extra button or control on an input device can be put to some good use. Although you need not use anything other than a simple keyboard and a pointing device with a single button, you may—depending on your needs, tasks, and disposition—find it easier and quicker to do certain tasks via a dedicated button or knob than with an obscure menu command or keyboard shortcut.

Would you indulge me in a brief story?

I used to manage software development for Kensington, a computer accessories company. One of our products was a four-button trackball called Expert Mouse (or, in some variants, Turbo Mouse). I shared a large office we called the Mouse Lab with three other people—Cris, Debra, and Don. One afternoon when we all should have been busy with more productive tasks, we made up a game that, while goofy, illustrates the kind of thing you can do with a bit of clever automation and a few extra buttons on your input device.

We each started by making rules in Outlook (our email program) to play unique sounds whenever we received an email message from one another. For example, when I received a message from Don, my computer went Zing! but when Debra sent me a message, it went Pop! Everyone had a custom sound for each other person in the room.

Next, we configured MouseWorks (the software, since superseded by TrackballWorks, used to control our trackballs) so that each of the three extra buttons—besides the one used for a regular click—sent one of the others a blank email message.

Is your head spinning yet? Well, here’s the result of our labors. I click button #2 on my trackball and Don’s computer makes a Crack! sound. Don clicks button #3 on his trackball and Debra’s computer makes a Ping! sound. Cris clicks button #4 on his trackball and my computer makes an Oof! sound. And so on. So we spent half the day zapping each other with our trackball buttons. You had to be there, I guess, but it was hilarious, like a virtual pillow fight.

That’s not a useful example of automating input devices, I admit. But perhaps it will inspire you to think up customizations that will make you more productive.

Use Trackpad and Magic Mouse Gestures

If you have a Mac laptop with a built-in trackpad, or a standalone Magic Trackpad, you have at your disposal a device that supports not just moving the pointer and clicking, but also scrolling, switching apps, displaying contextual menus, zooming, and numerous other actions by way of gestures such as swiping, pinching, and tapping (with one or more fingers). Apple’s Magic Mouse also has a multitouch-capable top surface with support for many (but not quite all) of the same actions.

You must configure your trackpad or mouse with the gestures you want to use—that’s the easy part. The harder part is training your fingers to perform these gestures until they become second nature.

To set up your multitouch trackpad or Magic Mouse:

  1. Open the Trackpad (Figure 22) or Mouse pane of System Preferences, depending on which device you’re using.

    Figure 22: The Trackpad pane of System Preferences has numerous options for configuring taps and gestures.
    Figure 22: The Trackpad pane of System Preferences has numerous options for configuring taps and gestures.
  2. In each view (Point & Click, More Gestures, and—for trackpads only—Scroll & Zoom), hover over a gesture to display a video demonstrating how it works.

  3. To enable a gesture, select its checkbox.

  4. Some gestures have multiple options—use the pop-up menu under the gesture name to specify your preference. For example, in the More Gestures view of the Trackpad pane, the Swipe Between Full-Screen Apps gesture can be performed by swiping left or right with either three fingers or four fingers.

  5. Practice the gestures you’ve just configured! You may find it helpful to create a little cheat sheet with the gestures and settings you’ve chosen (e.g., “4 L/R to switch apps”) until you’ve memorized them.

As you use gestures, you’ll find them increasingly natural—and it will drive you crazy to use a Mac with different settings!

Use BetterTouchTool

Unfortunately, Apple’s preference panes offers no way to assign custom actions to trackpad and mouse gestures—you can’t, say, swipe left with three fingers to run a script. If you want to do that sort of thing, you need an incredibly powerful and customizable app called BetterTouchTool, which lets you configure almost any combination or sequence of taps, clicks, and swipes (with one or more fingers) to perform keyboard shortcuts, menu commands, and a wide variety of other actions.

BetterTouchTool (Figure 23) has such a huge variety of features that it would take dozens of pages even to hit all the main points. It’s an app that certainly rewards exploration and experimentation, however.

Figure 23: Trackpad gestures configured in BetterTouchTool.
Figure 23: Trackpad gestures configured in BetterTouchTool.

The usual workflow is to add or select an app (or All Apps) in the sidebar first, which specifies where the gestures you set up will operate. (While you can use the same gesture to mean different things in different apps, I find that excessively confusing.) Next, select an input device using the pop-up menu at the top of the window—that can be a mouse, trackpad, keyboard, Touch Bar—or even a Siri Remote. Then you add a gesture for that device, such as “Pinch With Thumb And 2 Fingers.” Finally, you specify what should happen when you perform that gesture in that context.

Beyond that, here are some useful things to know:

  • Among the many gestures you can use are taps, swipes, pinches, and force presses with various numbers of fingers; sequences of taps; sequences of keystrokes; freeform gestures you “draw” yourself; and moving your pointer to a particular corner of the screen.

  • The activities BetterTouchTool can trigger when your chosen gesture is performed include nearly anything you can think of, which includes menu commands, keyboard shortcuts, mouse clicks, AppleScripts, Automator workflows, shell scripts, window manipulation, and switching apps, as well as many, many others.

  • A gesture can also trigger a sequence of actions. Which is to say: BetterTouchTool can function as a macro utility, somewhat along the lines of Keyboard Maestro. (See Use a Macro Utility.)

If that sounds intriguing, you can download a 45-day free trial of the app to play with before making a purchase commitment.

Customize Your Touch Bar

Do you have a MacBook Pro with a Touch Bar? If so, you have yet another customizable input device at your disposal. I mentioned above that BetterTouchTool enables you to add Touch Bar gestures. But even without any extra software, you can tweak your Touch Bar’s behavior to make it more useful.

To customize your Touch Bar:

  1. Go to System Preferences > Keyboard > Keyboard (Figure 25).

    Figure 24: You can customize Touch Bar behavior here.
    Figure 24: You can customize Touch Bar behavior here.
  2. From the “Touch Bar shows” pop-up menu, choose one of the following (your options may vary depending on your version of macOS):

    • App Controls: This is the default setting, which shows different context-dependent controls as appropriate for the frontmost app. When this is selected, you can optionally check Show Control Strip to display an expandable set of icons on the right for things like brightness, volume, and search.

    • Expanded Control Strip: This view shows all the icons (13 by default) on the Control Strip all the time, as opposed to just when you expand the strip when App Controls, Quick Actions, or Spaces is selected.

    • F1, F2, etc. Keys: This setting displays the function keys that appear on non–Touch Bar Mac laptops. So, if you’re not much of a Touch Bar fan, you might use this to approximate what your keyboard would be like without one.

    • Quick Actions: Quick Actions are Automator actions you create (or download) to perform specific tasks; I say more about these in Create Your Own Service. You can display your Quick Actions pm the Touch Bar with this setting. (To configure which Quick Actions appear, go to System Preferences > Extensions > Touch Bar and select or deselect items in the list there.) With this option selected, you can also optionally check Show Control Strip to display the Control Strip on the right side of the Touch Bar.

    • Spaces: Choose this option to display buttons on the Touch Bar representing each Space you’ve set up on your Mac, for easy switching.

  3. Regardless of your setting from the previous step, you can configure the Touch Bar to show a different set of options when you hold down the Fn key: from the “Press Fn key to” pop-up menu, choose one of the other options listed above.

  4. If either your main or alternate Touch Bar display includes the Control Strip, you may want to customize which icons it includes. To do this, click Customize Control Strip. Then drag icons from your screen all the way down onto your Touch Bar. Then click Done.

Save Clicks with Third-Party Input Devices

In Apple’s design aesthetic for pointing devices, even a single visible button is considered excessive. But some people like having lots of buttons, and if you find it easier to remember “click the second button from the left” than “swipe down with three fingers” do perform a particular action, a third-party device might be just what you need.

During the time I worked at Kensington, we had a trackball model (Turbo Mouse Pro) with 11 buttons and a trackpad (WebRacer) with 22 buttons—all programmable! Those models have been discontinued, but companies like Kensington, Logitech, and Microsoft still sell mice and trackballs with multiple buttons that you can customize. In some cases, you can also customize scroll wheels and other controls.

An obvious use for an extra button is to perform a double-click. (Recall that, all things being equal, less clicking is preferable.) If you have your hand on your pointing device most of the time anyway, perhaps a finger naturally falls on an “extra” button that can serve this purpose. You might also use buttons for frequent operations such as Undo, Cut, Copy, Paste, switching apps, and so on.

Most third-party input devices come with software that lets you customize the controls. Kensington trackballs come with TrackballWorks, Logitech pointing devices come with Logitech Control Center, and Microsoft mice…somehow, even in 2018, include software only for Windows. But no matter, you can still customize them with a third-party utility called USB Overdrive, discussed next.

Other actions you can potentially assign to mouse buttons include:

  • Right-clicking, Control-clicking, or clicking with other virtual modifier keys

  • Triple-clicking

  • Drag lock (drag without holding down a button)

  • Opening apps, documents, URLs, and AppleScripts

  • Sending keystrokes (as if you’d typed keys on a keyboard)

  • Navigating forward/back in a web browser

  • Controlling your system’s volume, brightness, and other settings

  • Simulating previous/next/pause/play commands in Music or iTunes

Program an Input Device with USB Overdrive

Many fine input devices come only with Windows software (or in some cases, no software at all), but thanks to a piece of shareware called USB Overdrive, Mac users can fully configure nearly any USB mouse, trackball, keyboard, gamepad, joystick, or other HID (human interface device) product—as well as most Bluetooth pointing devices. The app functions in much the same way as TrackballWorks and Logitech Control Center—pick a device, pick a button, pick an action for that button; repeat as needed.

If you were so inclined, you could get, say, a Logitech Extreme 3D Pro joystick and program each of its 12 buttons, each of the 8 directions on its hat switch, the throttle control, the joystick directions, and the twist rudder control to do something different on your Mac. Of course, the obvious use would be to program all the controls to work in a game such as a flight simulator, but I’m just saying…if you wanted each button to send a different person a blank email message that resulted in a sound playing on their computer, you could.

Learn About Other Special Input Devices

I’ve mentioned multi-button mice and trackballs, programmable trackpads, extra keyboard keys, gamepads, and joysticks as examples of user-configurable input devices. In addition, just about any other USB or Bluetooth input device can be connected to your Mac, and if it doesn’t happen to come with its own software, you can likely use USB Overdrive to program its actions.

A few examples of the many special-purpose devices that you might consider are:

  • The iGrip Ergonomic Keyboard looks more like a game controller than a keyboard, and indeed it can serve in either capacity (and as a pointing device).

  • The Leap Motion controller is an infrared sensor that detects the positions of your hands and fingers in the air and lets you perform nearly any action with a gesture. Guess which gesture I’ve assigned to Force Quit.

  • Pageflip pedals let you turn the page of sheet music (forward or backward) when viewing it on a screen rather than on paper.

  • RollerMouse products use a horizontal bar, positioned in front of your keyboard, that both rolls around its axis and slides back and forth to move your pointer. They also feature buttons for left-, right-, and double-click, plus Copy and Paste.

  • Piano-style keyboards connected directly to a USB port or via a MIDI interface can be used not only for playing music, but also for triggering other actions depending on the key(s) pressed.

  • X-keys input devices from P.I. Engineering include crazy keyboard- and keypad-like button arrays, with or without an analog joystick or jog & shuttle control, foot pedals, and other switches.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset