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:
@@ -282,3 +282,23 @@ Applies to: `compatible = "zmk,behavior-tap-dance"`
|
||||
| `#binding-cells` | int | Must be `<0>` | |
|
||||
| `bindings` | phandle array | A list of behaviors from which to select | |
|
||||
| `tapping-term-ms` | int | The maximum time (in milliseconds) between taps before an item from `bindings` is triggered. | 200 |
|
||||
|
||||
## Two Axis Input
|
||||
|
||||
This behavior is part of the core [pointing devices](../features/pointing.md) feature, and is used to generate X/Y and scroll input events. It is the underlying behavior used for the mouse [move](../keymaps/behaviors/mouse-emulation.md#mouse-move) and [scroll](../keymaps/behaviors/mouse-emulation.md#mouse-scroll) behaviors.
|
||||
|
||||
### Devicetree
|
||||
|
||||
Definition file: [zmk/app/dts/bindings/behaviors/zmk,behavior-input-two-axis.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/dts/bindings/behaviors/zmk%2Cbehavior-input-two-axis.yaml)
|
||||
|
||||
Applies to: `compatible = "zmk,behavior-input-two-axis"`
|
||||
|
||||
| Property | Type | Description | Default |
|
||||
| ----------------------- | ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
|
||||
| `#binding-cells` | int | Must be `<1>` | |
|
||||
| `x-input-code` | int | The [relative event code](https://github.com/zmkfirmware/zephyr/blob/v3.5.0%2Bzmk-fixes/include/zephyr/dt-bindings/input/input-event-codes.h#L245) for generated input events for the X-axis. | |
|
||||
| `y-input-code` | int | The [relative event code](https://github.com/zmkfirmware/zephyr/blob/v3.5.0%2Bzmk-fixes/include/zephyr/dt-bindings/input/input-event-codes.h#L245) for generated input events for the Y-axis. | |
|
||||
| `trigger-period-ms` | int | How many milliseconds between generated input events based on the current speed/direction. | 16 |
|
||||
| `delay-ms` | int | How many milliseconds to delay any processing or event generation when first pressed. | 0 |
|
||||
| `time-to-max-speed-ms` | int | How many milliseconds it takes to accelerate to the curren max speed. | 0 |
|
||||
| `acceleration-exponent` | int | The acceleration exponent to apply: `0` - uniform speed, `1` - uniform acceleration, `2` - linear acceleration | 1 |
|
||||
|
||||
Reference in New Issue
Block a user