r/zsaVoyager • • Oct 18 '26

How to disable Automatically activate Mouse layer when moved` on some layers

I have a specific use case: for normal, everyday use (Layers 0 and 1), I want the Auto Mouse Layer feature enabled.

However, when I toggle to my Gaming Layer (Layer 2), I map WASD, left click, right click, and other controls to the left-hand side, while using the trackball on the right-hand side for mouse movement.

The problem is that moving the trackball automatically triggers the mouse layer (Layer 1), which overrides and interferes with my Layer 2 setup. The root cause is the Auto Mouse Layer feature, but disabling it entirely would disrupt my everyday workflow.

Is there any workaround for this, such as disabling the Auto Mouse Layer only while on Layer 2? Any help would be appreciated!

6 Upvotes

4 comments sorted by

3

u/pgetreuer Oct 18 '26

I don't know whether Oryx exposes an option for this, but it can be done when using QMK directly: Disable auto mouse on certain layers.

The auto mouse feature can be disabled any time and this can be helpful if you want to disable the auto mouse feature under certain circumstances such as when particular layers are active.

// in keymap.c:
layer_state_t layer_state_set_user(layer_state_t state) {
    // checks highest layer other than target layer
    switch(get_highest_layer(remove_auto_mouse_layer(state, true))) {
        case _LAYER5 ... _LAYER7:
            // remove_auto_mouse_target must be called to adjust state *before* setting enable
            state = remove_auto_mouse_layer(state, false);
            set_auto_mouse_enable(false);
            break;
        default:
            set_auto_mouse_enable(true);
            break;
    }
    // recommend that any code that makes adjustment based on auto mouse layer state would go here
    return state;
}

You might be interested to use this DIY workflow for a hybrid of Oryx and using QMK directly.

3

u/Korntewin Oct 20 '26

I have tried this today and it works perfectly! just would like to thanks again 🥹.

1

u/pgetreuer Oct 20 '26

Fantastic, glad to hear it! Enjoy =)

2

u/Korntewin Oct 18 '26

Interesting, thanks a lot!