mirror of
https://github.com/litruv/zmk-config.git
synced 2026-07-24 02:36:05 +10:00
ec11 encoders
This commit is contained in:
@@ -18,6 +18,23 @@
|
||||
events = <0>;
|
||||
};
|
||||
|
||||
/* Rotary encoders (same logical wiring as halves; mark disabled until mapped to actual pins if needed) */
|
||||
left_encoder: left_encoder {
|
||||
compatible = "alps,ec11";
|
||||
a-gpios = <&gpio0 21 (GPIO_ACTIVE_HIGH)>;
|
||||
b-gpios = <&gpio0 20 (GPIO_ACTIVE_HIGH)>;
|
||||
steps = <80>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
right_encoder: right_encoder {
|
||||
compatible = "alps,ec11";
|
||||
a-gpios = <&gpio0 20 (GPIO_ACTIVE_HIGH)>;
|
||||
b-gpios = <&gpio0 21 (GPIO_ACTIVE_HIGH)>;
|
||||
steps = <80>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
default_transform: keymap_transform_0 {
|
||||
compatible = "zmk,matrix-transform";
|
||||
columns = <16>;
|
||||
@@ -30,4 +47,10 @@
|
||||
RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11)
|
||||
>;
|
||||
};
|
||||
|
||||
sensors: sensors {
|
||||
compatible = "zmk,keymap-sensors";
|
||||
sensors = <&left_encoder &right_encoder>;
|
||||
triggers-per-rotation = <20>;
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user