Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 571e457

Browse files
committed
Documentation refactor
1 parent 58178a7 commit 571e457

4 files changed

Lines changed: 69 additions & 109 deletions

File tree

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
---
2+
title: Mouse Emulation Behaviors
3+
sidebar_label: Mouse Emulation
4+
---
5+
6+
## Summary
7+
8+
Mouse emulation behaviors send mouse movements, button presses or wheel actions.
9+
10+
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.
11+
12+
## Keycode Defines
13+
14+
To make it easier to encode the HID keycode numeric values, most keymaps include
15+
the [`dt-bindings/zmk/mouse.h`](https://github.com/zmkfirmware/zmk/blob/main/app/include/dt-bindings/zmk/mouse.h) header
16+
provided by ZMK near the top:
17+
18+
```
19+
#include <dt-bindings/zmk/mouse.h>
20+
```
21+
22+
Doing so allows using a set of defines such as `MOVE_UP`, `MOVE_DOWN`, `LCLK` and `WHEEL_UP` with these behaviors.
23+
24+
## Mouse Button Press
25+
26+
This behavior can press/release up to 16 mouse buttons.
27+
28+
### Behavior Binding
29+
30+
- Reference: `&mkp`
31+
- Parameter: A `uint16` with each bit referring to a button.
32+
33+
Example:
34+
35+
```
36+
&mkp LCLK
37+
```
38+
39+
## Mouse Movement
40+
41+
This behavior is used to manipulate the cursor.
42+
43+
### Behavior Binding
44+
45+
- Reference: `&mmv`
46+
- Parameter: A `uint32` with the first 16 bits relating to horizontal movement
47+
and the last 16 - to vertical movement.
48+
49+
Example:
50+
51+
```
52+
&mmv MOVE_UP
53+
```
54+
55+
## Mouse Wheel
56+
57+
This behaviour is used to scroll, both horizontally and vertically.
58+
59+
### Behavior Binding
60+
61+
- Reference: `&mwh`
62+
- Parameter: A `uint16` with the first 8 bits relating to horizontal movement
63+
and the last 8 - to vertical movement.
64+
65+
Example:
66+
67+
```
68+
&mwh WHEEL_UP
69+
```

docs/docs/behaviors/mouse-move.md

Lines changed: 0 additions & 37 deletions
This file was deleted.

docs/docs/behaviors/mouse-press.md

Lines changed: 0 additions & 37 deletions
This file was deleted.

docs/docs/behaviors/mouse-wheel.md

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)