From 7580668d970df8162683c42e80e4ad8c2b23ae49 Mon Sep 17 00:00:00 2001 From: Alexander Krikun Date: Thu, 23 Sep 2021 21:04:47 +0300 Subject: [PATCH] Added documentation for new features --- docs/docs/behaviors/mouse-emulation.md | 39 +++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/docs/docs/behaviors/mouse-emulation.md b/docs/docs/behaviors/mouse-emulation.md index fec7e2c6..a2364656 100644 --- a/docs/docs/behaviors/mouse-emulation.md +++ b/docs/docs/behaviors/mouse-emulation.md @@ -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. +## 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 To make it easier to encode the HID keycode numeric values, most keymaps include @@ -52,7 +66,7 @@ Example: &mmv MOVE_UP ``` -## Mouse Wheel +## Mouse Scrolling This behaviour is used to scroll, both horizontally and vertically. @@ -67,3 +81,26 @@ Example: ``` &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 { + ... + }; +}; +```