fix: Cleanups of sideband and direct kscan from review.

* Add dedicated init priority for the sideband kscan.
* Refactor sideband code for clarity.
* Tweaks to direct kscan for clarity.
* Make sideband behavior row optional for brevity.
* Allow overriding ZMK Uno sideband behaviors.
This commit is contained in:
Peter Johanson
2024-01-22 13:39:08 -08:00
committed by Pete Johanson
parent 4198fac90f
commit 5d960a758f
7 changed files with 78 additions and 61 deletions

View File

@@ -11,21 +11,17 @@
#include <dt-bindings/zmk/ext_power.h>
#include <dt-bindings/zmk/rgb.h>
// Uncomment the following block if using the "Direct Wire" jumper to switch the matrix to a direct wire.
// Uncomment the following lines if using the "Direct Wire" jumper to switch the matrix to a direct wire.
/* :REMOVE ME
// &kscan_direct { status = "okay"; };
// &kscan_matrix { status = "disabled"; };
&kscan_direct { status = "okay"; };
&kscan_matrix { status = "disabled"; };
/ {
chosen {
zmk,matrix-transform = &direct_matrix_transform;
zmk,kscan = &kscan_direct;
};
};
REMOVE ME: */
// / {
// chosen {
// zmk,matrix-transform = &direct_matrix_transform;
// zmk,kscan = &kscan_direct;
// };
// };
/ {
keymap {

View File

@@ -40,20 +40,17 @@
compatible = "zmk,kscan-sideband-behaviors";
kscan = <&kscan_sp3t_toggle>;
usb {
row = <0>;
first_toggle_sideband: first_toggle_sideband {
column = <0>;
bindings = <&out OUT_USB>;
};
ble_zero {
row = <0>;
second_toggle_sideband: second_toggle_sideband {
column = <1>;
bindings = <&ble_zero>;
};
ble_one {
row = <0>;
third_toggle_sideband: third_toggle_sideband {
column = <2>;
bindings = <&ble_one>;
};

View File

@@ -12,21 +12,18 @@
#include <dt-bindings/zmk/outputs.h>
#include <dt-bindings/zmk/rgb.h>
// Uncomment the following block if using the "Direct Wire" jumper to switch the matrix to a direct wire.
// Uncomment the following lines if using the "Direct Wire" jumper to switch the matrix to a direct wire.
/* :REMOVE ME
&kscan_direct { status = "okay"; };
&kscan_matrix { status = "disabled"; };
// &kscan_direct { status = "okay"; };
// &kscan_matrix { status = "disabled"; };
/ {
chosen {
zmk,matrix-transform = &split_direct_matrix_transform;
zmk,kscan = &kscan_direct_comp;
};
};
REMOVE ME: */
// / {
// chosen {
// zmk,matrix-transform = &split_direct_matrix_transform;
// zmk,kscan = &kscan_direct_comp;
// };
// };
/ {