From eff1b8223b5010d526914530c5d1d469eff356df Mon Sep 17 00:00:00 2001 From: Pete Johanson Date: Mon, 26 Oct 2020 00:30:24 -0400 Subject: 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. --- app/dts/behaviors/key_press.dtsi | 11 ++--------- app/dts/behaviors/sensor_rotate_key_press.dtsi | 11 ++--------- app/dts/bindings/behaviors/zmk,behavior-key-press.yaml | 5 ----- .../behaviors/zmk,behavior-sensor-rotate-key-press.yaml | 3 --- 4 files changed, 4 insertions(+), 26 deletions(-) (limited to 'app/dts') 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 = ; - #binding-cells = <1>; - }; - - cp: behavior_consumer_press { - compatible = "zmk,behavior-key-press"; - label = "CONSUMER_PRESS"; - usage_page = ; #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 = ; - #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 = ; #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 -- cgit v1.2.3