5.54 GB
51,854 files
Updated about 1 month ago
Ctrl+K
| Name | Size | Uploaded | Xet hash |
|---|---|---|---|
| README.md | 958 Bytes xet | 5f927067 | |
| mouse.go | 7.48 kB xet | 1bd8bba8 | |
| mouse_darwin.go | 5.11 kB xet | 1a199fc1 | |
| mouse_linux.go | 2.61 kB xet | 77181fc2 | |
| mouse_windows.go | 1.9 kB xet | 568fc67f |
11. Go Desktop Mouse & Keyboard Control Engine (control/mouse)
Architecture Overview
The control/mouse package translates incoming motion vectors and gesture packets into OS-level cursor movements, mouse clicks, scrolling, and hotkey executions.
Core Algorithms & Math Models
1. Power-Law Cursor Acceleration
Applies a non-linear velocity scaling curve to raw delta displacement ($\Delta X, \Delta Y$): where $\gamma = 1.5$ (acceleration exponent) and $S$ is user sensitivity scaling.
2. Predictive Kalman Blending
- Uses a 2D Kalman filter to smooth jitter and predict cursor trajectory, reducing perceived lag during rapid hand movements.
3. OS Cursor Control
- Interacts with OS input sub-systems (macOS
CGEvent, LinuxXTest/uinput, WindowsSendInput). - Executes left, right, middle, and double clicks, vertical/horizontal scrolls, and drag operations.
- Total size
- 5.54 GB
- Files
- 51,854
- Last updated
- Sep 12
- Pre-warmed CDN
- US EU US EU