From 4b546489563eb460071c7a4eb4d7369939bf1200 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Mon, 2 Dec 2024 11:39:43 -0700 Subject: [PATCH] fixup! docs: Add initial pointer docs. --- .../docs/keymaps/behaviors/mouse-emulation.md | 40 ++++++++++++++++++- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/docs/docs/keymaps/behaviors/mouse-emulation.md b/docs/docs/keymaps/behaviors/mouse-emulation.md index 7e31b5fe074..8a3dab57411 100644 --- a/docs/docs/keymaps/behaviors/mouse-emulation.md +++ b/docs/docs/keymaps/behaviors/mouse-emulation.md @@ -130,8 +130,8 @@ This behavior sends vertical and horizontal scroll events to the connected host. The following defines can be passed for the parameter: -| Define | Action | -| :----------- | :--------- | +| Define | Action | +| :----------- | :----------- | | `SCRL_UP` | Scroll up | | `SCRL_DOWN` | Scroll down | | `SCRL_LEFT` | Scroll left | @@ -151,6 +151,12 @@ The following will send a scroll left event to the host when pressed/held: &msc SCRL_LEFT ``` +:::note + +If you enabled [smooth scrolling](../../config/pointers.md#kconfig) then you will want to use the same `MOVE_UP`, `MOVE_DOWN`, etc values instead of the smaller `SCRL_*` parameters. + +::: + ### Input Processors If you want to apply any [input processors](../input-processors/index.md#input-processors-overview) to `&msc` you can do so by referencing `&msc_input_listener`, e.g.: @@ -160,3 +166,33 @@ If you want to apply any [input processors](../input-processors/index.md#input-p input-processors = <&zip_temp_layer 2 2000>; } ``` + +### Advanced Configuration + +Both `&mmv` and `&msc` are instances of the same `"zmk,behavior-input-two-axis"` behavior. As such, the following settings can be applied to either behavior, e.g.: + +```dts +&mmv { + trigger-period-ms = <12> +}; +``` + +#### `trigger-period-ms` + +How many milliseconds between generated input events based on the current speed/direction. + +#### `delay-ms` + +How many milliseconds to delay any processing or event generation when first pressed. + +#### `time-to-max-speed-ms` + +How many milliseconds it takes to accelerate to the curren max speed. + +#### `acceleration-exponent` + +The acceleration exponent to apply, with three possible values: + +- `0` - uniform speed +- `1` - uniform acceleration +- `2` - exponential acceleration