Is it possible to make a switch in KM?

Hey guys!

I was wondering… Is it possible in KM to have a shortcut that - once activated - performs a different action if pressed again? And once that other action is finished it goes back to option 1?

I want to have a shortcut to switch between 2 certain tools in Logic. It’s usually esc, esc for tool no. 1 and esc, 0 fot the second. I would like to be able to switch between both just using one button.

Possible? Can’t code unfortunately and haven’t been a KM user long, but am willing to learn.


Perhaps an if, then, else control which gets and sets a variable to indicate state?

There are two easy solutions. Either have two macros and alternately enable one of them, or use an If Then Else and track the state.

So either:

Macro A:

  • Enable Macro B
  • Disable Macro A
  • Do stuff

Macro B:

  • Enable Macro A
  • Disable Macro B
  • Do stuff


Macro Do Stuff:

  • If Variable “Do Stuff State” is 0
    • Set Variable “Do Stuff State” to 1
    • Do Stuff A
  • Else
    • Set Variable “Do Stuff State” to 0
    • Do Stuff B

Perfect, that worked like a charm. Thanks to both of you!