Hi @ketan sharma ,
Thanks for reaching out.
Is it possible to implement macOS-style modifier + trackpad zoom system-wide on Windows at all?
Not directly using WH_MOUSE_LL. Windows does not expose trackpad two-finger scroll gestures globally through low-level mouse hooks. System-wide detection of such gestures is limited due to how Windows handles precision touchpad input (WM_POINTER / WM_GESTURE). So, a macOS-style zoom is possible, but it requires a different input handling approach.
This documentation describes how Windows processes modern pointer input (including touchpad gestures), which explains why these events don’t flow through low-level mouse hooks:
Pointer Input Messages and Notifications – Microsoft Docs
If so, should this be done via Raw Input / WM_POINTER / HID instead of WH_MOUSE_LL?
Yes. To reliably detect two-finger scroll gestures from a trackpad, you would need to use Raw Input, HID APIs, or handle WM_POINTERWHEEL messages. These methods allow you to process touchpad gestures outside of a single application window, which WH_MOUSE_LL cannot.
This documentation explains how Raw Input provides access to device-level input beyond what hooks can receive:
This documentation describes WM_POINTERHWHEEL, which is the event precision touchpads use for wheel-like gestures:
WM_POINTERHWHEEL – Microsoft Docs
Are trackpad scroll gestures intentionally not exposed to global mouse hooks?
Yes, this is by design. Windows treats precision touchpad gestures differently from traditional mouse wheel input. They are delivered as pointer or gesture messages to the window under the cursor rather than through global mouse hooks.
This documentation explains the architecture behind Precision Touchpads and why gestures bypass legacy mouse input paths:
Windows Precision Touchpad Devices – Microsoft Docs
Is this behavior a known architectural limitation of Windows input handling?
Yes. It’s a known limitation. Global hooks only capture traditional mouse events. Trackpad gestures bypass these hooks, which is why your current implementation only works over your console window.
This documentation outlines how touchpads process gestures at a higher level, preventing them from being intercepted by low-level mouse hooks:
Touchpad Implementation Guide – Microsoft Docs
Recommended approach:
- Continue using the Windows Magnification API (
Magnification.dll) for zooming. - Replace the
WH_MOUSE_LLhook with Raw Input / HID handling / WM_POINTER messages to detect two-finger scroll gestures system-wide. - Combine this with your existing cursor-based panning logic for a macOS-like experience.
Hope this helps! If my answer was helpful - kindly follow the instructions here so others with the same problem can benefit as well.