feat(behaviors): Add macro support.

* Fine grainted press/release/tap actions.
* TIming between actions can be controlled.
* Processed async, to avoid blocking.
This commit is contained in:
Peter Johanson
2022-03-12 15:15:39 +00:00
committed by Pete Johanson
parent 58c7c0ee0c
commit 3a6a249ad0
36 changed files with 732 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
# Copyright (c) 2022 The ZMK Contributors
# SPDX-License-Identifier: MIT
description: Macro Behavior
compatible: "zmk,behavior-macro"
include: zero_param.yaml
properties:
bindings:
type: phandle-array
required: true
wait-ms:
type: int
default: 100
description: The default time to wait (in milliseconds) before triggering the next behavior in the macro bindings list.
tap-ms:
type: int
default: 100
description: The default time to wait (in milliseconds) between the press and release events on a tapped macro behavior binding

View File

@@ -0,0 +1,8 @@
# Copyright (c) 2022 The ZMK Contributors
# SPDX-License-Identifier: MIT
description: Set Macro To Press Mode
compatible: "zmk,macro-control-mode-press"
include: zero_param.yaml

View File

@@ -0,0 +1,8 @@
# Copyright (c) 2022 The ZMK Contributors
# SPDX-License-Identifier: MIT
description: Set Macro To Release Mode
compatible: "zmk,macro-control-mode-release"
include: zero_param.yaml

View File

@@ -0,0 +1,8 @@
# Copyright (c) 2022 The ZMK Contributors
# SPDX-License-Identifier: MIT
description: Set Macro To Tap Mode
compatible: "zmk,macro-control-mode-tap"
include: zero_param.yaml

View File

@@ -0,0 +1,8 @@
# Copyright (c) 2022 The ZMK Contributors
# SPDX-License-Identifier: MIT
description: Set Macro Tap Duration
compatible: "zmk,macro-control-tap-time"
include: one_param.yaml

View File

@@ -0,0 +1,8 @@
# Copyright (c) 2022 The ZMK Contributors
# SPDX-License-Identifier: MIT
description: Set Macro Wait Duration
compatible: "zmk,macro-control-wait-time"
include: one_param.yaml

View File

@@ -0,0 +1,8 @@
# Copyright (c) 2022 The ZMK Contributors
# SPDX-License-Identifier: MIT
description: Macro Pause Until Release Marker
compatible: "zmk,macro-pause-for-release"
include: zero_param.yaml