forked from kofal.net/zmk
Some initial work on behavior bindings for keymaps
This commit is contained in:
9
app/dts/behaviors/key_press.dtsi
Normal file
9
app/dts/behaviors/key_press.dtsi
Normal file
@@ -0,0 +1,9 @@
|
||||
/ {
|
||||
behaviors {
|
||||
kp: behavior_key_press {
|
||||
compatible = "zmk,behavior-key-press";
|
||||
label = "KEY_PRESS";
|
||||
#binding-cells = <1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
9
app/dts/behaviors/reset.dtsi
Normal file
9
app/dts/behaviors/reset.dtsi
Normal file
@@ -0,0 +1,9 @@
|
||||
/ {
|
||||
behaviors {
|
||||
reset: behavior_reset {
|
||||
compatible = "zmk,behavior-reset";
|
||||
label = "RESET";
|
||||
#binding-cells = <0>;
|
||||
};
|
||||
};
|
||||
};
|
||||
14
app/dts/bindings/behaviors/one_param.yaml
Normal file
14
app/dts/bindings/behaviors/one_param.yaml
Normal file
@@ -0,0 +1,14 @@
|
||||
# Copyright (c) 2020, Pete Johanson
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
properties:
|
||||
label:
|
||||
type: string
|
||||
required: true
|
||||
"#binding-cells":
|
||||
type: int
|
||||
required: true
|
||||
const: 1
|
||||
|
||||
binding-cells:
|
||||
- param1
|
||||
15
app/dts/bindings/behaviors/two_param.yaml
Normal file
15
app/dts/bindings/behaviors/two_param.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
# Copyright (c) 2020, Pete Johanson
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
properties:
|
||||
label:
|
||||
type: string
|
||||
required: true
|
||||
"#binding-cells":
|
||||
type: int
|
||||
required: true
|
||||
const: 2
|
||||
|
||||
binding-cells:
|
||||
- param1
|
||||
- param2
|
||||
11
app/dts/bindings/behaviors/zero_param.yaml
Normal file
11
app/dts/bindings/behaviors/zero_param.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
# Copyright (c) 2020, Pete Johanson
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
properties:
|
||||
label:
|
||||
type: string
|
||||
required: true
|
||||
"#binding-cells":
|
||||
type: int
|
||||
required: true
|
||||
const: 0
|
||||
8
app/dts/bindings/behaviors/zmk,behavior-key-press.yaml
Normal file
8
app/dts/bindings/behaviors/zmk,behavior-key-press.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
# Copyright (c) 2020, Pete Johanson
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
description: Key press/release behavior
|
||||
|
||||
compatible: "zmk,behavior-key-press"
|
||||
|
||||
include: one_param.yaml
|
||||
8
app/dts/bindings/behaviors/zmk,behavior-reset.yaml
Normal file
8
app/dts/bindings/behaviors/zmk,behavior-reset.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
# Copyright (c) 2020, Pete Johanson
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
description: Keyboard Reset Behavior
|
||||
|
||||
compatible: "zmk,behavior-reset"
|
||||
|
||||
include: zero_param.yaml
|
||||
@@ -11,4 +11,5 @@ child-binding:
|
||||
type: string
|
||||
keys:
|
||||
type: array
|
||||
|
||||
bindings:
|
||||
type: phandle-array
|
||||
|
||||
Reference in New Issue
Block a user