forked from kofal.net/zmk
feat(behaviors): Support parameterized macros.
* Add two new compatibles for macros that take one or two parameters when bound in a keymap. * Use `¯o_param_1to1`, `¯o_param_1to2`, `¯o_param_2to1`, and `¯o_param_2to2` control entries in the bindings for the macro to have the next binding entry have it's values substituted. Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
This commit is contained in:
committed by
Pete Johanson
parent
e686fce4d9
commit
805dd4a53b
8
app/dts/bindings/macros/zmk,macro-param-1to1.yaml
Normal file
8
app/dts/bindings/macros/zmk,macro-param-1to1.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
# Copyright (c) 2023 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
description: Macro Parameter One Substituted Into Next Binding's First Parameter
|
||||
|
||||
compatible: "zmk,macro-param-1to1"
|
||||
|
||||
include: zero_param.yaml
|
||||
8
app/dts/bindings/macros/zmk,macro-param-1to2.yaml
Normal file
8
app/dts/bindings/macros/zmk,macro-param-1to2.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
# Copyright (c) 2023 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
description: Macro Parameter One Substituted Into Next Binding's Second Parameter
|
||||
|
||||
compatible: "zmk,macro-param-1to2"
|
||||
|
||||
include: zero_param.yaml
|
||||
8
app/dts/bindings/macros/zmk,macro-param-2to1.yaml
Normal file
8
app/dts/bindings/macros/zmk,macro-param-2to1.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
# Copyright (c) 2023 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
description: Macro Parameter Two Substituted Into Next Binding's First Parameter
|
||||
|
||||
compatible: "zmk,macro-param-2to1"
|
||||
|
||||
include: zero_param.yaml
|
||||
8
app/dts/bindings/macros/zmk,macro-param-2to2.yaml
Normal file
8
app/dts/bindings/macros/zmk,macro-param-2to2.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
# Copyright (c) 2023 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
description: Macro Parameter Two Substituted Into Next Binding's Second Parameter
|
||||
|
||||
compatible: "zmk,macro-param-2to2"
|
||||
|
||||
include: zero_param.yaml
|
||||
Reference in New Issue
Block a user