Macro not performing the way it does in app

I have a macro set to keystroke Control+ Tab, which I use often to swap active applications. I just want it to swap between my current app and the last one I used. But when I set it up, it opens an application switcher I don't want for some reason. What am I doing wrong?

It sounds as though control-tab is set as the trigger for KM's application switcher. See the last paragraph of this page in the Wiki.

Let us know if that fixes the problem.

My recommendation is that you find an unused key on your keyboard and assign that key to a hotkey in a macro that looks exactly like this one, below. If you did this, you would probably win the award for the world's shortest macro, because there aren't a lot of useful one-line macros whose actions are just one line in height.

That switches between programs, which is useful for me! But not what I'm trying to achieve here. I use a browser called Shift that keeps commonly used web-apps open and logged in so I don't have to load every damn app I use every morning and log in. They use Control-Tab to swap between workspaces...but I think I've figured out that it's "working", it's just holding- and that's full on opening the app switcher in it, vs just swapping between apps.

Nope. It appears to be typing the shortcut and holding it? When I use the shortcut manually it just swaps between open apps, but when I do it with KM it holds too long and full on opens the app switcher within the program. Any way to shorten the click?

What is your actual macro?

See: Forum - How to Post/Upload Your Macro to the Forum

Maybe I don't understand, but isn't that what alt+tab command-tab does, if you don't continue holding it down? I use it all the time for this. And if the last application isn't really what I want, I just hold down alt+tab command-tab and use the mouse to click on the correct app.

No, when I click control-tab it just does an autoswitch between the last two tabs/windows I've had open. It only brings up the app switcher if I hold it.

I meant command-click - sorry.

Dangit! I meant command-tab. Sheesh.

Me too. As an alternative to clicking on the wanted application, one can continue to hold down cmd and repeatedly tap tab until the application icon is selected, then release cmd.

Shift+tab reverses the direction.

EDIT: From here I just learned that the arrow keys can also be used to advance and retreat.

1 Like

When I do it, if I just do a control-tab release, it just swaps to my last window, which I find very helpful especially when I'm copy-pasting certain stuff into other inputs. So I was hoping I could set up the macro to behave the same way.

Type a Keystroke Macro (v11.0.3)

Type a Keystroke.kmmacros (1.7 KB)

Hi, @Allana_Robinson. Use cmd+tab.

The program I use this in uses control-tab as the keyboard shortcut

I was adding to @DanThomas‘s comment. He was pointing out that you could use the macOS built-in capability: cmd+tab to switch between open applications.

Control Tab, by default in Keyboard Maestro is the hot key for the Activate Window Switcher group. You can disable that or change its hot key in the Switcher Group.

Is that the issue?

2 Likes

I think you mean "Activate Window Switcher macro"..? Anyway, yes, this might explain why my suggestion to checking the Application switcher (based on the report "it opens an application switcher") did not help.

@Allana_Robinson Here is the manual page for the Window Switcher (see the last paragraph): manual:Window Switcher [Keyboard Maestro Wiki]