Skyrim
0 of 0

File information

Last updated

Original upload

Created by

Shayna

Uploaded by

lexling03

Virus scan

Safe to use

About this mod

This is a small open source utility that simply locks your cursor to your main monitor upon pressing a certain key. This prevents the cursor from going onto second or third monitors and performing accidental input, such as scrolling another window in the middle of game-play.

Permissions and credits

~~ Mouse Lock ~~


NEW AND IMPROVED VERSION (Cursor Locker Redux)

Introduction ~

If you're like me, and you constantly have other windows open on your other monitors, you probably experienced a phenomena at some point where if you scroll your mouse in game, it can scroll down a window on a completely separate monitor. This is due to the fact that Skyrim does not actually lock the cursor while you're playing, instead the cursor is actually just invisibly moving around in the background, which means your cursor can also wander onto other monitors and perform inputs that were never intended.

To solve this pet peeve of mine, I wrote a small C++ program that essentially just locks your cursor to the center of your main monitor upon pressing a key. This works universally, 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. Optionally, you can also set it so that it automatically starts and stops when another program starts and stops.

Instructions ~

To use it, simply run the program in the main file, configure the settings as you'd like them, press 0 to run the program, and press Numpad * (by default) in order to toggle it. Sometimes, it may not register correctly, so if it fails to toggle, just try again. The program will make a sound when it toggles on and off. The reason for this is because I didn't want to make the program that resource intensive, and making the keyboard input more precise means decreasing the delay between checks, which increases CPU usage. If you want to manually tweak these settings, see below.

If you'd like to have it start and stop when Skyrim launches / exits, simply select "Attach to process" in the configuration menu, and enter the full name of the process. For Skyrim, this would be tesv.exe. This will disable toggling it through keyboard input, so the only way
to activate and deactivate it is for you to end the program that you
selected.

Download / Releases ~

You can find the releases of this program on the Github releases page, or in the files section of this page. Pre-release versions will only be available on Github until I am certain that I can replace it as the main file for the mod. Past versions can also be found there.

Configuration ~


The previous version used command line arguments to configure the program. Version 1.1 comes with an interface, so that is no longer necessary. If you are still using the older version, you can see the list of command line arguments here.

The configuration menu will show up as soon as you open the program, press 0 to run the program, and 1-6 to configure the various options.

The resolution is used to calculate the center of your monitor. Dividing the width and height to get the center coordinates.

The sound frequency, and duration determines the type of sound that is made when the program is activated or deactivated.

Attach to process allows you to specify a process, in which the program will activate and deactivate automatically when said process is started or ended.

Virtual Key ID specifies what key will be used to activate and deactivate the program if you are using input mode and not attach to process. You can find a list of valid virtual key codes here.

Condition check delay specifies the delay between checks to see if it should activate or deactivate. For example, if you're using attach to process, and a condition check delay of 500ms, then every 500ms it will check if the process is running to determine whether or not it should activate or deactivate.

Cursor locker delay specifies the rate at which the cursor is moved back to the center of the screen. If you have a delay of 100ms, then every 100ms the cursor will be moved back to the center of the screen.

Source Code ~

You can view the source code, and compile it for yourself at the Github repository page. Newer builds are compiled in GCC/G++, while older builds are compiled in Visual C++ using Visual Studio. This code is fully open source under GPL and you may do with it whatever you please (within reason).