Skip to content

Commit

Permalink
fixup! docs: Add initial pointer docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
petejohanson committed Dec 2, 2024
1 parent 1e1a8df commit 4b54648
Showing 1 changed file with 38 additions and 2 deletions.
40 changes: 38 additions & 2 deletions docs/docs/keymaps/behaviors/mouse-emulation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand All @@ -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.:
Expand All @@ -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

0 comments on commit 4b54648

Please sign in to comment.