Blajh

Mouse Cursor Lock on Windowed Fullscreen

Recommended Posts

Hey guys,

For multi-monitor setups, some users like to have a game on one monitor and other stuff on the others. But when I deselect the Full Screen option in Settings>Graphics you should lock the mouse cursor to the game. Only if I Alt+Tab should the mouse go outside the game window.

Currently, when I play the game the cursor leaves the game and I can click on other stuff on other monitors, and that's not a good experience.

Please add this to Windowed fullscreen.

Best,

  • Upvote 1

Share this post


Link to post
Share on other sites

I've replied about it in another topic and in order to lock your mouse in the other topics fix you just left click in your menu. Please use the search function thanks.

Share this post


Link to post
Share on other sites

I actually have this issue on a dual monitor setup in full screen mode. Every now and then, I'll right-click to aim, and the game loses the mouse, the right-click is performed on my other monitor, and then coming back to the game monitor and clicking minimizes the game. As you can imagine, that is not so good to happen in a game like this.

Gaming monitor is an ultra-wide (2560x1080), secondary monitor is a normal 1080p if that helps the devs at all. Nvidea gtx 970 on 388.43, although looking that up, I noticed there is an updated driver. I'll respond if it still happens after installing 388.71 (latest available as of today, installing now).

Edited by ProtissOG

Share this post


Link to post
Share on other sites
On 1/7/2018 at 3:15 AM, UWS-Rin said:

I've replied about it in another topic and in order to lock your mouse in the other topics fix you just left click in your menu. Please use the search function thanks.

This is NOT a fix, just a crappy bandaid onto a stupid problem the game has had for far too long. No other game I have played has had trouble with the mouse-lock. This is absolutely game breaking and ruining my and others experience. I have no care for the loot I lose, it's the fact that I die purely because my game is not locking the mouse. Please for the love of god, Devs fix this damned issue.

Share this post


Link to post
Share on other sites
9 hours ago, Wambambler said:

This is NOT a fix, just a crappy bandaid onto a stupid problem the game has had for far too long. No other game I have played has had trouble with the mouse-lock. This is absolutely game breaking and ruining my and others experience. I have no care for the loot I lose, it's the fact that I die purely because my game is not locking the mouse. Please for the love of god, Devs fix this damned issue.

This was what it was you can call it crappy but it worked. Be more respectful towards people trying to help you instead of presenting nothing but whining...

This has been fixed in the preliminary patch notes for .6

Share this post


Link to post
Share on other sites
On 1/18/2018 at 5:02 AM, UWS-Rin said:

This was what it was you can call it crappy but it worked. Be more respectful towards people trying to help you instead of presenting nothing but whining...

I don't have to be respectful to anyone at all. You've not earned it. In fact, I have less respect for you since you considered that bandaid a fix.

Share this post


Link to post
Share on other sites
4 hours ago, Wambambler said:

I don't have to be respectful to anyone at all. You've not earned it. In fact, I have less respect for you since you considered that bandaid a fix.

Take your pills lol

Share this post


Link to post
Share on other sites

I game on 3 screens with maps on the side screens or forums etc. I was fed up having to play in windowed mode, alt tabbing etc etc and so I had a look about for a solution. The solution was a program called Display Fusion, which sells cheap on Steam.

With this, I can now extend the display to each screen while playing games in full screen on the centre screen and the screen remains focused if you lock it down (for example I press Win+G. Also locks the cursor in)  I can lock my mouse to whatever screen I like, unlock the mouse whenever I like so as to do whatever I need to on other screen. It’s great and very simple to use.

 

It has a bunch of other features and uses, but I primarily bought it for the above reason. Take a look.

Share this post


Link to post
Share on other sites

I've made a simple AutoHotkey script to truly overcome this problem.
The scripts gets the current game window position and size and constraints the cursor movement to it by dll call when the window is focused.

Just save the file with .ahk extension and launch it with AutoHotkey or download the compiled exe I've attached and remove the .txt from the filename.
Download AutoHotkey here!

Enjoy :)

#singleInstance force

CoordMode, Mouse, Screen

while true
{
	IfWinActive, ahk_exe EscapeFromTarkov.exe
	{
		WinGetPos, x, y, w, h, ahk_exe EscapeFromTarkov.exe
		;ToolTip, x:%x% `ny:%y% `nw:%w% `nh:%h%, 0, 0

		VarSetCapacity( Rect, 16, 0 )
		NumPut( x, Rect, 0, "Int" )
		NumPut( y, Rect, 4, "Int" )
		NumPut( x + w - 1, Rect, 8, "Int" )
		NumPut( y + h - 1, Rect, 12, "Int" )
	
		DllCall( "ClipCursor", "Ptr", &Rect )
	}
	IfWinNotActive, ahk_exe EscapeFromTarkov.exe
	{
		DllCall( "ClipCursor" )
	}
}

 

eftCursorLock.ahk.txt

eftCursorLock.exe.txt

Edited by rateforx

Share this post


Link to post
Share on other sites

Update (seems I cannot edit the previous post any longer)

#singleInstance force

while true
{
	WinWait, ahk_exe EscapeFromTarkov.exe
	IfEqual, ErrorLevel, 0
	{
		WinWaitActive, ahk_exe EscapeFromTarkov.exe
		IfEqual, ErrorLevel, 0
		{
			WinGetPos, x, y, w, h, ahk_exe EscapeFromTarkov.exe
			;ToolTip, x:%x% `ny:%y% `nw:%w% `nh:%h%, 0, 0

			VarSetCapacity( Rect, 16, 0 )
			NumPut( x, Rect, 0, "Int" )
			NumPut( y, Rect, 4, "Int" )
			NumPut( x + w - 1, Rect, 8, "Int" )
			NumPut( y + h - 1, Rect, 12, "Int" )
		
			DllCall( "ClipCursor", "Ptr", &Rect )
			
			WinWaitNotActive, ahk_exe EscapeFromTarkov.exe
			IfEqual, ErrorLevel, 0
			{
				DllCall( "ClipCursor" )
			}
		}
	}
}

I've modified the script so it's not so processor hungry anymore. I've managed to reduce the CPU usage from 12-13% to almost none! :)

Edited by rateforx

Share this post


Link to post
Share on other sites

Quickly double tapping tab to open and close inventory locks the mouse again. 

 

It's annoying but liveable - it only happens when you alt tab. 

Share this post


Link to post
Share on other sites
1 hour ago, cribbit said:

Quickly double tapping tab to open and close inventory locks the mouse again. 

 

It's annoying but liveable - it only happens when you alt tab. 

It is not a solution, but a workaround.

Share this post


Link to post
Share on other sites
1 minute ago, rateforx said:

It is not a solution, but a workaround.

The solution is to submit a bug report and wait for the next patch. 

Share this post


Link to post
Share on other sites
5 minutes ago, cribbit said:

The solution is to submit a bug report and wait for the next patch. 

This problem exists since the game was released. I wouldn't count on a quick fix, since such issue would be considdered a minor issue by the devs.

So I think, the way to deal with the problem is the best we can do for now. :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now