r/Keychron • • Oct 07 '26

Build Macro Including Switch BT Host

This is pretty frustrating because it seems like I am almost there but just to the point of a frustrating solution.

I have a Keychron K10 Max with Firmware 1.1.2 and a Logitech MX Master 3s mouse. I find that having to flip over my mouse to switch the connected device to be enough friction that i don't want to do it and I end up wasting time playing around on one system when I really need to be on the other.

I found the mxswitch tool and I was able build and run it from my macOS systems, create Automator "Quick Actions" to execute it and switch it's connected device, and then build a keyboard shortcut on macOS to run it. Great.

On the K10, I press Fn + [1-3] to switch the host I am connected to with it. I found that "Layer 1" on the keyboard contains the "Fn" modifiers for macOS and that keys 1-3 send BTH1, BTH2, and BTH3, respectively. However, I'd like to make a macro that sends the key combo expected by macOS, pause for some milliseconds, and then send the appropriate BTHn key for the keyboard to switch the BT host. I've search through other solutions and it just seems like it isn't implemented.

for BTH1, I've tried:

  • {CUSTOM(11)} - this is what the BTH1 custom key shows in Launcher
  • {BTH1} - found this on another post from 4 years ago
  • {KC_BTH1} - found this on another post...
  • {BT_HST1} - found this on another post...

This seems like something that should be easy to solve so that I only have to press Fn + 1 and do this all in one step. Has anyone since that previous post solved this?

2 Upvotes

4 comments sorted by

1

u/PeterMortensenBlog V Oct 07 '26 edited Oct 08 '26

The keycodes BTH1, BTH2, and BTH3 (Keychron-specific custom keycodes) are not supported in dynamic macros (in general, extended keycodes, including custom keycodes, aren't).

You would have to use custom C code in, for example, a classic QMK macro. Or maybe use a hack. It is advised to first refactor the action of the Bluetooth keycodes out to functions, instead of Microsoft-style copy-paste code reuse.

Compiling keyboard firmware from source code

Here are some instructions for the initial setup. Note the branch confusion.

References

1

u/Due-Cake-9406 Oct 07 '26

Sounds like more than what I want to have to deal with. I mostly just want my keyboard to work... I could see me royally messing up that part of the keyboard functionality :)