$ show TomBadash/Mouser
Mouser is an open-source, cross-platform (Windows, macOS, Linux) Logitech mouse remapper that serves as a local, telemetry-free alternative to Logitech Options+. It is a desktop application built with PySide6 and Qt Quick (QML) for the user interface, with platform-specific low-level mouse hooks (WH_MOUSE_LL on Windows, CGEventTap on macOS, evdev+uinput on Linux) to intercept and remap button presses and gestures. The core engine orchestrates per-app profile auto-switching, gesture recognition (swipe detection), a radial actions ring, DPI/SmartShift/haptic feedback control via HID++ protocol, and cross-platform shortcut injection. The application also includes an auto-updater, system tray integration, multi-language support (English, Simplified/Traditional Chinese), and a comprehensive test suite. While primarily a desktop application, it contains some research-like elements such as detailed HID++ protocol reverse engineering and a community-driven device catalog.
The LLM identified 5 files worth highlighting for reuse:
A platform-agnostic stroke-aware swipe detector with configurable thresholds (timeout, distance, cross ratio). Isolated and parameterized, it can be extracted for any project needing simple gesture recognition without hardware dependencies.
A platform-aware key-name to key-code mapping with aliases and validation (e.g., rejecting reserved hotkeys). It abstracts OS differences and provides a clean API for key lookup, making it reusable in any application that needs cross-platform keyboard shortcut handling.
Implementation of a radial pie menu controller with held/toggle modes, sector angle calculation, and testable geometry functions. It is self-contained and could be reused for any UI needing an actions ring overlay.
A QObject-based translation manager exposing dictionaries to QML via context property. Supports runtime language switching, fallback keys, and lazy loading. This is a well-isolated i18n pattern that can be reused in any Qt/QML desktop application.
Handles update manifest verification (SHA-256, signature, expiry), archive validation, staging, and atomic replacement (especially on Windows). The manifest schema and verification logic are decoupled from the rest of the app and could serve as a reference for implementing secure self-update in other desktop applications.