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.
- Windows Presentation Foundation (WPF) - Desktop client framework
- Emoji.Wpf - A proof of concept implementation of Emoji for WPF
This project is licensed under the MIT License - see the LICENSE.md file for details
- denizimo01 on Pixabay for the logo
- Patterns - WPF Apps With The Model-View-ViewModel Design Pattern for RelayCommand class
- Twitter Emoji glyphs (modified) licensed under CC-BY 4.0: https://creativecommons.org/licenses/by/4.0/