Trigger Apple Application Switcher?

How do I trigger the MacOS Application switcher (CMd-Tab) and previous app command (Shift-Cmd-Tab) using KM? This requires holding down the Cmd key while tapping Tab and Shift-Tab.

I need to use the MacOS Application Switcher, I can't use the KM version.

Thanks for the help.

1 Like

Have been wondering about this as well. Tried "hold Command" and then "press Tab" and every variation of that I could think of, but couldn't get it to cooperate. Hopefully someone has an answer.

Hey @anamorph,

Any particular reason you need to use the app-switcher?

Activate Last Application v1.00.kmmacros (4.9 KB)

Keyboard Maestro Export


1 Like

Do this instead.
Command +Tab (Hold the Command key Don't LET GO)
Now press Tab to go forward or press shift to go back ward (you can also use left and right arrow)
Land on the app you want to go to and let go of command

1 Like

Yes, this is exactly what I would like KM to automate. Do you know how to get it to do that?

August 8, 2021

@ccstone yes, I'm suffering from a bug that causes my cursor to vanish permanently several times an hour. There is no effective fix except an OS update, but I'm in the middle of a crunch project and cannot take the risk. So I need a workaround for the present time.

Of the methods of refreshing the cursor that I've found, the fastest is to Cmd-Tab & Shift-Cmd-Tab rapidly. I'm doing this dozens of times a day. (I tried using KM's application switcher, and it did not restore my cursor. Neither did simulated typing of the keys or recording them.)

How would you do this in applescript? Maybe that would work; I just need to activate next then previous application.

I would buy a Stream Deck Mini | Stream deck mini and assign each key to open an application instead of keep using the app-switcher...

1 Like

Did you try my macro? It does what you want.

Slap it twice, and you're there.

If that doesn't work then we'll look at other options.


Yes, I did, and thank you. It does not solve my problem.

For some reason, pressing Cmd-Tab & Cmd-Shift-Tab by hand makes the cursor reappear. Using your macro, or a macro with simulated keystrokes, or the KM application switcher fails to make the missing cursor reappear.

They all work for application switching, but that's not the problem I'm trying to solve right now.

I'd appreciate any other suggestions.

Well, drat. That would have been the most simple solution.

Have you tried the shake to reveal cursor trick?

Have you tried any of the move mouse actions in Keyboard Maestro?


Yes, I've tried them both; no joy.

I've only found two things that will restore the cursor: switching applications or pulling down a menu from the menu bar. I made a KM macro to pull down the Apple menu, and it works, but it's slow and breaks my flow when I have to do it too often. Switching apps is much faster.

Is there an easy way to switch next/previous apps using Applescript?

Not conveniently, but give this a try in an Execute an AppleScript action:

set frontApp to path to frontmost application as text

tell application "SystemUIServer"
end tell

delay 0.1

tell application frontApp
end tell

Change the delay if necessary.


If that doesn't work try this.


Try to Restore Cursor v1.00.kmmacros (5.4 KB)
Keyboard Maestro Export

@ccstone thanks as always for being supremely helpful and generous. None of these solutions worked.
I've come up with a suitable compromise -- I found if I use KM to click twice on the apple menu icon, it refreshes a little quicker, which is tolerable.

I assigned this macro to my Stream deck, so it's a one-button fix now.

Thanks again for all your help.

1 Like

Not sure this is the right thread but: Is there a way to use KM so that when I press CMT+TAB to bring up Mac OS's application switcher the switcher stays up without me having to hold down both keyboard keys? I would then use the arrow keys to choose which app I want and if I don't choose any, hitting ESC would make the switcher go away. Possible?

If not possible, any other utilities that can do this?