From 3c1adf4898f2ce8ca645f38087fcc6658a93ab1b Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Wed, 4 Dec 2024 16:13:34 -0700 Subject: [PATCH] fixup! docs: Add initial pointer docs. --- docs/docs/features/pointing.md | 4 ++-- docs/docs/keymaps/behaviors/mouse-emulation.md | 17 +++++++++++++++-- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/docs/docs/features/pointing.md b/docs/docs/features/pointing.md index a793ee726c39..df90d14e39f4 100644 --- a/docs/docs/features/pointing.md +++ b/docs/docs/features/pointing.md @@ -10,7 +10,7 @@ To enable the pointer functionality, you must set `CONFIG_ZMK_MOUSE=y` in your c :::warning -When enabling the feature, changes are made to the HID report descriptor, which may not get picked up automatically over BLE to some hosts. Be sure to remove and re-pair to your hosts once you enable the feature +When enabling the feature, changes are made to the HID report descriptor which some hosts may not pick up automatically over BLE. Be sure to remove and re-pair to your hosts once you enable the feature. ::: @@ -22,7 +22,7 @@ See the [mouse emulation behaviors](../keymaps/behaviors/mouse-emulation.md) for ## Physical Pointing Devices -There are a few drivers available for supported physical pointing devices integrated into ZMK powered device. When doing so, you can use your device as both a keyboard and a pointing device with any connected hosts. The functionality can be extended further, e.g. slow mode, scroll mode, temporary mouse layers, etc. by configuring input processors linked to the physical pointing device. +There are a few drivers available for supported physical pointing devices integrated into ZMK powered device. When doing so, you can use your device as both a keyboard and a pointing device with any connected hosts. The functionality can be extended further, e.g. slow mode, scroll mode, temporary mouse layers, etc. by configuring [input processors](#input-processors) linked to the physical pointing device. For more information, refer to the [pointer hardware integration](../development/hardware-integration/pointing.md) documentation. diff --git a/docs/docs/keymaps/behaviors/mouse-emulation.md b/docs/docs/keymaps/behaviors/mouse-emulation.md index 65fa480bf64f..310ad2018b28 100644 --- a/docs/docs/keymaps/behaviors/mouse-emulation.md +++ b/docs/docs/keymaps/behaviors/mouse-emulation.md @@ -32,6 +32,15 @@ provided by ZMK near the top: #include ``` +Should you wish to override the default movement or scrolling max velocities, you can define the defaults before including the header, e.g.: + +```c +#define ZMK_MOUSE_DEFAULT_MOVE_VAL 1500 +#define ZMK_MOUSE_DEFAULT_SCRL_VAL 20 + +#include +``` + ## Mouse Button Press This behavior can press/release up to 5 mouse buttons. @@ -84,9 +93,9 @@ This behavior sends mouse X/Y movement events to the connected host. ### Behavior Binding - Reference: `&mmv` -- Parameter: A `uint32` with 16-bits each used for vertical and horizontal velocity. +- Parameter: A `uint32` with 16-bits each used for vertical and horizontal max velocity. -The following defines can be passed for the parameter: +The following predefined values can be passed for the parameter: | Define | Action | | :----------- | :--------- | @@ -95,6 +104,8 @@ The following defines can be passed for the parameter: | `MOVE_LEFT` | Move left | | `MOVE_RIGHT` | Move right | +Additionally, if you want to pass a different max speed than the default for the `MOVE_*` defines, custom X and Y velocity values can be passed with `MOVE_X` and `MOVE_Y`, e.g. `MOVE_X(100)` or `MOVE_Y(-100)`. + ### Examples The following will send a down mouse movement event to the host when pressed/held: @@ -137,6 +148,8 @@ The following defines can be passed for the parameter: | `SCRL_LEFT` | Scroll left | | `SCRL_RIGHT` | Scroll right | +Additionally, if you want to pass a different max speed than the default for the `SCRL_*` defines, custom X and Y velocity values can be passed with `MOVE_X` and `MOVE_Y`, e.g. `MOVE_X(5)` or `MOVE_Y(-5)`. + ### Examples The following will send a scroll down event to the host when pressed/held: