Use of Orthogonal Design in Keyboard Maestro

I can deduce your meaning of “orthogonality” from the context, but when I look up the definition of this word, I’m not sure how it applies. I’m asking because I’m actually curious - I’m not trying to be a jerk. I love learning new terms like this. So can you help me understand your usage of this word? Thanks.

By the way, I much prefer the way KM does things. Give me the tools to build what I need - that’s exactly what I want, and it’s the main reason I love KM.


Sure. The way I am using it (and it may be my maths background) is that (in theory) each part of Keyboard Maestro is designed to do something that behaves in a different direction to each other. But not just somewhat different. At right angles (hence the term orthogonal). That is, each part should do what it does, and nothing of what something else does.

So this is an example of two ways of make available the functionality of “Type ‘x’ five times”:

  • Have an action that types a key, and an option in it to repeat the key multiple times.


  • Have an action that types a key
  • Have an action that repeats other actions

The first action does nothing about repeating, and the second action does nothing about typing.

This is one of the guiding principles of Keyboard Maestro. It does not apply just to actions, but to everything.

  • Macro Groups control when macros are active - macros have no configuration for when they are active.
  • The Engine does that actions, the Editor does the macro editing.
  • Triggers control what is required to fire a macro, but they don’t affect the actions that happen afterwards, or control when the macro is active.
  • Functions and Tokens can be used in all sorts of actions, but don’t depend on the action they are in.

And so on.

Now, anyone will see that this principle is not applied absolutely in all ways.

  • Insert Text by Typing and Type a Keystroke overlap in functionality.
  • The Activate Application action has extra functionality for hiding or quitting an application.
  • Macros can be disabled.
  • The engine can disable macros.
  • Insert Text’s behaviour can depends on the Typed String trigger.
  • Some functions are context sensitive, based on the action that contains them.

And so on.

But the principle applies generally. This allows me to add new things that are orthogonal to all others, that lets me add power that becomes available without adding complexity when learning.

So the principle is an important part of keeping the complexity level of Keyboard Maestro at a minimum while adding an ever increasing amount of available power.

1 Like

Peter, if I understand your notion correctly, the part about “right angles” doesn’t make much sense to me, but the part about separation of functionality makes great sense. Does this Wikipedia article capture your notion?

The number of independent primitive concepts has been minimized in order that the language be easy to describe, to learn, and to implement. On the other hand, these concepts have been applied “orthogonally” in order to maximize the expressive power of the language while trying to avoid deleterious superfluities.[11]

Orthogonality is a system design property which guarantees that modifying the technical effect produced by a component of a system neither creates nor propagates side effects to other components of the system. Typically this is achieved through the separation of concerns and encapsulation, and it is essential for feasible and compact designs of complex systems.

I think this short article about orthogonality in software design can be helpful.


Orthogonality is one of the most important properties that can help make even complex designs compact. In a purely orthogonal design, operations do not have side effects; each action (whether it’s an API call, a macro invocation, or a language operation) changes just one thing without affecting others.
Doug McIlroy’s advice to “Do one thing well” is usually interpreted as being about simplicity. But it’s also, implicitly and at least as importantly, about orthogonality. […]

1 Like

These are great comments. I totally understand the software principles. My Patterns and Practices terminology is a little rusty, but this sounds a lot like the Single Responsibility pattern of the SOLID principle, along with a good implementation of loose coupling. And I’m sure a bunch of other principles like this (as I said, my terminology is rusty).

I remember when C#/.NET first came out, I was frustrated with the fact there was no single class/method to read text from a file. Only the parts to make up reading a file, and another part to read a stream, etc. Later on they added classes and/or methods to combine these classes so there now is a simple method to read a text file.

But the theory is the same. Give you the lower-level tools to do things, and let you put them together to accomplish what you want.

1 Like

Valuable topic.
Thank you, Dan, for posting your question.
I’m interested, too.

Clear, concise, very helpful.
Thank you, Peter, not only for posting that, but for thinking in that way.

I’ve wondered why KM was so difficult for me in the beginning.
By contrast, Quickeys was almost effortless.
Dan’s comment seems to provide one clue to that difficulty of learning:

[quote=“DanThomas, post:5, topic:5228”]Give you the lower-level tools to do things, and let you put them together to accomplish what you want.

That helps me understand.
Learning to use precision tools takes much more time and effort than learning simple tools, perhaps an order of magnitude more.

Because KM can do so much, I’ve been willing to invest time learning.
But not so some other software – where “quick and dirty” is sufficient.
Difficult to find the right balance in the cost-benefit trade-off.

With KM, it was the careful design that convinced me to change over from Quickeys 5 years ago.
Although, until today, I didn’t even know what orthogonal meant.

Thanks for that comment. I’m starting to think about topics to cover in a KM introductory tutorial, and your statement is a good thing to point out, in the tutorial.

Keyboard Maestro offers a vast set of tools (Actions), some of which I am still discovering. But they are not all the same in scope. For example, compare the “Move Mouse” Action with the “Read File” or “Repeat Loop” or “For each file in Finder selection”. Using orthogonal tools (like KM Actions) probably takes longer than using a pre-built solution (like a wizard), but I’m not sure that it is 10X as long. Pre-built solutions are great, unless there is not a solution available that you need. :wink:

My point is some KM Actions allow you to use just a few of the large chunks of a workflow to get something very productive done. Others may require many smaller blocks.

But one thing to keep in mind is the great reservoir of existing Macros. These provide solutions to a lot of common needs, and don’t require you to fully understand all the parts to use.

###Sources of Existing Macros Providing Pre-Built Solutions

  1. The Example Macros that come with KM. Goto Window > Macro Library in the KM app.
  2. Macros submitted by other users. Goto the Forum > macros section.
  3. Best Macro List in the Forum macro section
  4. List of Example Macros

Hey Mark,

When did you start using QuicKeys?

I started with v1.0 back around 1985 when QuicKeys had few functions and kept upgrading through v4.0.7 (R.I.P.)

Many years – hundreds and hundreds of macros…

I believe I didn’t give it up until Mavericks came out in 2012, and it became quite clear that QK was a dead product.

Even though I’d been running Keyboard Maestro in tandem with QK since KM1.0 came out, it took a long time to move completely over – and despite my SuperUser status and long experience with every utility in the book I found a number of things about Keyboard Maestro difficult to learn.

Those things were mostly functions that QuicKeys made easy and Keyboard Maestro didn’t – like renaming items in the Finder – things that required loops and programming strategy.

I still prefer to use AppleScript or AppleScriptObjC and actual code for many of these sorts of things, but I’ve often forced myself to do things the Keyboard Maestro way – just so I know how.

Keyboard Maestro is at v7.3 and has been around since early 2004 or so. In twelve-plus years it has grown into the best-of-breed automation utility available for the Mac, and its complexity and sophistication have leveled-up more than a few times.

It is no surprise that many people get overwhelmed by it, but those who stick with it discover (to their delight) why a Mac without Automation is about as useful as a balsa wood boat anchor.

The Keyboard Maestro forum is a much more friendly and useful place, since Peter moved it from Yahoo Groups to a self-hosted Discourse forum. We strive to get people over the hump of overwhelm and into the delight zone.




Dan -
Have you thought about making that tutorial orthogonal by design?

1 Like

Me, too.
But most people don’t like, and don’t want, orthogonality.
Requires too much thinking.

I’ve learned (the hard way, of course) to select employees based on that preference.
Friends, too.

But, until this thread, I didn’t know a concise label for this way of thinking.
Having a label for the concept makes thinking orthogonaly so much easier:

  • What else is at right angles to this?



Peter -

What are the other guiding principles?

Knowing those could help in using KM in ways that best fit the underlying design.

(A suitable place for explaining more about guiding principles would be Wiki, “What is Keyboard Maestro?,” already posted in draft by JMichaelTX)

(This is my favorite thread on this forum so far: thinking about using the tools).

I don’t have a specific list - this one is the most obvious as far as differentiation from Quickeys which is why it comes up regularly.

Other principles include:

  • Minimising preferences. I tend to add Hidden Preferences fairly easily for cases that are needed by some small group of people or to overcome specific situations, but I try to minimise the visual preferences because each one detracts from all the others.
  • Consistency. I try to have the same thing used in multiple places. This works hand-in-hand with orthogonality. So I have a bunch of orthogonal conditions, and then they are used as a group in numerous actions. And I try to have things look the same and act the same when used in different places. Same for terminology.
  • For Keyboard Maestro, I try to go with a “sentence based look”. Actions tend to look like sentences with things that can be filled in to adjust the behaviour.
  • Minimally complex, maximally powerful. Difficult to achieve, but that’s the goal.

I also have a loose methodology for choosing what to work on. Basing decisions on a bunch of interrelated factors to do with how many people it will benefit and by how much, how much time it will take to implement, how much complexity it will add, and how well it interoperates and extends other features.

In terms of business process, I also try to ensure that my interests and my customers interests are aligned. That is why I have stayed with the paid upgrade model - it is the only model I have found where my work on the new version has to equally satisfy both existing and new customers, and where my reward is tied relatively directly to how hard and effectively I work.

I’m sure there are many more, I’ve been doing this so long and they all have grown organically - it is not something I’ve written down, it is just who I have become.


Thank you, Peter, for taking your time to explain all of this.
Understanding your premises will be very helpful to me when building macros.

I’d never realized that you designed a “sentence based look”.
But now that you’ve explained it, “ah ha!”, I can see it.
Specifying actions will be much clearer, because I’ll be thinking in sentences.

Your business process of paid upgrade model makes the most sense to me, too.
I want you to be motivated to maintain and improve KM.
The best way I know to do that, is to pay you, regularly.

Also interesting that you wrote, “… it is just who I have become”.
That got me thinking, too.
KM has gotten “under my skin”, by encouraging me to analyze exactly what I’m doing on the computer.
I find it’s not only a macro tool, but a thinking tool, as well.

1 Like

Personally, I can’t imagine a better model, for an application like KM. We all want you to be able to make a living. You totally deserve that.

And if it helps motivate you to continue to provide improvements, I think that’s a great benefit. Personally, if I worked on a single project as long and as all-consumingly as you have, I’d probably start to pull out my hair. And while it’s pretty-much all grey now, I still have it!

Yeah. Smile is definitely hitting some rough water with their recent business model change. Peter (AKA Keyboard Maestro) is a one-in-a-million developer in that he puts his money where his mouth is. Other apps out there with even 1/1000th of Keyboard Maestro’s functionality usually lose their way in ‘curse of knowledge complexity’ or obscure GitHub pages featuring some ‘here today gone tomorrow’ patch.

Forget that Keyboard Maestro seems to achieve the impossible functionally speaking; The fact that – year after year and OS update after OS update – I can rely on Keyboard Maestro being there for me to save me gobs of time and money is enough to have me on this forum right now proselytizing without being paid to do so. (So, in case you’re wondering, No, I DO NOT work for Keyboard Maestro or Peter.)

Frankly, I sometimes wonder if Peter has an underground lair of minions to do his bidding because I don’t know how a single individual could ever find enough hours in the day to create and maintain a product as robust as Keyboard Maestro.

1 Like

Honestly, Keyboard Maestro is one of the few apps where I get excited about paid upgrades. The upgrades are always awesome and well worth the minimal cost per the unfathomably immense time/money they save.


I definitely agree with all here and Peter really did a wonderful job with this app. Dan Thomas with his few meta macros made KM even better than it was and that is truly awesome.

I am actually curious. How do you personally use KM, to save all these ‘gobs of time’?

Well, I took Linear Algebra for my undergrad, thinking I needed it for my Postgrad studies. FAILED IT. And took it again, and passed with a 68%. AND DIDN’T NEED IT in the end…

… Peter, the moment I saw the headline come into my Inbox I knew EXACTLY what you meant by orthogonal and right-angles. This concept is essential in database design as well. (The Type A’s ultimate justification for “there is actually one single best way to do things.”)

It’s why KM is so damn clean, so damn organized, and so damn simple. Utterly grateful for this approach every single day.

1 Like

“At right angles” is in fact the simplest, most accessible, description of “orthogonality”.

If you want we can talk about “bases for vector spaces” and “mutual independence” but I don’t think that helps. :slight_smile:

On second thoughts maybe “mutual independence” does. :slight_smile:

1 Like