Key to switch to specific Mac app

Focus is bi-directional, the keyboard can send stuff to the host aswell. But you can also use raw Serial, as long as there is no application actively trying to speak the Focus protocol all the time. What I do, is that I have macros that send appsel:something over the serial port, and then a small tool on the host does the hard work of selecting the appropriate application.

I can use Focus at the same time, because I only run the tool that talks with the keyboard when I need it, it has no exclusive lock on the serial port. So I can mix the two. This may not be the best solution going forward, but it is one that works for me right now. I could send appsel something\n.\n too, which would conform to Focus responses, and have an app listen on the host and act on it. It wouldn’t need periodically poll, but could use the OS-provided poll() or similar, to notice that there’s data on the port immediately, without having to wait until the next poll tick.

Using bizarre key combos (like LSHIFT(LCTRL(LALT(LGUI(RALT(Key_X)))))) together with a helper on the host, as you described.

2 Likes