Bring One Application Window with a Specific Title to the Front?

I just downloaded km and poked around. I don't know if this is a trial version with functionality disabled until I buy it, but in any case I can't find an action to bring one of an application's windows (not all of them), identified by its title, to the front. Does that exist in km?

Welcome to Keyboard Maestro! The trial version isn’t limited in any way.

I think the action you want is “Select a Window”. Let me know if I’m wrong.

By the way, I think the easiest way to find actions is to use the “Edit->Insert Action->by Name” menu item, or Control+Command+A. This allows you to search for actions, and I found the above action by searching for “window”.

Let me know if this helps!

1 Like

Hi, Mike! You're gonna love Keyboard Maestro. There is little that you can't do with KM, especially if you make use of the Execute Script actions.

BTW, the trial version is a free, 100% functional version, for 30 days.

Your use case is an easy one. Use the "Select a Window" (aka "Bring Front Window to front"). Please feel free to post any follow-up questions.

You can find this Action in the Actions Interface Control Category,

or insert just by typing the name of the Action in the Insert Action by Name (press ⌘^A):

Getting Started with Keyboard Maestro

  • Read the Quick Start.
    • This is essential to become familiar with KM terminology
  • Do the tutorial (Help ➤ Tutorial) in the KM Editor.
    • Gives you a live walkthrough of creating a macro in the KM Editor
  • Review/Browse the Available Macro Actions
  • For Help with an Action in your Macro, click on the gear icon at the top right of the Action, and select "Help"
  • Start small, and grow your macros organically.
  • Be prepared for some trial and error in the beginning.
  • Make good use of this Keyboard Maestro Forum
    • Search for existing macros
    • Post your questions/issues if you get stuck

Thanks, I got it to work.

I am new to the Mac world. Apparently user interface conventions are, in some cases, VERY different. I tried to learn KM by poking around but I don’t understand 90% of what the UI is doing.

At one point I clicked on a - (minus sign) icon and some entry disappeared. I think it was in the keyboard macro groups. Did I delete something that’s part of the default configuration? I didn’t see any option to restore it.

I also don’t see any option to save my work after creating a macro.

I would like to restore KM to the default configuration and start over, reading the documentation first. How can I do that?

I originally came from the PC world, and yes, the Mac is a different beast. :slight_smile:

With Keyboard Maestro, everything gets continuously saved as you work. It might take a second or two, but that’s it. And don’t be afraid to “Duplicate” a macro when you work on it, if that will make you feel safer. :slight_smile:

If you haven’t shut down the editor, you should be able to use “Undo” all the way back. If that doesn’t work, try the “File->Revert Macros” menu item and see if that works. It should.

If not, hit us up and we’ll talk you through a reinstall.

The first thing you might want to do to learn KM is to go through the Tutorial. Help->Tutorial. It’s pretty good.

One final comment. Keyboard Maestro has TONS of features, very few of which are obvious at the start. So please feel free to ask questions!

Unless you have don't something major, and Keyboard Maestro is behaving badly, probably all you need to do is to restart the Keyboard Maestro Engine.

  1. In the KM Editor, goto File > Quit Engine
  2. Quit the KM Editor
    (optionally restart your Mac)
  3. Start the KM Editor, which will also start the KM Engine

If you are having wierd issues, you can look at:
Troubleshooting Keyboard Maestro

If you're stuck, and/or none of the above help, feel free to post back with your questions.

Welcome to the Mac world! The more you get to know it, the more you will love it. At first, you many feel frustrated because you have learned all of those PC/Windows tricks, most of which don't apply to the Mac. has a ton of resources that you should find helpful:

Buying Guides, Tips, and How to Advice on the Apple universe
Switch to Mac: How to find your favorite Windows features in OS X
Switch to Mac: Translating Windows to OS X

We have some very experienced Mac users in this forum, so feel free to ask questions about the Mac, as well.

I think I deleted a couple of macro groups. I already shut down the editor and relaunched it. “Revert” does nothing. I just experimented and yup, KM lets me delete built-in macro groups with no warning.

In Windows what I would do at this point is uninstall KM, which would remove any preferences or files that I altered. Then I would reinstall it.

What is the equivalent for Mac?

I noticed that I never actually installed KM, but just ran the downloaded file. In Windows that almost never happens. You always install something before you can run it, and the installation will usually give you some idea where you are saving your data. It will also set up preferences that are kept in the registry.

So where is KM keeping my custom macros? Where is it keeping its own data for default macros and state? How can all this state be restored?

I don’t remember whether KM actually had an installer or not. But if it doesn’t, next time just drag the program to the “Applications” folder in Finder.

The Mac has something called “bundles” (among other names). These look like a single file, but are actually a special folder that contain all sorts of things inside them. In the case of most applications, everything the app uses (aside from user preferences and the like) are stored in the bundle. So you can often just drag an app wherever you want.

I’ve been on the Windows side both as a user and a developer since the original IBM PCs, and I can tell you, bundles are WAY better than anything Windows tries to do.

You’ll want to delete your KM preferences, they will be recreated to the original version.

  1. In Finder click the “Go” menu item.

  2. Hold down the Alt key, and you should see “Library” appear in the menu. Go there.

  3. Navigate to Library/Application Support/Keyboard Maestro.

  4. Delete everything there. Make sure the KM engine isn’t running.

  5. You might need to empty the trash. Not sure.

Anyway, that should get you started.

If you want to ask Windows-to-Mac questions, I’d be happy to answer as much as I can. Send be a private message if you want.

PS: In case it wasn’t obvious, this is where your macros and such are stored. A good thing to back up.

Most Mac installs and uninstalls are much simpler than Windows.
Usually all you need to do is move the application to the Mac trash.

For Keyboard Maestro, see
How do I uninstall Keyboard Maestro?

I would then restart my Mac, and redownload and install Keyboard Maestro.

Install is simple, but see:
How do I install Keyboard Maestro?

the KM download is a ZIP file. After unzipping, move the .app file to your Applications folder. While technically you can run an app from anywhere, it is considered best practice to put all apps in the users main Applications folder.

the Mac does not (thankfully) use a "registry" like Windows.

All the default macros are available from the Macro Library.

So if you want to revert your macros to the default set, you could delete all your macros (select all the Macro Groups and then click the - button at the bottom) and then open the Macro Library (Window ➤ Macro Library) and add back the default ones, which are:

All the macros in the Smart Groups and Switchers categories as well as the macros:

• Paste Selection Into Last Application
• Quick Macro for ⌥F1
• Search the Web
• Trigger Macro by Name

If you really want to start afresh, use this sequence:

  • Launch Keyboard Maestro
  • Select Help ➤ Open Preferences Folder
  • Select File ➤ Quit Engine
  • Quit

In the Finder, the Keyboard Maestro preference folder will be displays containing files like “Keyboard Maestro Macros.plist”. Trash the entire contents of that folder.

  • Launch Keyboard Maestro

There are a few other settings in the ~/Library/Preferences/com.stairways.keyboardmaestro.* files, but none that normally need resetting, but you can delete them two if desired.

Peter, maybe this would be worth adding to the wiki:
How do I uninstall Keyboard Maestro?

1 Like

Feel free to ask questions about the Mac UI if you need to. You might find this link helpful:
Apple Tips For Windows Switchers

You've probably already figured this out but "+" adds a new item and "-" removes the selected item.

Peter does this work on the actions or does "insert" in the Macro Library window insert the folder and the items contained within? I did the same thing Mike did last year when I got Keyboard Maestro. I see some that might be nice to have back.

The biggest issue about Mac apps, compared to Windows, has to do with UI conventions. I’m not worried about the Finder or System Preferences.

I have struggled with several Mac apps now, with UIs that make no sense to me. However, I have learned something about Mac UI conventions. Mac apps often have a window divided into several areas, like “view ports” let’s call them. The left most viewport, or perhaps two or three columns, are devoted to selecting things. The right viewport shows you what you’ve selected.

Another theme is that the left viewport has a list of items which you drag toward the right.

You may notice that Keyboard Maestro does both things.

Another Mac app I’ve using, called MidiPipe, has a right viewport, and you select what appears in it via a drop-down menu above it. The left viewport is a list of things that you drag to the right, and itself has a drop-down menu that can be used to filter the type of items that appear in it.

This looks strange and non-intuitive to my eyes. By the way, I’ve used iTunes on Windows for years, as well as an iPod. I love Apple-developed apps. The apps I’m talking about now are non-Apple developed.

Here is what looks weird. I’m not getting visual or functional cues that tell me the relationship between view ports. Consider MidiPipe. Consider the right viewport. It has a drop-down selector that chooses what goes into it. Well, in a MS Windows app, there would probably be a title to the viewport with a name and a colon, like

“Pipe 1:”

Or maybe

“Components of [Pipe 1]:”

That gives me the cue that the viewport contains the components of “Pipe 1.” In MidiPipe, however, I can’t see anything connecting the drop down list and the contents of the viewport.

Also, when you select a new item from the drop down list, the contents of the viewport just change instantly to the new context. I understand how that looks in iTunes, but in both MidiPipe and Keyboard Maestro I feel confused, like “where did my contents go?”

In Windows this would be handled in several possible ways. One way would be that selecting a “pipe” (or macro in KM) brings up a dialog. This gives you the cue “I just selected something, I am now looking at it.” It might be a window, subwindow, or floating dock in addition to a dialog. There would then be a specific mechanism for dismissing the dialog, so you would have confidence about what happened to that information.

Another way to handle it would be a tabbed dialog. If there are several things that can be selected, each would have its own tab. Selecting a tab shifts the context, but you can see what happened to the old information… the other tab would still be there, and you can see visually that its contents have been temporarily covered.

I’ve noticed that the Mac system preferences dialog has situations that would be a tabbed dialog in Windows, but instead there are several side-by-side buttons with no other visual connection. However, there seem to be other cues that tell me what’s happening.

In general I think Apple makes great UIs.

You could say that my “complaints” about lack of visual cues or confirmation of actions is just a newbie complaining about something unimportant, but I think that these issues are the “ergonomics” of a UI. Getting them right is what makes a UI pleasant to use.

I knew some geniuses where I used to work as a programmer who seemed to be totally insensitive to the “feel” of their software, either how it was used or how it was organized in code. As far as I could tell, they had so much spare brainpower that they could use one part of their brains to think creatively about the task at hand, and another part to recall any arcane or non-intuitive facts about the system they were using at the very same time, and it felt perfectly natural to them.

However, I can’t do that. If I want to focus my brain on the creative aspect of the job at hand, then I need the UI to function in tune with my thoughts and intentions, or else I feel like I’m fighting it.

And I think Apple in general does a better job of that. Bill Gates is an example of someone so smart that he never needed a computer to be intuitive.

KM seems pretty good now that I’ve figured out the basic filter/viewport/drag thing.

However, there is one Mac app that I think is objectively a bad UI. It’s a media player called JRiver, and it’s absurdly complicated and non-intuitive. I think what is objectively bad about it is how inconsistent it is and how it doesn’t follow even its own logic.

Apple created a very complicated media player in the form of iTunes and made it smooth to use. Quite an accomplishment.

Insert will insert the selected entry from the Macro Library, which may be one or more macros.

All of the default ones are in there, as well as a variety of other ones.

I believe they're generally called "Splitter Groups" and/or "Scroll Areas". They follow the basic convention that "Finder" uses, when set to "Columns View". I'm going out on a limb here, but I think this was an older UI convention on the Mac, and I don't see it as much anymore. Could be wrong there, though.

But let's step back for a second and talk about KM itself. I agree that the interface is not intuitive. Even as a developer, I initially found it, I don't know if this is the right word, but intimidating. I just couldn't wrap my brain around it at first. It's just a completely different beast, to me.

And this is actually one of the reasons I've written so many macros for use within Keyboard Maestro. To help get the UI to work more like I want it to.

So, it took me awhile to get used to it.

OK, with all that said, here's the most important point: Keyboard Maestro is the most deep and thoroughly fascinating tool I've ever used, aside from conventional programming environments, and maybe even them. I've been able to do things I would never have dreamed of.

And the more I learn about KM, the more convinced I am that Peter is a true genius. I don't say that lightly - I've been a professional developer since before the original PC came out. Trust me on this - get past the UI and start doing things in KM, and after a while, you won't give a shi hoot how the UI works. Or at least, you'll take its quirks as you would a loved one's, and learn to either embrace them or at the very least, tolerate them because of the joy you get from the package as a whole.

I guess the better question I should have asked was: "Can I select a folder on the left column and insert that, and if I do will all the other sub entries inside it also transfer back into the users UI, in other words can I select all the folders and restore them all to the left if I had deleted them?"

I did test this and it appears that the folders are not added only the sub items (macros) on the right column.

Mike we all have I suppose. There are a ton of reasons for that I think. Some suggested thoughts on this...

Windows software seemed to be built and focused on a user doing data entry AND using a keyboard. Hence the reason why I first favored the Palm Desktop Software on Windows. I hated the Mac Palm Desktop Software. I had a lot of stuff to put in and I could go from field to field and it was alway obvious what shortcut keys I needed to use to select a radio button or pop up menu.

I think the two operating system UIs were coming from totally different desires/requirements of a UI. Steve Jobs wanted the end user to "point and click". He wanted to make it easier for someone who didn't know how to use a computer to sit down and figure out how to do something on a Mac. Bill Gates original goal was to "bring a windowed environment to DOS that looked like a Mac". That's my take.

Now the thing that's driving UI Interface design is "How do I put this on a tablet so any user can use it?" There's also gestures to consider; shake, right/left swipes, portrait or landscape device orientation. Another thing I think that drives at least Mac development is programming tools. After poking around with Swift a bit I can see why consistency across different developers apps looks generally the same.

Macs come from a point and click philosophy so I think that's why we sometimes get frustrated. We just want to hit letters, tab, and return. :wink:


No, you can only insert one macro library entry at a time.