James-LG / AutoCursorLock

Locks cursor to specified windows while in focus. Good for games that don't properly lock the cursor.
MIT License
96 stars 2 forks source link

AutoCursorLock

icon

Locks the cursor to a specified window or monitor while an application is in focus.

Description

When playing certain games with multiple monitors you may find your cursor leaves the game window and enters the other monitor(s).

This program will detect when a program like CS:GO is in focus and lock the cursor to the game. The cursor will automatically unlock when you Alt-Tab and relock when the game comes back into focus. There is also a hotkey to disable/enable the auto-locking.

Games that accidentally allow the cursor to leave the game window.

Screenshot

Why is this program better than others?

You can select processes that will automatically cause the cursor to be locked, so you can open the program, minimize it to the tray, and forget about it. You can even Alt-Tab in and out of the game freely and be sure the cursor will be locked again when the game is in focus without manually toggling the locking with a hotkey.

Usage

Start the program and select an item from the automatically populated processes list. Click the Add button to start automatically locking on that process' windows. The selections are saved to %appdata%/AutoCursorLock/settings.json and loaded automatically on program start.

Press your configured hotkey to toggle auto locking when a selected process is in focus, or alternatively use Alt+Tab to focus on a window that you did not configure to lock the cursor.

Planned Features

Contributing

Go for it! Always happy to have help.