summaryrefslogtreecommitdiff
path: root/app/dts
diff options
context:
space:
mode:
authorPete Johanson <peter@peterjohanson.com>2020-10-26 00:30:24 -0400
committerPete Johanson <peter@peterjohanson.com>2020-11-05 14:55:40 -0500
commiteff1b8223b5010d526914530c5d1d469eff356df (patch)
tree70a7d7c603d0c384110fec9bc4b5dd7b01896a7f /app/dts
parent5f83568a93bbbf07bed6e710ba8c44e45b955ec5 (diff)
refactor(keys): Unify usage page.
* Remove need for separate `&cp` behavior, but keep it for now for backward compat. * Refactor sensor inc/dec as well.
Diffstat (limited to 'app/dts')
-rw-r--r--app/dts/behaviors/key_press.dtsi11
-rw-r--r--app/dts/behaviors/sensor_rotate_key_press.dtsi11
-rw-r--r--app/dts/bindings/behaviors/zmk,behavior-key-press.yaml5
-rw-r--r--app/dts/bindings/behaviors/zmk,behavior-sensor-rotate-key-press.yaml3
4 files changed, 4 insertions, 26 deletions
diff --git a/app/dts/behaviors/key_press.dtsi b/app/dts/behaviors/key_press.dtsi
index a9e8d8b..77050aa 100644
--- a/app/dts/behaviors/key_press.dtsi
+++ b/app/dts/behaviors/key_press.dtsi
@@ -3,17 +3,10 @@
/ {
behaviors {
- kp: behavior_key_press {
+ /* DEPRECATED: `cp` will be removed in the future */
+ cp: kp: behavior_key_press {
compatible = "zmk,behavior-key-press";
label = "KEY_PRESS";
- usage_page = <HID_USAGE_KEY>;
- #binding-cells = <1>;
- };
-
- cp: behavior_consumer_press {
- compatible = "zmk,behavior-key-press";
- label = "CONSUMER_PRESS";
- usage_page = <HID_USAGE_CONSUMER>;
#binding-cells = <1>;
};
};
diff --git a/app/dts/behaviors/sensor_rotate_key_press.dtsi b/app/dts/behaviors/sensor_rotate_key_press.dtsi
index fa410f1..5433994 100644
--- a/app/dts/behaviors/sensor_rotate_key_press.dtsi
+++ b/app/dts/behaviors/sensor_rotate_key_press.dtsi
@@ -3,17 +3,10 @@
/ {
behaviors {
- inc_dec_kp: behavior_sensor_rotate_key_press {
+ /* DEPRECATED: `inc_dec_cp` will be removed in the future */
+ inc_dec_cp: inc_dec_kp: behavior_sensor_rotate_key_press {
compatible = "zmk,behavior-sensor-rotate-key-press";
label = "ENC_KEY_PRESS";
- usage_page = <HID_USAGE_KEY>;
- #sensor-binding-cells = <2>;
- };
-
- inc_dec_cp: behavior_sensor_rotate_consumer_press {
- compatible = "zmk,behavior-sensor-rotate-key-press";
- label = "ENC_CONSUMER_PRESS";
- usage_page = <HID_USAGE_CONSUMER>;
#sensor-binding-cells = <2>;
};
};
diff --git a/app/dts/bindings/behaviors/zmk,behavior-key-press.yaml b/app/dts/bindings/behaviors/zmk,behavior-key-press.yaml
index 7ec5494..0169d7d 100644
--- a/app/dts/bindings/behaviors/zmk,behavior-key-press.yaml
+++ b/app/dts/bindings/behaviors/zmk,behavior-key-press.yaml
@@ -6,8 +6,3 @@ description: Key press/release behavior
compatible: "zmk,behavior-key-press"
include: one_param.yaml
-
-properties:
- usage_page:
- type: int
- default: 0
diff --git a/app/dts/bindings/behaviors/zmk,behavior-sensor-rotate-key-press.yaml b/app/dts/bindings/behaviors/zmk,behavior-sensor-rotate-key-press.yaml
index 6b33910..b34507f 100644
--- a/app/dts/bindings/behaviors/zmk,behavior-sensor-rotate-key-press.yaml
+++ b/app/dts/bindings/behaviors/zmk,behavior-sensor-rotate-key-press.yaml
@@ -13,9 +13,6 @@ properties:
type: int
required: true
const: 2
- usage_page:
- type: int
- default: 0
sensor-binding-cells:
- param1