Add mouse behaviour documentation

This commit is contained in:
Dmitry Tsykunov 2021-05-01 09:38:57 +03:00 committed by Alexander Krikun
parent 3eebe8657b
commit 5083b31296
4 changed files with 114 additions and 0 deletions

View file

@ -5,6 +5,7 @@
*/
#pragma once
/* Mouse press behavior */
/* Left click */
#define MB1 (0x01)
#define LCLK (MB1)
@ -27,6 +28,8 @@
#define MB8 (0x80)
/* Mouse move behavior */
#define MOVE_UP (0x0000FFFF)
#define MOVE_DOWN (0x00000001)
@ -35,6 +38,8 @@
#define MOVE_RIGHT (0x00010000)
/* Mouse wheel behavior */
#define WHEEL_UP (0x0001)
#define WHEEL_DOWN (0x00FF)

View file

@ -0,0 +1,37 @@
---
title: Mouse Move Behavior
sidebar_label: Mouse Move
---
## Summary
Mouse move behavior allows to send keycode signals of mouse movement.
Please visit 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.
## Keycode Defines
To make it easier to encode the HID keycode numeric values, most keymaps include
the [`dt-bindings/zmk/mouse.h`](https://github.com/zmkfirmware/zmk/blob/main/app/include/dt-bindings/zmk/mouse.h) header
provided by ZMK near the top:
```
#include <dt-bindings/zmk/mouse.h>
```
Doing so makes a set of defines such as `MOVE_UP`, `MOVE_DOWN`, `MOVE_LEFT` and `MOVE_RIGHT` available for use with these behaviors.
## Mouse press
The "mouse move" behavior sends standard keycodes on press/release.
### Behavior Binding
- Reference: `&mmv`
- Parameter: The keycode usage ID.
Example:
```
&mmv MOVE_UP
```

View file

@ -0,0 +1,37 @@
---
title: Mouse Press Behavior
sidebar_label: Mouse Press
---
## Summary
Mouse press behavior allows to send keycode presses and releases of mouse buttons.
Please visit view [`dt-bindings/zmk/mouse.h`](https://github.com/zmkfirmware/zmk/blob/main/app/include/dt-bindings/zmk/mouse.h) for a comprehensive list.
## Keycode Defines
To make it easier to encode the HID keycode numeric values, most keymaps include
the [`dt-bindings/zmk/mouse.h`](https://github.com/zmkfirmware/zmk/blob/main/app/include/dt-bindings/zmk/mouse.h) header
provided by ZMK near the top:
```
#include <dt-bindings/zmk/mouse.h>
```
Doing so makes a set of defines such as `LCLK`, `RCLK`, etc. available for use with these behaviors
## Mouse press
The "mouse press" behavior sends standard keycodes on press/release.
### Behavior Binding
- Reference: `&mp`
- Parameter: The keycode usage ID.
Example:
```
&mp LCLK
```

View file

@ -0,0 +1,35 @@
---
title: Mouse Wheel Behavior
sidebar_label: Mouse Wheel
---
## Summary
Mouse wheel behavior allows to send keycode signals of mouse wheel scrolling.
## Keycode Defines
To make it easier to encode the HID keycode numeric values, most keymaps include
the [`dt-bindings/zmk/mouse.h`](https://github.com/zmkfirmware/zmk/blob/main/app/include/dt-bindings/zmk/mouse.h) header
provided by ZMK near the top:
```
#include <dt-bindings/zmk/mouse.h>
```
Doing so makes a set of defines such as `WHEEL_UP`, `WHEEL_DOWN`, `WHEEL_LEFT` and `WHEEL_RIGHT` available for use with these behaviors.
## Mouse wheel
The "mouse wheel" behavior sends standard keycodes on press/release.
### Behavior Binding
- Reference: `&mwh`
- Parameter: The keycode usage ID.
Example:
```
&mwh WHEEL_UP
```