Added documentation for new features

This commit is contained in:
Alexander Krikun 2021-09-23 21:04:47 +03:00
parent c6c4e9b531
commit 7580668d97

View file

@ -9,6 +9,20 @@ Mouse emulation behaviors send mouse movements, button presses or scroll actions
Please view [`dt-bindings/zmk/mouse.h`](https://github.com/zmkfirmware/zmk/blob/main/app/include/dt-bindings/zmk/mouse.h) for a comprehensive list of signals. Please view [`dt-bindings/zmk/mouse.h`](https://github.com/zmkfirmware/zmk/blob/main/app/include/dt-bindings/zmk/mouse.h) for a comprehensive list of signals.
## Configuration options
This feature should be enabled via a config option:
```
CONFIG_ZMK_MOUSE=y
```
This option enables several others.
### Dedicated thread processing
`CONFIG_ZMK_MOUSE_WORK_QUEUE_DEDICATED` is enabled by default and separates the processing of mouse signals into a dedicated thread, significantly improving performance.
### Tick rate configuration
`CONFIG_ZMK_MOUSE_TICK_DURATION` sets the tick rate for mouse polling. It is set to 8 ms. by default.
## Keycode Defines ## Keycode Defines
To make it easier to encode the HID keycode numeric values, most keymaps include To make it easier to encode the HID keycode numeric values, most keymaps include
@ -52,7 +66,7 @@ Example:
&mmv MOVE_UP &mmv MOVE_UP
``` ```
## Mouse Wheel ## Mouse Scrolling
This behaviour is used to scroll, both horizontally and vertically. This behaviour is used to scroll, both horizontally and vertically.
@ -67,3 +81,26 @@ Example:
``` ```
&mwh SCROLL_UP &mwh SCROLL_UP
``` ```
## Acceleration
Both mouse movement and scrolling have independently configurable acceleration profiles with three parameters: delay before movement, time to max speed and the acceleration exponent.
The exponent is usually set to 0 for constant speed, 1 for uniform acceleration or 2 for uniform jerk.
These profiles can be configured inside your keymap:
```
&mmv {
time-to-max-speed-ms = <500>;
};
&mwh {
acceleration-exponent=<1>;
};
/ {
keymap {
...
};
};
```