From c23d752917774bc740c791e2f7eeef6f8f9e1033 Mon Sep 17 00:00:00 2001 From: Pete Johanson Date: Fri, 19 Jun 2020 15:32:33 -0400 Subject: Some initial work on behavior bindings for keymaps --- app/dts/bindings/behaviors/one_param.yaml | 14 ++++++++++++++ app/dts/bindings/behaviors/two_param.yaml | 15 +++++++++++++++ app/dts/bindings/behaviors/zero_param.yaml | 11 +++++++++++ app/dts/bindings/behaviors/zmk,behavior-key-press.yaml | 8 ++++++++ app/dts/bindings/behaviors/zmk,behavior-reset.yaml | 8 ++++++++ 5 files changed, 56 insertions(+) create mode 100644 app/dts/bindings/behaviors/one_param.yaml create mode 100644 app/dts/bindings/behaviors/two_param.yaml create mode 100644 app/dts/bindings/behaviors/zero_param.yaml create mode 100644 app/dts/bindings/behaviors/zmk,behavior-key-press.yaml create mode 100644 app/dts/bindings/behaviors/zmk,behavior-reset.yaml (limited to 'app/dts/bindings/behaviors') diff --git a/app/dts/bindings/behaviors/one_param.yaml b/app/dts/bindings/behaviors/one_param.yaml new file mode 100644 index 0000000..1f33aee --- /dev/null +++ b/app/dts/bindings/behaviors/one_param.yaml @@ -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 diff --git a/app/dts/bindings/behaviors/two_param.yaml b/app/dts/bindings/behaviors/two_param.yaml new file mode 100644 index 0000000..f8b3af9 --- /dev/null +++ b/app/dts/bindings/behaviors/two_param.yaml @@ -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 diff --git a/app/dts/bindings/behaviors/zero_param.yaml b/app/dts/bindings/behaviors/zero_param.yaml new file mode 100644 index 0000000..20f1528 --- /dev/null +++ b/app/dts/bindings/behaviors/zero_param.yaml @@ -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 diff --git a/app/dts/bindings/behaviors/zmk,behavior-key-press.yaml b/app/dts/bindings/behaviors/zmk,behavior-key-press.yaml new file mode 100644 index 0000000..0169d7d --- /dev/null +++ b/app/dts/bindings/behaviors/zmk,behavior-key-press.yaml @@ -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 diff --git a/app/dts/bindings/behaviors/zmk,behavior-reset.yaml b/app/dts/bindings/behaviors/zmk,behavior-reset.yaml new file mode 100644 index 0000000..c8e5e6f --- /dev/null +++ b/app/dts/bindings/behaviors/zmk,behavior-reset.yaml @@ -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 -- cgit v1.2.3 From d65629b9a0b79b6e294419fe9a4118fb09491c91 Mon Sep 17 00:00:00 2001 From: Pete Johanson Date: Sat, 20 Jun 2020 00:11:39 -0400 Subject: Lots more pieces toward HID working again. --- app/dts/bindings/behaviors/zmk,behavior-hid.yaml | 8 ++++++++ app/dts/bindings/behaviors/zmk,behavior-keymap.yaml | 8 ++++++++ 2 files changed, 16 insertions(+) create mode 100644 app/dts/bindings/behaviors/zmk,behavior-hid.yaml create mode 100644 app/dts/bindings/behaviors/zmk,behavior-keymap.yaml (limited to 'app/dts/bindings/behaviors') diff --git a/app/dts/bindings/behaviors/zmk,behavior-hid.yaml b/app/dts/bindings/behaviors/zmk,behavior-hid.yaml new file mode 100644 index 0000000..f3e0603 --- /dev/null +++ b/app/dts/bindings/behaviors/zmk,behavior-hid.yaml @@ -0,0 +1,8 @@ +# Copyright (c) 2020, Pete Johanson +# SPDX-License-Identifier: MIT + +description: HID Report Behavior + +compatible: "zmk,behavior-hid" + +include: zero_param.yaml diff --git a/app/dts/bindings/behaviors/zmk,behavior-keymap.yaml b/app/dts/bindings/behaviors/zmk,behavior-keymap.yaml new file mode 100644 index 0000000..1d8a51f --- /dev/null +++ b/app/dts/bindings/behaviors/zmk,behavior-keymap.yaml @@ -0,0 +1,8 @@ +# Copyright (c) 2020, Pete Johanson +# SPDX-License-Identifier: MIT + +description: Keymap Behavior + +compatible: "zmk,behavior-keymap" + +include: zero_param.yaml -- cgit v1.2.3 From 223edf05ad08938b066f9187668ebfae43c5e91a Mon Sep 17 00:00:00 2001 From: Pete Johanson Date: Sun, 21 Jun 2020 21:43:44 -0400 Subject: Refactor global bindings, implement mod-tap. * Use extra comptible = "zmk,behavior-global" to add behaviors to global bindings for event notification. * Implement mod-tap, as a keymap binding and global one to skip tap if other keycode pressed while held. --- app/dts/bindings/behaviors/zmk,behavior-mod-tap.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 app/dts/bindings/behaviors/zmk,behavior-mod-tap.yaml (limited to 'app/dts/bindings/behaviors') diff --git a/app/dts/bindings/behaviors/zmk,behavior-mod-tap.yaml b/app/dts/bindings/behaviors/zmk,behavior-mod-tap.yaml new file mode 100644 index 0000000..7911082 --- /dev/null +++ b/app/dts/bindings/behaviors/zmk,behavior-mod-tap.yaml @@ -0,0 +1,8 @@ +# Copyright (c) 2020, Pete Johanson +# SPDX-License-Identifier: MIT + +description: Mod-Tap Beavhior + +compatible: "zmk,behavior-mod-tap" + +include: two_param.yaml -- cgit v1.2.3 From 93635077e600e269aa905a0558c07acf0efebffb Mon Sep 17 00:00:00 2001 From: Pete Johanson Date: Sun, 21 Jun 2020 21:56:49 -0400 Subject: Implement momentary layer + transparent behaviors * Implement "momentary layer" behavior with `&mo` reference. * Implement basic "transparent" behavior with `&trans` reference. --- app/dts/bindings/behaviors/zmk,behavior-momentary-layer.yaml | 8 ++++++++ app/dts/bindings/behaviors/zmk,behavior-transparent.yaml | 8 ++++++++ 2 files changed, 16 insertions(+) create mode 100644 app/dts/bindings/behaviors/zmk,behavior-momentary-layer.yaml create mode 100644 app/dts/bindings/behaviors/zmk,behavior-transparent.yaml (limited to 'app/dts/bindings/behaviors') diff --git a/app/dts/bindings/behaviors/zmk,behavior-momentary-layer.yaml b/app/dts/bindings/behaviors/zmk,behavior-momentary-layer.yaml new file mode 100644 index 0000000..70c7c7f --- /dev/null +++ b/app/dts/bindings/behaviors/zmk,behavior-momentary-layer.yaml @@ -0,0 +1,8 @@ +# Copyright (c) 2020, Pete Johanson +# SPDX-License-Identifier: MIT + +description: Momentary layer on press/release behavior + +compatible: "zmk,behavior-momentary-layer" + +include: one_param.yaml diff --git a/app/dts/bindings/behaviors/zmk,behavior-transparent.yaml b/app/dts/bindings/behaviors/zmk,behavior-transparent.yaml new file mode 100644 index 0000000..33f1aba --- /dev/null +++ b/app/dts/bindings/behaviors/zmk,behavior-transparent.yaml @@ -0,0 +1,8 @@ +# Copyright (c) 2020, Pete Johanson +# SPDX-License-Identifier: MIT + +description: Transparent Binding Behavior + +compatible: "zmk,behavior-transparent" + +include: zero_param.yaml -- cgit v1.2.3 From 55cf9db564e66e2804f2d3f2201c55c3c86a90d7 Mon Sep 17 00:00:00 2001 From: Pete Johanson Date: Mon, 22 Jun 2020 11:06:01 -0400 Subject: Fix consumer keys w/ refactored behaviors. --- app/dts/bindings/behaviors/zmk,behavior-key-press.yaml | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'app/dts/bindings/behaviors') diff --git a/app/dts/bindings/behaviors/zmk,behavior-key-press.yaml b/app/dts/bindings/behaviors/zmk,behavior-key-press.yaml index 0169d7d..7ec5494 100644 --- a/app/dts/bindings/behaviors/zmk,behavior-key-press.yaml +++ b/app/dts/bindings/behaviors/zmk,behavior-key-press.yaml @@ -6,3 +6,8 @@ description: Key press/release behavior compatible: "zmk,behavior-key-press" include: one_param.yaml + +properties: + usage_page: + type: int + default: 0 -- cgit v1.2.3