5.54 GB
51,854 files
Updated about 1 month ago
Name
Size
README.md958 Bytes
xet
mouse.go7.48 kB
xet
mouse_darwin.go5.11 kB
xet
mouse_linux.go2.61 kB
xet
mouse_windows.go1.9 kB
xet
README.md

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$): vscaled=sign(v)⋅∣v∣γ⋅Sv_{scaled} = \text{sign}(v) \cdot |v|^\gamma \cdot S 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, Linux XTest / uinput, Windows SendInput).
  • 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

Contributors