diff --git a/config/boards/shields/corax56/corax56.dtsi b/config/boards/shields/corax56/corax56.dtsi index c180e35..01fae46 100644 --- a/config/boards/shields/corax56/corax56.dtsi +++ b/config/boards/shields/corax56/corax56.dtsi @@ -25,26 +25,27 @@ RC(0,0) RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) label = "KSCAN"; }; - left_encoder: encoder_left { + encoder_left: encoder_left { compatible = "alps,ec11"; label = "LEFT_ENCODER"; a-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - resolution = <2>; + steps = <30>; status = "disabled"; }; - right_encoder: encoder_right { + encoder_right: encoder_right { compatible = "alps,ec11"; label = "RIGHT_ENCODER"; - a-gpios = <&pro_micro 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - b-gpios = <&pro_micro 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - resolution = <2>; + a-gpios = <&pro_micro 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + b-gpios = <&pro_micro 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + steps = <30>; status = "disabled"; }; sensors { compatible = "zmk,keymap-sensors"; - sensors = <&left_encoder &right_encoder>; + sensors = <&encoder_left &encoder_right>; + triggers-per-rotation = <15>; }; }; diff --git a/config/boards/shields/corax56/corax56.keymap b/config/boards/shields/corax56/corax56.keymap index 29b0974..838bd3e 100644 --- a/config/boards/shields/corax56/corax56.keymap +++ b/config/boards/shields/corax56/corax56.keymap @@ -124,7 +124,7 @@ bindings = < &kp LGUI &kp LALT < SPEC ESC &kp SPACE &kp ENTER < NAV BSPC &kp RALT &kp RGUI >; - sensor-bindings = <&inc_dec_kp C_VOL_DN C_VOL_UP &inc_dec_kp C_PREV C_NEXT>; + sensor-bindings = <&inc_dec_kp C_VOL_DN C_VOL_UP &inc_dec_kp PG_DN PG_UP>; }; qwerty_layer { @@ -148,7 +148,7 @@ bindings = < &trans &trans &trans &trans &trans &trans &trans &trans >; - sensor-bindings = <&inc_dec_kp C_VOL_DN C_VOL_UP &inc_dec_kp C_PREV C_NEXT>; + sensor-bindings = <&inc_dec_kp C_VOL_DN C_VOL_UP &inc_dec_kp PG_DN PG_UP>; }; special_layer { @@ -172,7 +172,7 @@ bindings = < &trans &trans &trans &trans &trans &trans &trans &trans >; - sensor-bindings = <&inc_dec_kp C_VOL_DN C_VOL_UP &inc_dec_kp C_PREV C_NEXT>; + sensor-bindings = <&inc_dec_kp C_VOL_DN C_VOL_UP &inc_dec_kp PG_DN PG_UP>; }; nav_layer { @@ -196,7 +196,7 @@ bindings = < &trans &trans &trans &trans &trans &trans &trans &trans >; - sensor-bindings = <&inc_dec_kp C_VOL_DN C_VOL_UP &inc_dec_kp C_PREV C_NEXT>; + sensor-bindings = <&inc_dec_kp C_VOL_DN C_VOL_UP &inc_dec_kp PG_DN PG_UP>; }; adjust_layer { @@ -220,7 +220,7 @@ bindings = < &trans &trans &trans &trans &trans &trans &trans &trans >; - sensor-bindings = <&inc_dec_kp C_VOL_DN C_VOL_UP &inc_dec_kp C_PREV C_NEXT>; + sensor-bindings = <&inc_dec_kp C_VOL_DN C_VOL_UP &inc_dec_kp PG_DN PG_UP>; }; }; diff --git a/config/boards/shields/corax56/corax56_left.overlay b/config/boards/shields/corax56/corax56_left.overlay index 04a60e1..eee967d 100644 --- a/config/boards/shields/corax56/corax56_left.overlay +++ b/config/boards/shields/corax56/corax56_left.overlay @@ -23,7 +23,7 @@ ; }; -&left_encoder { +&encoder_left { status = "okay"; }; diff --git a/config/boards/shields/corax56/corax56_right.overlay b/config/boards/shields/corax56/corax56_right.overlay index b3dae13..2db77ef 100644 --- a/config/boards/shields/corax56/corax56_right.overlay +++ b/config/boards/shields/corax56/corax56_right.overlay @@ -27,7 +27,7 @@ ; }; -&right_encoder { +&encoder_right { status = "okay"; };