forked from kofal.net/zmk
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.
This commit is contained in:
@@ -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>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -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>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -13,9 +13,6 @@ properties:
|
||||
type: int
|
||||
required: true
|
||||
const: 2
|
||||
usage_page:
|
||||
type: int
|
||||
default: 0
|
||||
|
||||
sensor-binding-cells:
|
||||
- param1
|
||||
|
||||
Reference in New Issue
Block a user