Skip to content

Instantly share code, notes, and snippets.

@lordpixel23
Last active April 7, 2025 14:42
Show Gist options
  • Save lordpixel23/87498dc42e328eabdff6dd258a667efd to your computer and use it in GitHub Desktop.
Save lordpixel23/87498dc42e328eabdff6dd258a667efd to your computer and use it in GitHub Desktop.
Adding support for Apple fn/Globe key to QMK

What this does

This allows you to define a key for your QMK keyboard which has some of the same functionality as the fn/Globe key on an Apple keyboard. Applying the following patch to your qmk repository creates a new keycode KC_GLOBE which can then be used in your keymaps.

Where is this from

This commit is updating @drashna's code from Nov 2023 to work with the Nov 2024 files.

How to

  1. Apply the changes from this commit in full
  2. Make sure rules.mk for your keyboard has KEYBOARD_SHARED_EP = yes or else Globe-E, Globe-Q etc. will not work.
  3. Use KC_GLOBE in your keymap to define a key as the fn/Globe key and compile as normal.

Alternatively if you want to avoid patching the generated header file, replace step 1. above with:

  1. Create thre new JSON file data/constants/keycodes/keycodes_0.0.4_basic.hjson from the commit above
  2. Run qmk generate-keycodes -v 0.0.5 -o quantum/keycodes.h in the root of the repo to update the keycodes
  3. Apply the change to tmk_core/protocol/report.h from the commit above

Caveats

This will not make the key behave fully like the key on an Apple keyboard. Specifically more is required if you want it to toggle between F1–F12 and controlling brightness etc. See @fauxpark's gist for the long details.

@quxin5605
Copy link

@Ostrichbeta - I just ran into the same thing. I've mapped the globe key to a key on my Nuphy Halo96v2, it works as expected when it's connected via wire... but fails w/ Bluetooth or 2.4Ghz RF. Have you had any luck with this?

I've downloaded the Key Codes app from the Mac App Store to see the logged keypresses and they look identical between the Nuphy key in BT mode, the Nuphy key in wired mode, and when I press the real globe key on my MacBook Pro: Screenshot 2025-02-14 at 10 44 11

I have the same problem with my nuphy air75_V2🙈

@ChrisGVE
Copy link

ChrisGVE commented Apr 7, 2025

I followed the gist to modify my Keyboard(Keychron K10 Pro)'s config and it works in cable mode, but the globe key just failed in Bluetooth mode, that's strange.

I've modified the Keychron firmware for my Q60 Max, and the globe key works for both wired and bt (I just rechecked now to make sure). To be complete, I'm using their firmware on their wireless_playground branch which is my basis for the Q60.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment