forked from kofal.net/zmk
feat(mouse): Add mouse move and scroll support (#2477)
* feat(mouse): Add mouse move and scroll support
* Use Zephyr input subsystem for all pointers.
* Input processors for modifying events, e.g. scaling, swapping
codes, temporary (mouse) layers, etc.
* Mouse move/scroll behaviors.
* Infrastructure in place for physical pointer input devices.
* feat: Add input split support.
* docs: Add initial pointer docs.
---------
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
Co-authored-by: Alexander Krikun <krikun98@gmail.com>
Co-authored-by: Robert U <urob@users.noreply.github.com>
Co-authored-by: Shawn Meier <ftc@users.noreply.github.com>
Co-authored-by: Chris Andreae <chris@andreae.gen.nz>
Co-authored-by: Anant Thazhemadam <47104651+thazhemadam@users.noreply.github.com>
Co-authored-by: Erik Tollerud <erik.tollerud@gmail.com>
Co-authored-by: Nicolas Munnich <98408764+Nick-Munnich@users.noreply.github.com>
This commit is contained in:
6
app/dts/bindings/input_processors/ip_common.yaml
Normal file
6
app/dts/bindings/input_processors/ip_common.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
# Copyright (c) 2024 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
properties:
|
||||
track-remainders:
|
||||
type: boolean
|
||||
13
app/dts/bindings/input_processors/ip_one_param.yaml
Normal file
13
app/dts/bindings/input_processors/ip_one_param.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
# Copyright (c) 2024 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
include: ip_common.yaml
|
||||
|
||||
properties:
|
||||
"#input-processor-cells":
|
||||
type: int
|
||||
required: true
|
||||
const: 1
|
||||
|
||||
input-processor-cells:
|
||||
- param1
|
||||
14
app/dts/bindings/input_processors/ip_two_param.yaml
Normal file
14
app/dts/bindings/input_processors/ip_two_param.yaml
Normal file
@@ -0,0 +1,14 @@
|
||||
# Copyright (c) 2024 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
include: ip_common.yaml
|
||||
|
||||
properties:
|
||||
"#input-processor-cells":
|
||||
type: int
|
||||
required: true
|
||||
const: 2
|
||||
|
||||
input-processor-cells:
|
||||
- param1
|
||||
- param2
|
||||
10
app/dts/bindings/input_processors/ip_zero_param.yaml
Normal file
10
app/dts/bindings/input_processors/ip_zero_param.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# Copyright (c) 2024 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
include: ip_common.yaml
|
||||
|
||||
properties:
|
||||
"#input-processor-cells":
|
||||
type: int
|
||||
required: true
|
||||
const: 0
|
||||
@@ -0,0 +1,16 @@
|
||||
# Copyright (c) 2024, The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
description: Input Processor for remapping certain input codes to other codes
|
||||
|
||||
compatible: "zmk,input-processor-code-mapper"
|
||||
|
||||
include: ip_zero_param.yaml
|
||||
|
||||
properties:
|
||||
type:
|
||||
type: int
|
||||
required: true
|
||||
map:
|
||||
type: array
|
||||
required: true
|
||||
@@ -0,0 +1,16 @@
|
||||
# Copyright (c) 2024, The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
description: Input Processor for scaling values
|
||||
|
||||
compatible: "zmk,input-processor-scaler"
|
||||
|
||||
include: ip_two_param.yaml
|
||||
|
||||
properties:
|
||||
type:
|
||||
type: int
|
||||
required: true
|
||||
codes:
|
||||
type: array
|
||||
required: true
|
||||
@@ -0,0 +1,21 @@
|
||||
# Copyright (c) 2024, The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
description: Input Processor for temporarily enabling a layer after input events
|
||||
|
||||
compatible: "zmk,input-processor-temp-layer"
|
||||
|
||||
include: ip_two_param.yaml
|
||||
|
||||
properties:
|
||||
require-prior-idle-ms:
|
||||
type: int
|
||||
required: false
|
||||
default: 0
|
||||
description: Time in milliseconds that must pass after the last keystroke before the layer can be toggled
|
||||
|
||||
excluded-positions:
|
||||
type: array
|
||||
required: false
|
||||
default: []
|
||||
description: Array of key positions that will NOT trigger layer deactivation when pressed
|
||||
@@ -0,0 +1,18 @@
|
||||
# Copyright (c) 2024, The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
description: Input Processor for transforming values in various ways
|
||||
|
||||
compatible: "zmk,input-processor-transform"
|
||||
|
||||
include: ip_one_param.yaml
|
||||
|
||||
properties:
|
||||
type:
|
||||
type: int
|
||||
x-codes:
|
||||
type: array
|
||||
required: true
|
||||
y-codes:
|
||||
type: array
|
||||
required: true
|
||||
Reference in New Issue
Block a user