Note: This program is for Windows only. It uses Windows-specific APIs and will not run on macOS or Linux.
A simple Windows mouse jiggler application that prevents your computer from going idle by periodically moving the mouse cursor in a small pattern.
This utility moves the mouse cursor in a tiny square pattern (configurable) every few seconds (configurable). The movement keeps your system awake and prevents:
- Screen lock activation
- Sleep mode
- "Away" status in communication apps
- LLVM/Clang - C++ compiler with MSVC compatibility
- CMake (3.20+)
- Ninja build system
- Visual Studio Build Tools - Required for Windows SDK and runtime libraries
- VS Code (recommended for development)
The project must be configured from a Visual Studio Developer PowerShell to ensure the Windows SDK and MSVC runtime libraries are available.
Either open "Developer PowerShell for VS 2026" from the Start menu, or run:
& "C:\Program Files (x86)\Microsoft Visual Studio\18\BuildTools\Common7\Tools\Launch-VsDevShell.ps1" -Arch amd64cd C:\Projects\mouse-jiggler
# Debug build
cmake --preset clang-debug
cmake --build --preset clang-debug
# Release build
cmake --preset clang-release
cmake --build --preset clang-releaseThe executable will be generated at:
- Debug:
build/debug/yamj.exe - Release:
build/release/yamj.exe
This project includes an example VS Code build configuration in .vscode/tasks.json.
Note: The provided tasks.json is tailored for a specific PC and Visual Studio installation. You may need to customize the paths and environment setup for your own system. This is why
.vscode/tasks.jsonis usually listed in.gitignore.
- Open the project folder in VS Code
- Press Ctrl+Shift+B to run the default build task (Debug build)
- Or open the Command Palette (Ctrl+Shift+P) and type
Tasks: Run Taskto:- Configure (Debug/Release)
- Build (Debug/Release)
- Clean build directory
- Run YAMJ (builds and launches the app)
Tip: To set up your own build tasks, see VS Code documentation and adjust the PowerShell/Visual Studio paths as needed for your environment.
Note: The build tasks automatically launch the Visual Studio Developer PowerShell for proper environment setup.
To create a Windows installer (.exe) for YAMJ, you need to install NSIS:
-
Download and install NSIS from the official website.
-
Make sure
makensis.exeis in your system PATH (the NSIS installer usually does this automatically). -
Build your project in Release mode:
cmake --preset clang-release cmake --build --preset clang-release
-
Run CPack to generate the installer:
cpack --config build/release/CPackConfig.cmake
This will create a
YAMJ-<version>-win64.exeinstaller in thebuild/release/directory.
- If you get an error about NSIS not found, ensure NSIS is installed and
makensis.exeis in your PATH. - You can also generate a portable ZIP package using CPack (no installer required).
After building or installing, simply run the executable:
.\build\release\yamj.exe- Set your desired interval and movement in the GUI
- Click Start to begin jiggling
- Use the Help and About menu for more info
This project is licensed under the terms of the GNU General Public License v3.0 (GPLv3).
Copyright (C) 2026 Costantino Pipero
See LICENSE for details.