Skip to content

Instantly share code, notes, and snippets.

@shawngmc
Created April 3, 2026 05:48
Show Gist options
  • Select an option

  • Save shawngmc/545ce4dda263367aa479afe213fec553 to your computer and use it in GitHub Desktop.

Select an option

Save shawngmc/545ce4dda263367aa479afe213fec553 to your computer and use it in GitHub Desktop.
C3 Pro 8K QMK Customization

Goals

Setup

# Install QMK via UV
uv tool install qmk
export QMK_HOME='~/qmk_firmware' # Optional, set the location for `qmk_firmware`
qmk setup  # This will clone `qmk/qmk_firmware` and optionally set up your build environment

Modifications

Ref: Monotux

OS Detection

  1. Update rules.mk
OS_DETECTION_ENABLE = yes
DEFERRED_EXEC_ENABLE = yes
  1. Update keymap.c
#include "quantum.h"

#ifdef OS_DETECTION_ENABLE
void keyboard_post_init_user(void) {
    // Optional: detect and act immediately
    os_variant_t host = detected_host_os();
    // ... apply settings based on host
}

// Optional: Use a callback function to handle detection
bool process_detected_host_os_user(os_variant_t detected_os) {
    switch (detected_os) {
        case OS_MACOS:
        case OS_IOS:
            // Swap Alt and GUI for Mac
            keymap_config.swap_lalt_lgui = true;
            keymap_config.swap_ralt_rgui = true;
            break;
        default:
            // Default for Windows/Linux
            keymap_config.swap_lalt_lgui = false;
            keymap_config.swap_ralt_rgui = false;
            break;
    }
    return true; // Propagate to keyboard level
}
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment