zmk/app/boards/shields/zmk_uno/zmk_uno.overlay
Peter Johanson c3144055e8 refactor(boards): Move ZMK Uno 1P3T slider to sideband
* Invoke output selection from the slider on the ZMK Uno via
  sideband behavior setup, to simplify keymap.
2024-03-27 20:59:26 -07:00

63 lines
1.2 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>;
usb {
row = <0>;
column = <0>;
bindings = <&out OUT_USB>;
};
ble_zero {
row = <0>;
column = <1>;
bindings = <&ble_zero>;
};
ble_one {
row = <0>;
column = <2>;
bindings = <&ble_one>;
};
};
};