See updated instructions for 2021.
I often notice people coming to my site from search queries asking how to use my program Cursor Lock. Of course, Cursor Lock comes with plenty of documentation for most users’ needs. I think most of those people are either noobs that can’t find the documentation, or they want Cursor Lock to do something it doesn’t actually do.
Anyways, there is one circumstance where I haven’t documented how to use Cursor Lock, mostly because I only just realized it myself. However, it can be rather tricky, so here’s how to lock games that must be launched with Steam. These instruction will work for the new version that just came out on April 26 and the previous version.
- Open Steam and go to your list of games.
- Right-click on the game in question and select “Create Desktop Shortcut”.
- Find the shortcut on the desktop and right-click to examine its “Properties”.
- For the new version of Steam, look at the “Web Document” tab and then the “URL” box. For the old version, look at the “Shortcut” tab and then the “Target” box. Copy the 5 digit number you see there.
- Open Cursor Lock Setup.
- Select “Open Program” and then find the path to the Steam executable, usually it will be something like
C:\Program Files\Valve\Steam\Steam.exe
- Select “Open Program Args” and put in
-applaunch xxxxx
where xxxxx is the 5-digit number you copied earlier. - Select “Lock Program” and then find the path to the game’s main executable–this would be what one would usually set as the “Open Program” when Steam isn’t involved. If you don’t know where it is, you should start looking under
C:\Program Files\Valve\Steam\SteamApps\
. You can also use Task Manager to help you find the executable name when the game is running. - You’re done! Hit the “Create Shortcut” button to create a permanent shortcut to the game with Cursor Lock.
Oh hell yeah it worked on Windowed Mode! Finally!
i got three digit in my web document tab
just take the 3 digit code its no problem!
will this get me vac’d on cs go?
This question has come up before and it’s a good one, but unfortunately I don’t have a good answer for you other than to say that I’ve never heard of any Steam bans due to Cursor Lock.
See this comment on Youtube for more info: https://www.youtube.com/watch?v=Myivw84ONJQ&lc=z12hvjty2tbvxxcit04cfd5pvnztuhcqvcc
Thank you!
It worked on Total War: Attila
It acts kind of weird, meaning that if you move the mouse fast enough, it will, for a fraction of a second, jump to the other screen and back to the main, but that isn’t a problem. Thank you!
Can confirm: this worked where other cursor lockers didn’t (and I’ve tried many of them). Amazing program; fixed my Dota 2! Thank you!
is there a space between “-applaunch” and the 5 digit code?
Yes
Thanks for that info, that worked perfectly for me.
Hey,
I’ve got a problem with ingame cursor in Dead Space and I wanted to fix it using CursorLock. Sadly, I play it through Origin, not Steam and just can’t find a damn ID of a game in Origin, therefore if I run DS through CursorLock without filling Open Program Args, it launches just Origin. Could you help me? Thank you.
Sorry, I don’t use Origin. I’m hoping one of these days someone will inform us all on how to properly setup Cursor Lock to work with Origin.
I have a problem. I want to play ROME II with cursorlock ( because of its stupidity about dual monitors )- It worked with Shogun 2 perfectly and it works with ROME II right after you create the shortcut, BUT when you exit/restart Steam it stops working. Can you please help?
I don’t quite understand how you’re using Cursor Lock. Are you using User Mode or Program Mode? And why does exiting and restarting Steam make a difference?
I have the exactly same problem. When i create a shortcut with cursorlock as described, it works wonders. But after restarting my computer the cursor is not locked in the window anymore..
You’re running the Cursor Lock shortcut every time you want to play the game, right? I thought that was clear, but you never know. It’s not like Cursor Lock is patching the game; it should be thought of as more of launcher.
Yes of course I am using the created shortcut to start the game. I have used it for Shogun 2 before, never had the problem.
Hmm. Well, maybe you could try enabling logging for Cursor Lock to see what’s going on. Or look at what programs are running or what windows updates were installed recently to see if any are interfering.
Hm.. I think I know what might be the problem. Rome 2 has its own starter in steam. When opening this starter, the screen is cursorlocked. After it has opened it is no longer cursorlocked. I have no idea how to solve this though.
So if anyone has the same problem, I solved it. You have to start Steam first and use the cursorlock shortcut afterwards.
Thanks for the nice programm Snaky
is there any tutorial on how to use cursor lock with mmorpgs ? because there are also launchers used to get into the game
See the tutorial video or read the manual. All launchers are pretty much the same idea.
Confirmed to work with Aura Kingdom, albeit a bit trickier than usual. The file to be selected in “Lock Program” is not an .exe file, but “game.bin”, which you will have to search for manually within the Windows Explorer window that opens.
Good point. I should really add a dropdown on the program selection dialog to allow one to select a file other than .exe extension for those silly fringe cases.
Thanks for the comment.
It does not work with Alien Swarm. CursorLock.exe shows up in the Task Manager, but nothing happens. I assume it’s because the game has only a 3-digit app number (630)?
Then again, I just noticed that it doesn’t move the mouse cursor off the main screen in-game. Only did so in the Options menu.
The length of the app id doesn’t matter. It can be between 3 and 6, but is usually 5 digits.
I just tried it again, and realised I made a mistake while creating the shortcut. After picking steam.exe as the “Open Program”, I entered the “-applaunch” command in “Open Program Args”, but forgot to actually check the box. That’s why it didn’t launch properly.
Checking the box launches the game and locks the cursor to the main screen in the Options menu, but like I said, it doesn’t really matter since the mouse lock activates as soon as you play the game.
Indeed. I’ve seen other games that have flaky locking. Just have to decide whether or not it bothers you enough to warrant Cursor Lock.
Worked on Skyrim for a while then it stopped working
Didn’t work with Skyrim.
My cursor won’t lock in the game and I can see the Windows cursor at the borders. Dual monitor.
What if i am running skse?
Then you make skse_loader.exe the “Open Program”.
I’m trying to get Cursor Lock running Crusader Kings 2 through Steam (I want the achievements). It works perfectly with ck2game.exe [launcher] in “Open Program” and ck2.exe [game exec] in “Lock Program”, but when I put steam.exe in “Open Program”, ‘-applaunch 203770’ in “Args” and ck2 in “Lock Program” it won’t work using any configuration of the “Standard Options”.
Is there any way to get this working?
Well, everything certainly looks right for this game. Could you describe how it is actually not working? Does the game even launch? Does it launch but never gets cursor locked?
Yes, sorry, I meant to mention that the game runs fine but the cursor isn’t locked. There’s a demo on Steam if you want to test it.
I had the same problems. Some games are funny that way. For example from the same publisher Paradox, the games Warlock 1 & 2 won’t work directly with Cursor Lock either.
The solutions for me is to run Cursor Lock prior in User Strict Mode. (You can then control Cursor Lock behavior via hotkeys. Don’t forget to set them up).
Consult the Cursor Lock Readme. Especially the sections User Mode and Restrict Monitors for more detailed information.
However, from within the game itself even the hotkeys won’t work, but as a little trick, if you bring up the Steam Overlay the hotkeys works again. In case you want to turn Cursor Lock off to tab switch and work on a different display.
Geez…this game sounds very tricky to get working with Cursor Lock. I guess I need to check this out sometime.
In that case and since Warlock 1 is on sale right as Warlock 2 release is about I use the opportunity to gift it to you. Of course without ulterior motives. 😉
Judging from that you enjoy playing Civ5 I guess you will like Warlock too. Although game the focus more on fighting than developing. But it’s a nice reminiscence for those of us that remembers Master of Magic.
Wow, thanks, man. This is the kind of user support I can get behind. “You say your game doesn’t work with Cursor Lock? Well, buy it for me and I’ll make it work.” 😛
Downloading now. Does look a lot like Civ 5 but with magic thrown in. God help me if there’s an Elder Scrolls mod for this.
So I’m trying out Warlock and I saw that it did indeed need cursor locking. However, I followed my standard Steam game procedure and it worked perfectly, so I dunno… 😐
Here are the parameters I used, though: /O:”E:\Program Files\Steam\Steam.exe” /P:”-applaunch 203630″ /A:”E:\Games\SteamApps\common\Warlock – Master of the Arcane\Game.exe” /M:0
Exactly what I needed. Confirmed to work with Rome: Total War.
Ok, i tried this and followed the steps exactly, but it still doesnt lock the cursor on skyrim :I any help here?
You’ll use a shortcut similar to the following:
“C:\Program Files\Cursor Lock\CursorLock.exe” /O:”C:\Program Files\Steam\Steam.exe” /P:”-applaunch 72850″ /A:D:\Games\SteamApps\common\skyrim\TESV.exe /M:2
And when in doubt, you can always try user mode and toggle the lock with hotkeys.
Where is this web document tab? I don’t see it anyone on steam or in the properties thing you stated above?
if you’re having trouble setting up Cursor Lock with Steam, see the second part of the tutorial video: http://www.snakebytestudios.com/projects/apps/cursor-lock/
Hey when I try and make a shortcut windows says I dont have permission to modify files on my desktop. This only happens when I use this software though.. any Ideas?
Interesting. What operating system?
Happened to me too (Win7).
I got around it by saving it to some random location in my Documents folder, then just moved it to the desktop manually.
Hope it helps.
Thanks for that info. I’ll look into it on my Win7 machine.
Looks like a bug with .Net 1.1, which honestly wasn’t really made for Windows 7. I’ll probably have to convert Cursor Lock to a newer version of .Net to fix this bug.