Skip to content
Mouse Trap restricts the mouse cursor to a specific window
C# Smalltalk
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Mouse Trap

Last commit Issues Language License

Mouse Trap restricts the mouse cursor to a specific window.

This can help when the cursor shouldn't wander outside to talk to other windows, but the program fails to capture the mouse normally. Some game examples are; Morrowind, Oblivion, Skyrim, Fallout 3, Fallout: New Vegas and Fallout 4.

Particularly useful for dual-monitor setups, but can be used for any number of displays greater than zero.


Mouse Trap can be downloaded from the releases page.


  • This is a Windows WPF application.
  • Designed and tested on Windows 10.
  • Compatibility with Window 7 (currently untested).
  • Requires .NET Framework 4.7.2.


Choosing a window to lock

A window can be chosen from a list of currently open applications. Enabling the lock will restrict the mouse to the boundaries of the window, whenever that window has focus. Switching to another program will free the mouse (Alt+Tab), allowing you to unlock the window.

Specifying a program

Alternatively, a specific executable path can be entered. When the lock is enabled, Mouse Trap waits until the first window for this executable gains focus.

Enabling the mouse lock

Once the lock is enabled, the mouse will be limited to the boundaries of the window whenever it has focus. The boundary can be adjusted using the "padding" values, to increase or decrease the restricted area.

Once the lock is active

An indicator appears when the window has focus. The mouse is now locked to the window. To cancel the lock, switch to another window (Alt+Tab); or the window can be closed.

If the window is closed, the application returns to the list or file tab.

Built With


This project is licensed under the MIT License - see the file for details


You can’t perform that action at this time.