The instructions given for using Cursor Lock in games launched through Steam in a previous post were rather out of date. But I’ve become aware of a new and perhaps better method for using the two together. I say better because it doesn’t require creating shortcuts; however, there is still some command line tomfoolery to mess with.
Here’s what to do:
- Open the Cursor Lock Setup.
- Setup the options for Cursor Lock how you would normally, except put %command% in the Open Program field. The field will turn red, but that’s okay, we’re not actually going to create a shortcut. (See the first image below.)
- Go to your Steam library and right-click on the game in question and select Properties. Your should see a “Launch Options” field.
- Find the path to Cursor Lock. The quickest way is probably to go to your Start Menu (or whatever Microsoft is passing off as a start menu these days) and find the Start User Mode shortcut. Right-click this shortcut and go to Properties. You’ll find the path to Cursor Lock in the Target field under the Shortcut tab. Copy the part in quotes, including the quotes.
- Paste the path to Cursor Lock into the Launch Options field in Steam. Then go back to Cursor Lock Setup and copy the command line options at the bottom. Paste what you’ve copied at the end of that same Launch Options field. (See the second image below.)
- You’re done. Just X out of the dialog and play your game. Cursor Lock will open and close in tandem with your game. You’ll need to do this for every Steam game you wish to use with Cursor Lock, though.
As you may have guessed, the %command% pattern is replaced by Steam automatically with the path to the game. This useful feature allows us to wrap any commands we would want around our game command. If you’re already making use of the Launch Options field for other commands, you can put those into the Open Program Args field (/P) for Cursor Lock to pass them along to your game—see the screenshots above for an example.
Steam Widget on WordPress.org
As I said I would last weekend, I got my new Steam Widget up on WordPress.org. I still want to add some things like stats links and currently in-game, but I think it’s a good first release.
Also, I forgot to mention this in my last post, but it’s pretty cool still. A German guy did a drum remix using my remastered versions of the Deus Ex UNATCO and Area 51 themes and posted them on Youtube a few months ago. Check it out.
I just did a quick update to Cursor Lock to fix a painfully obvious bug that I somehow overlooked. Thanks to the person that googled “cursor lock strict mode does not create shortcut” today! 😉
Also, I noticed you noticed my Steam widget. I just added it over the weekend and people are already clicking through on the game links. I did the widget based on my code for Sitewide Recent Images (more about that on my work blog), so it supports the same caching and template options, which the other two Steam widgets on wordpress.org failed at. I hope to release it over the weekend.
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
- 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.
Using Cursor Lock with Steam Games