# Key to switch to specific Mac app

**URL:** <https://community.keyboard.io/t/key-to-switch-to-specific-mac-app/440>\
**Category:** Help and Getting Started\
**Created:** [October 18, 2017, 6:43am UTC](https://community.keyboard.io/t/key-to-switch-to-specific-mac-app/440 "2017-10-18T06:43:53Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![algernon](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/algernon/32/4404_2.png) [@algernon](https://community.keyboard.io/u/algernon)\
**Post date:** [October 18, 2017, 9:18am UTC](https://community.keyboard.io/t/key-to-switch-to-specific-mac-app/440/2 "2017-10-18T09:18:25Z")

</div>

`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](https://github.com/algernon/Model01-sketch/blob/8532a6f623cc33c0844f65666131a8821e38250d/src/algernon.ino#L60-L91) that send `appsel:something` over the serial port, and then a small [tool on the host](https://github.com/algernon/Model01-sketch/blob/8532a6f623cc33c0844f65666131a8821e38250d/tools/model01-commander.py) 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.

---

_[View the full topic](https://community.keyboard.io/t/key-to-switch-to-specific-mac-app/440)._
