Specify MIDI or Keystorke

Hi there. Im trying to get KM to send a Keystroke to a specific program. But I can’t figure it out. Neither can I send a MIDI note to a specific midi source (choose witch midi device/output i want to send to). Are there any workarounds or am I missing something?

All the best. Eriko

What's the app?

Most apps should respond to this:

  • Create a macro in a macro group which is activated when the app is frontmost
  • In the macro:
    • Insert Action: "Type a Keystroke"

After you insert the action, press the keystroke you want, which will replace the default entry of RETURN.

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

Sure thing. I have tried that. But I want to send keystrokes to programs running in the background. Thats why I need to specify witch program the keystroke is for. Similar to the function in Osculator. There you can send a keystroke to a program of your choice…

AFAIK, the macOS only supports sending keystrokes (which is a UI activity) to the frontmost app/window. I don't know anything about Osculator.

But in Keyboard Maestro, you will need to bring the app/window to the front, send the keystroke, and the restore the last app.

In the below example, I am using TextWrangler as the target app.

Keyboard Maestro does not support sending keystrokes to background apps, nor directing where MIDI notes go.

Thanks for clearing that out. Still that would be a very nice feature. And to top it of I would die for OSC implementation : )

Have a fantastic day…

Its on the list. As is OSC.

Sounds great! That would make my KM workflows much better! Hope that tomorrow comes quickly :+1:t3:

Another big vote for OSC. I use OSC constantly to communicate with Reaper on Mac via Lemur on the iPad.

Thank you for your fantastic program that so many of us rely on in our workflow.

Any news on implementing OSC? For me it would be such a huge improvement on KM and what it is capable of.

/All the best from Stockholm

Not at this time.

Bummer I’m still hoping for OSC to be implemented. Well, how about the functionality to specify MIDI source or send Keystrokes to a specific program?

Just wanted to check in on this. I know it’s still quite specific, but OSC is getting more and more popular. An integration would the amazing !

Keyboard Maestro will have much more complete MIDI support.

As far as OSC, as discussed the other thread

However, I cannot see how I can use MIDI SysEx constructively. It seems it each device has its own behaviour. I could define my own and use that as a trigger, but how would that be better than the existing MIDI triggers? And how would I send such a packet constructively. There would need to be some language for describing the packet and by that point it would be better done using a third-party tool.

I also looked at OSC and came to much the same conclusion. MIDI has system support in coreMIDI and supports for MIDI over the net, but I can’t even see how I would make Keyboard Maestro discoverable. And sending OSC seems to have the same sorts of issues as SysEx - what events would I actually send?

So if anyone wants any actions or triggers related to SysEx or OSC, could you please explain what that would look like (a quick mockup of a trigger or an action would be ideal) and how would it work interoperating with other devices?

OSC seem very specific to devices and packets and so I can’t really see how Keyboard Maestro would sensibly trigger or send them. Also, the system does not appear to have any OSC support, and there does not seem to be any sensible discovery mechanisms.