MouseTool is a Windows tray utility built with .NET 10, WPF, and a small amount of native Win32 interop.
The latest public builds are published on GitHub Releases:
- Download the latest release
- Download the Windows installer (.exe)
- Download the portable build (.zip)
Recommended:
- use the installer if you want Start Menu shortcuts, uninstall support, and the easiest setup
- use the zip package if you prefer a portable/manual installation
It is designed for dual-screen setups where:
- the physical mouse should stay anchored to the main monitor
- a touchscreen is used on a secondary monitor
- the app should remember the last useful mouse position on the primary screen
- the cursor should return to that saved primary-screen position after touchscreen interaction ends
The project was inspired by the workflow described by Touch Mouse Tools and adapted into a standalone desktop utility focused on a practical day-to-day Windows workflow.
MouseTool separates mouse and touchscreen behavior so the touchscreen can be used as a control surface without permanently pulling the mouse away from the main work display.
Core behavior:
- remembers the last valid mouse position on the primary monitor
- treats touchscreen activity on the configured touchscreen monitor as secondary interaction
- restores the cursor to the saved primary-monitor position when physical mouse activity resumes
- can optionally restore immediately when touch ends
- can optionally allow the physical mouse to enter the touchscreen monitor area
- keeps the app available through a tray icon and desktop control panel
Windows Services run in Session 0 and do not have normal access to the interactive desktop session used by the logged-in user.
Because MouseTool needs to:
- observe global input
- react to touchscreen and mouse movement
- move the cursor inside the active desktop session
it must run as a per-user background application instead of a true Windows Service.
MouseTool currently includes:
- tray-based background execution
- a WPF control panel with fixed-size desktop layout
- manual monitor selection with readable names
- configurable restore behavior
- optional startup with Windows
- optional manual diagnostics logging
- multilingual UI driven by JSON translation files
- contextual help file opening based on the selected language
- release packaging
- setup installer
- uninstaller
- self-update infrastructure based on manifest check, silent uninstall, and silent reinstall
The project is now fully centered on WPF for the desktop interface.
Main layers:
App.xamlandApp.xaml.csfor WPF application startupMainWindow.xamlandMainWindow.xaml.csfor the main dashboardCloseChoiceWindow.xamlandCloseChoiceWindow.xaml.csfor the close/minimize decision dialogProgram.csfor application coordination, configuration, localization, help, startup registration, and the input engineTrayIconHost.csfor the native tray icon and tray menuMonitorManager.csfor native monitor enumeration without Windows FormsNativeMethods.csfor input hooks, cursor movement, tray interop, and monitor APIs
The application window includes:
- top header with branding, app status, and language selector
- tabbed interface:
OverviewDisplaysBehaviorDiagnostics
- footer command bar with run, pause, tray, config, and apply actions
The Overview tab is split into two columns:
- left column:
- active status summary
- explanation of how MouseTool works
- quick usage guide
- best-practices section
- scroll support when content exceeds the available height
- right column:
- fixed support area
- gratitude text
- clickable support email
- help button
- buy-me-a-coffee button
Lets the user choose:
- the primary display
- the touchscreen display
Monitor names are shown in a readable format based on role, order, resolution, and coordinates.
Current options:
- restore the mouse immediately when touch ends
- allow the physical mouse to enter the touchscreen display area
- start MouseTool with Windows
Current controls:
- enable logging
- disable logging
- open log file
Logging is disabled by default.
The app stays available through the system tray and supports:
- opening the dashboard from the tray
- starting protection
- pausing protection
- opening help
- exiting the app
- opening the dashboard with left click or double click on the tray icon
- opening the tray menu with right click
The UI text is driven by JSON files under:
- Resources\Lang
Currently supported languages:
- English
- Portuguese (Brazil)
- French
- Spanish
- German
- Italian
- Russian
Behavior:
- default language follows the Windows system language when available
- users can manually choose a language from the header selector
- after changing the language, the app asks the user to restart
- the UI loads from the selected JSON language file on the next launch
Current language files:
- lang.en.json
- lang.pt-BR.json
- lang.fr.json
- lang.es.json
- lang.de.json
- lang.it.json
- lang.ru.json
MouseTool generates localized help files in the output folder under help.
Supported help files currently include:
HELP.en.htmlHELP.pt-BR.htmlHELP.fr.htmlHELP.es.htmlHELP.de.htmlHELP.it.htmlHELP.ru.html
The app opens the help file that matches the currently selected language when possible, with fallback to English when necessary.
The app writes mousekeeper.config.json into the per-user data folder:
%LOCALAPPDATA%\MouseTool\mousekeeper.config.json
Important fields include:
EnabledLoggingEnabledStartWithWindowsSelectedLanguageAllowMouseOnTouchscreenPrimaryMonitorDeviceNameTouchMonitorDeviceNameRestoreImmediatelyOnTouchReleaseLastPrimaryMousePosition
MouseTool can register itself in:
HKCU\Software\Microsoft\Windows\CurrentVersion\Run
This is controlled by the Start with Windows option in the app.
Logging is manual and disabled by default.
The diagnostic log file is written into the per-user data folder as:
%LOCALAPPDATA%\MouseTool\mousekeeper.log
Use logging only when you need to investigate behavior during testing.
The installed build can now check a published JSON manifest and apply an update by:
- downloading the newest installer
- validating the installer SHA-256 hash
- opening the published changelog for the target version before installation
- starting a separate updater helper
- closing MouseTool
- silently uninstalling the current installed version
- silently reinstalling the new version into the same path
- relaunching MouseTool
The default manifest URL used by the app is:
https://github.com/mvidaldev/MouseTool/releases/latest/download/update.json
The updater helper is shipped as:
MouseTool.Updater.exe
The release changelog is published as:
MouseTool-CHANGELOG.md
MouseTool is licensed under the GNU GPL-3.0.
That means:
- you can use, study, modify, and redistribute the software
- if you distribute modified versions, you must also keep them under GPL-3.0
- source code for redistributed derivatives must remain available under the same license
License file:
- LICENSE
$env:DOTNET_CLI_HOME = "$PWD\\.dotnet-home"
$env:NUGET_PACKAGES = "$PWD\\.nuget\\packages"
$env:NUGET_CONFIG_FILE = "$PWD\\NuGet.Config"
& "C:\Program Files\dotnet\dotnet.exe" build& "C:\Program Files\dotnet\dotnet.exe" runUse:
powershell -ExecutionPolicy Bypass -File Z:\projetos\Codex\MouseTool\publish-release.ps1This generates:
- release folder
- zip package
- setup installer executable
- update manifest JSON
Local release outputs:
- MouseTool.exe
- MouseTool.Updater.exe
- MouseTool-win-x64.zip
- MouseTool-Setup.exe
- MouseTool-CHANGELOG.md
- update.json
Public downloads:
The installer is generated with Inno Setup.
It currently:
- installs MouseTool into
%LocalAppData%\Programs\MouseTool - creates application shortcuts
- installs the updater helper next to the main executable
- launches the app after installation
- registers uninstall information in Windows
- includes uninstall support through Windows settings and the Start Menu
Installer source files:
- publish-release.ps1
- MouseTool.iss
- install.cmd
- install-mousetool.ps1
The project includes an uninstaller that:
- stops the running app
- removes shortcuts
- removes startup registration
- removes uninstall registry entries
- deletes the installed application folder
Uninstaller source files:
- uninstall.cmd
- uninstall-mousetool.ps1
Main files:
- App.xaml
- App.xaml.cs
- MainWindow.xaml
- MainWindow.xaml.cs
- CloseChoiceWindow.xaml
- CloseChoiceWindow.xaml.cs
- Program.cs
- TrayIconHost.cs
- MonitorManager.cs
- NativeMethods.cs
- MouseTool.csproj
Resources:
- Resources\Lang
- Installer
- target framework:
net10.0-windows - UI framework:
WPF - tray implementation: native shell icon via Win32 interop
- execution model: tray app running in the logged-in desktop session
- monitor detection uses native monitor enumeration with manual selection support
- touchscreen behavior may vary depending on hardware driver behavior
- fallback logic exists for systems where touch input is exposed differently
Behavior and workflow inspiration:
Installer packaging references: