Skip to content

I want to add a mouse scroll wheel encoder to my keyboard, but I'm currently encountering some issues #2944

Description

@njian-github

I want to add a mouse scroll wheel encoder to my keyboard, but I'm currently experiencing some issues. I've configured the two scroll directions to output 0 and 1 respectively. However, when I scroll the encoder in one direction, both 0 and 1 sometimes get triggered. Normally, scrolling in one direction should only output either 0 or 1. I’d like to ask if there is a way to fix this issue. Below is my configuration file. Please help me. Thank you!
`
right_encoder: encoder_right {
compatible = "alps,ec11";
a-gpios = <&pro_micro 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
b-gpios = <&pro_micro 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
steps = <12>;
status = "okay";
};

sensors: sensors {
    compatible = "zmk,keymap-sensors";
    sensors = <&right_encoder>;
    triggers-per-rotation = <24>;
};


keymap {
compatible = "zmk,keymap";

    default_layer {
        bindings = <&kp A
                    &kp A
                    &kp A
                    &kp A
                    &kp A
                    &bt BT_CLR_ALL
                    &bootloader
                    &out OUT_BLE
                    &sys_reset
                    &studio_unlock>;
        sensor-bindings = <&inc_dec_kp N1 N0>;
    };
    
};`
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions