OneNote Cursor Teleport Fix
Resolves the pen tablet cursor rubber-band bug by syncing the Win32 mouse with Windows Ink
Author: Mohamed Magdy
A structural Windhawk modification that resolves hardware desynchronization between pen tablets in mouse mode and Microsoft OneNote's Windows Ink engine. This engine synchronizes the system cursor with the physical pen state
Compatibility: Designed exclusively for the desktop version of Microsoft OneNote (onenote.exe).
Core Features
- Windows Ink Synchronization: Monitors
WM_POINTER events and enforces Win32 system mouse tracking to prevent cursor desynchronization upon pen entry.
- Teleport Interception: Evaluates the Euclidean distance of
WM_MOUSEMOVE events and drops hardware jump packets that exceed the configured threshold.
- Hierarchical UI Exception Engine: Parses window classes, styles, and ancestry to blacklist transient UI elements (e.g.,
NetUIPopupWindow, SysShadow). This prevents synthetic mouse events from auto-dismissing ribbon dropdowns or leaving artifacts.
- Thread-Safe Subclassing: Implements a non-destructive subclassing architecture that safely attaches to OneNote's internal document canvas and active windows while avoiding protected UI layers.