diff options
author | Peter Johanson <[email protected]> | 2023-12-30 16:38:52 -0800 |
---|---|---|
committer | Pete Johanson <[email protected]> | 2024-03-27 20:59:26 -0700 |
commit | a0ad1d4c9402fbfe5e3dee8996057150a3f0f209 (patch) | |
tree | 3901efbadebb89f7bf141354c8377ac1892c6bf8 /app/dts | |
parent | e78b25a445b5bfc4b0c9b979d68964729c3e8fa1 (diff) | |
download | zmk-a0ad1d4c9402fbfe5e3dee8996057150a3f0f209.tar.gz zmk-a0ad1d4c9402fbfe5e3dee8996057150a3f0f209.zip |
refactor: Add kscan sideband behavior driver
* Instead of gpio key behavior trigger, add new kscan driver that
decorates/wraps a given kscan driver and will invoke basic system
behavior assigned to a given row + column, without the need for keymap
mapping in the matrix transform, bypassing keymaps entirely.
Diffstat (limited to 'app/dts')
-rw-r--r-- | app/dts/bindings/kscan/zmk,kscan-sideband-behaviors.yaml | 29 | ||||
-rw-r--r-- | app/dts/bindings/zmk,gpio-key-behavior-trigger.yaml | 31 |
2 files changed, 29 insertions, 31 deletions
diff --git a/app/dts/bindings/kscan/zmk,kscan-sideband-behaviors.yaml b/app/dts/bindings/kscan/zmk,kscan-sideband-behaviors.yaml new file mode 100644 index 0000000000..7289b9e169 --- /dev/null +++ b/app/dts/bindings/kscan/zmk,kscan-sideband-behaviors.yaml @@ -0,0 +1,29 @@ +# Copyright (c) 2023, The ZMK Contributors +# SPDX-License-Identifier: MIT + +description: | + kscan sideband behavior runner. Only basic system behavior should be used, + since no keymap processing occurs when using them. + +compatible: "zmk,kscan-sideband-behaviors" + +include: [kscan.yaml] + +properties: + kscan: + type: phandle + required: true + +child-binding: + description: "A sideband behavior tied to a row/column pair" + + properties: + row: + type: int + required: true + column: + type: int + required: true + bindings: + type: phandle-array + required: true diff --git a/app/dts/bindings/zmk,gpio-key-behavior-trigger.yaml b/app/dts/bindings/zmk,gpio-key-behavior-trigger.yaml deleted file mode 100644 index 2a1387f022..0000000000 --- a/app/dts/bindings/zmk,gpio-key-behavior-trigger.yaml +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright (c) 2023 The ZMK Contributors -# SPDX-License-Identifier: MIT - -description: | - Driver for a dedicated key for invoking a connected behavior. - -compatible: "zmk,gpio-key-behavior-trigger" - -include: base.yaml - -properties: - key: - type: phandle - required: true - description: The GPIO key that triggers wake via interrupt - bindings: - type: phandle - required: true - description: The behavior to invoke when the GPIO key is pressed - debounce-press-ms: - type: int - default: 5 - description: Debounce time for key press in milliseconds. Use 0 for eager debouncing. - debounce-release-ms: - type: int - default: 5 - description: Debounce time for key release in milliseconds. - debounce-scan-period-ms: - type: int - default: 1 - description: Time between reads in milliseconds when any key is pressed. |