How do I send the fn keycode to macOS?

I want to program a key to send the same keycode that my Macbook Air’s built in keyboard sends when I press the fn key on the built in keyboard.

I’ve looked through what appear to be the available keycodes here and I don’t see any that would make sense.

The screenshot below is what Karabiner EventViewer reports when I press this key.

CleanShot 2022-05-09 at 16.00.34

You can’t, unfortunately. It’s not a USB HID key code of any sort, so external keyboards are not capable of sending it.

Oh wow, interesting!

Out of curiosity, do you know how Apple’s own external keyboards send it? Some proprietary magic?

There was a big exegesis on that topic a few years ago from QMK: The Apple Fn Key · Issue #2179 · qmk/qmk_firmware · GitHub

This is interesting, because the Nuphy Air75 is able to do it which is a third party keyboard. I wonder how they do it.

Haven’t tried this yet, but it looks promising. QMK Apple Fn

We have support for the Apple Fn key in Chrysalis these days. (It’s called a ‘Globe’ key), along with Lock Screen, Mission Control and Expose.

What’s the right way to send this with Kaleidoscope?

@jesse is it possible to send this key with Kaleidoscope (vs. Chrysalis)?

Yup. It’s Consumer_AC_NextKeyboardLayoutSelect