5d960a758f
* 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.
60 lines
1.3 KiB
Plaintext
60 lines
1.3 KiB
Plaintext
/*
|
|
* Copyright (c) 2022 The ZMK Contributors
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*/
|
|
|
|
#include "zmk_uno.dtsi"
|
|
|
|
#include <behaviors.dtsi>
|
|
#include <dt-bindings/zmk/bt.h>
|
|
#include <dt-bindings/zmk/outputs.h>
|
|
|
|
/ {
|
|
chosen {
|
|
zmk,matrix-transform = &matrix_transform;
|
|
};
|
|
sensors: sensors {
|
|
compatible = "zmk,keymap-sensors";
|
|
sensors = <&encoder>;
|
|
triggers-per-rotation = <20>;
|
|
left {
|
|
triggers-per-rotation = <20>;
|
|
};
|
|
};
|
|
|
|
macros {
|
|
ZMK_MACRO(ble_zero,
|
|
wait-ms = <1>;
|
|
tap-ms = <1>;
|
|
bindings = <&out OUT_BLE &bt BT_SEL 0>;
|
|
)
|
|
ZMK_MACRO(ble_one,
|
|
wait-ms = <1>;
|
|
tap-ms = <1>;
|
|
bindings = <&out OUT_BLE &bt BT_SEL 1>;
|
|
)
|
|
};
|
|
|
|
endpoint_sideband_behaviors {
|
|
compatible = "zmk,kscan-sideband-behaviors";
|
|
kscan = <&kscan_sp3t_toggle>;
|
|
|
|
first_toggle_sideband: first_toggle_sideband {
|
|
column = <0>;
|
|
bindings = <&out OUT_USB>;
|
|
};
|
|
|
|
second_toggle_sideband: second_toggle_sideband {
|
|
column = <1>;
|
|
bindings = <&ble_zero>;
|
|
};
|
|
|
|
third_toggle_sideband: third_toggle_sideband {
|
|
column = <2>;
|
|
bindings = <&ble_one>;
|
|
};
|
|
};
|
|
|
|
};
|