QA Graphic

Keyboard Maestro

Keyboard Maestro2

Last week I wrote about how awesome BetterTouchTool was. Well there was one thing missing - I wanted a way to run Unix shell commands from a key press. I wanted to have some Bash commands that I wanted executed when I clicked on the F19 key.

I discovered that there is another keyboard tool that bridges the "Unix Shell" gap - Keyboard Maestro by Stairways Software. This is far from a new tool on the market - it's been around for a long time.

Keyboard Maestro

With keyboard Maestro you can assign Unix commands to keys, something you can't do with BetterTouchTool. You can assign all sorts of actions to all your F keys, something that you can't do with TextExpander.

With Keyboard Maestro, I have now had a "random word" key. Anytime that I need a word, I simply press the "F 19" key. This makes testing so much easier, if I need a word, simply hit the F19 key.

Creating a "Random Key" Macro

Here's how to configure Keyboard Maestro so that you can have your own random key: (I assume that you downloaded the software and have it properly setup.)

  1. Click Command - N to create a new Macro
  2. Call it whatever you want, "Random Word" is a good choice.
  3. Click the green plus icon to add a New Trigger, and select the 'Hot Key' Trigger
  4. Type in any Key, F13 or F19 are good options, as well as the 'end' button.
  5. Click on the green Plus icon next to the 'New Action'
  6. With 'All Actions' selected in the Categories, search for 'Shell' and select the 'Execute a Shell Script'
  7. Click on 'Display results in a window' and change it to 'type results'
  8. Paste the following text in the text area box:
#!/bin/bash
WORDFILE=/usr/share/dict/words
RANDOM=$$;
lines=$(cat $WORDFILE | wc -l);
rnum=$((RANDOM*RANDOM%$lines+1));
sed -n "$rnum p" $WORDFILE | perl -pe 'chomp'
  1. Click Edit
  2. Try it out! You'll need to have the cursor in a text field, Why not try the browser search.

Random Word Tool

Why Use BetterTouchTool?

While Keyboard Maestro does a lot of similar things that BetterTouchTool does, I really like the screenshot capabilities in BetterTouchTool. I can capture screenshots superfast, simply by moving the mouse to the bottom right of the screen. Then I can edit the screenshot as needed. I have yet to see a "Move Mouse to Bottom Right Corner" trigger action in Skitch or Monosnap. Both are great tools and have their advantages but BetterTouchTool Trigger action is cooler and the Editor suits my needs.

BetterTouchTool isn't all that expensive, so it's worth keeping around. Perhaps they will add Unix Shell capabilities in future releases.

I am still a big fan of TextExpander and use it all the time. It's nice to see some other tools fill in some gap that I am looking for in a keyboard tool:

  • Ability to assign commands to all the keys on the extended Apple Keyboard (Availble in BetterTouchTool and Keyboard Maestro)
  • A decent built in screen capture tool. (Only in BetterTouchTool)

TextExpander does have a good suggestion tool - it notifies you when you type something over and over and suggest you make it a keyword snippet.

About Keyboard Maestro

Keyboard Maestro cost $36. You can download the software for 30 days trial. It's a very powerful Keyboard/Mouse tool. I certainly recommend checking it out.

 

About

A Mac veteran since 1989, I'm here to share my experience with tips and tricks every Friday. Witnessing the evolution of Mac software and hardware firsthand, I've gained a deep understanding of how these machines work and can help you troubleshoot any issues that may come up.

Schedule

FridayMacintosh
SaturdayInternet Tools
SundayOpen Topic
MondayMedia Monday
TuesdayQA
WednesdayAffinity
ThursdayBBEdit