Mouselock mouse lock
Mouselock 鼠标锁
Screenshots 1 screenshots
About this mod Machine translation
This is a small open source utility that locks the cursor to the main monitor simply by pressing a certain key. This prevents the cursor from entering the second or third monitor and performing unintentional input, such as scrolling through another window in the middle of a game.
~~Mouse Lock~~
New and improved version (Cursor Locker Redux)
Introduction ~
If you're like me and have other windows constantly open on other monitors, you've probably at some point encountered this phenomenon: when you scroll your mouse in a game, it can scroll through a window that was placed on a completely separate monitor. This is due to Skyrim not actually locking the cursor while playing, but actually just moving the cursor invisibly in the background, meaning your cursor can also roam around other monitors and perform input it wasn't intended for.
To solve this annoyance of mine, I wrote a small C++ program that essentially just locks the cursor in the center of the main monitor when a certain key is pressed. This is universal, so if there are any other games that don't lock the cursor, this program will work on them as well, since it's not really program-specific. (Optional) You can also set it up so that it automatically starts and stops when another program starts and stops. illustrate~
To use it, simply run the program in the main file and configure the settings as needed, pressing 0 to run the program and Numpad* (default) to toggle it. Sometimes, it may not register correctly, so if the switch fails, try again. The program makes a sound when it opens and closes. The reason for this is because I don't want to make the program very resource intensive, and making keyboard input more precise means less delay between checks, thus increasing CPU usage. If you want to adjust these settings manually, see below.
If you want it to start and stop when Skyrim starts/exits, just select "Attach to process" in the configuration menu and enter the full name of the process. For Skyrim this will be tesv.exe. This will disable switching via keyboard input, so
The only way to activate and deactivate it is to end
Selected program.
Download/Publish~
You can find the version of this program on the Github versions page or in the Files section of this page. The pre-release version is only available on Github until I'm sure it can be replaced with the mod's main file. Past versions can also be found there.
configure~
Previous versions used command line parameters to configure the program. Version 1.1 came with the interface so it is no longer needed. If you're still using an older version, you can see a list of command line arguments here.
After opening the program, the configuration menu will be displayed, press 0 to run the program, and press 1-6 to configure various options.
The resolution is used to calculate the center of the display. Divide the width and height to get the center coordinates.
The frequency and duration of the sound determine the type of sound that is emitted when activating or deactivating the program.
Attach to process allows you to specify a process at which the program will automatically activate and deactivate when it starts or ends.
If you are using input mode and are not attached to a process, the virtual key ID specifies the key that will be used to activate and deactivate the program. You can find a list of valid virtual key codes here.
The condition check delay specifies whether the delay between checks should be activated or deactivated. For example, if you use Attach to Process and the condition check delay is 500 milliseconds, then every 500 milliseconds it will check if the process is running to determine if it should be activated or deactivated.
The cursor lock delay specifies the rate at which the cursor moves back to the center of the screen. If you have a 100ms delay, the cursor will move back to the center of the screen every 100ms.
Install & use Install: follow the bundled instructions
- Unzip the archive from playbuff and read the bundled readme / instructions first.
- There is no universal mod manager for this game: some mods replace game files directly, some go into a game-specific Mods folder, and some need a game-specific community loader or tool first — follow the bundled readme.
- Place the files exactly as the readme says; mods with listed dependencies need those installed too.
- Launch the game to confirm it loaded; some games require enabling mods in settings or an in-game mod menu.
Install locations vary a lot between games and mods — the bundled readme is the most reliable guide.