forked from kofal.net/zmk
feat(endpoints): add preferred endpoint setting
Added a new setting to remember the user's preferred endpoint. When both USB and
BLE are connected, the preferred endpoint will be used.
Added a new behavior to control this setting. It supports commands:
&end END_USB - Prefer USB output
&end END_BLE - Prefer BLE output
&end END_TOG - Toggle between USB and BLE
This commit is contained in:
@@ -10,3 +10,4 @@
|
||||
#include <behaviors/rgb_underglow.dtsi>
|
||||
#include <behaviors/bluetooth.dtsi>
|
||||
#include <behaviors/ext_power.dtsi>
|
||||
#include <behaviors/endpoints.dtsi>
|
||||
|
||||
9
app/dts/behaviors/endpoints.dtsi
Normal file
9
app/dts/behaviors/endpoints.dtsi
Normal file
@@ -0,0 +1,9 @@
|
||||
/ {
|
||||
behaviors {
|
||||
end: behavior_endpoints {
|
||||
compatible = "zmk,behavior-endpoints";
|
||||
label = "ENDPOINTS";
|
||||
#binding-cells = <1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
10
app/dts/bindings/behaviors/zmk,behavior-endpoints.yaml
Normal file
10
app/dts/bindings/behaviors/zmk,behavior-endpoints.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
#
|
||||
# Copyright (c) 2020, The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
description: Endpoints Behavior
|
||||
|
||||
compatible: "zmk,behavior-endpoints"
|
||||
|
||||
include: one_param.yaml
|
||||
Reference in New Issue
Block a user