Cursor Lock

Windows 2000/XP, Windows 9x, Windows Vista/7

Cursor Lock is a utility program that confines the mouse cursor to a selected area on the screen. This is most useful in multi-monitor setups, addressing a common oversight in some applications (mostly games) whereby they allow the mouse cursor to drift into other unwanted screens. In video games, this can also lead to minimizing the game window if the cursor has drifted into another screen and the mouse is clicked accidentally. Cursor Lock can also overcome cursor drifting problems in windowed applications and games.

Here’s a list of games that Cursor Lock is reported or confirmed to fix.

Features

  • Locking only when focused–requires no special user interaction, nor does it interfere with task switching between screens
  • Uses a superior method of capturing the cursor compared to other solutions (e.g. MouseTrap)
  • Ability to open one program and lock another allows Cursor Lock to work well with launcher programs
  • Can confine the cursor to window borders, in addition to a whole screen
  • Customizable hotkeys allow for complete control of locking in any situation
  • Alternate locking modes that run in the background for full user control and special circumstances
  • Intuitive GUI support program for quick setup of Cursor Lock shortcuts
  • Integrated help system for shortcut setup program
  • Highly optimized and efficient locking program that uses practically no memory or CPU

Tutorial

Screenshots

Download

215K

Cursor Lock

221 kB - EXE

Contribute

Donate

via Paypal

If Cursor Lock has fixed a game or two for you, consider supporting development with a donation.

 

Changelog

358 Responses to Cursor Lock

  1. happyguy USA says:

    You are a wonderful man to create this tool – fantastic functionality, great UI, solid documentation. Thank you!

  2. Dragoon DEU says:

    Happy new year Snake!

    Thanks for your nice must have program and the ongoing support.

  3. stoi84 FRA says:

    Hi,

    I’m experiencing a strange issue with Star Wars – The Old Republic. I tried to set a shortcut to start the launcher and then lock the mouse in the game client window. Both Open Program and Lock Program fields are filled, but when I use the shorcut, the launcher is started and the lock is applied to this. If I click on the desktop and again on the launcher, the lock is removed. If I start the game, the lock is not working, and I cannot use the hotkeys.

    Maybe I misunderstand how it works, but the lock should not be applied to the program opened if the Lock Program field is filled, right ? Here’s the log.

    [12/30/2014 – 12:35:24 AM] App: Started.
    [12/30/2014 – 12:35:24 AM] Status: Program launcher.exe started.
    [12/30/2014 – 12:35:25 AM] Status: Locked.
    [12/30/2014 – 12:35:56 AM] Status: Closing (lockapp closed).
    [12/30/2014 – 12:35:56 AM] Status: Unlocked (app closing).
    [12/30/2014 – 12:35:56 AM] App: Closing.

    The ‘Status: Closing (lockapp closed)’ only occurs if I launch the game using the launcher or if I lose the focus on the launcher Window. If I don’t do anything, then nothing is added to the log file.

    I’m using Windows 8.1 Pro 64 bits. If I select the user mode and use the hotkeys when the game is started, it works.

    Do you have any idea what can cause this problem ?

    Thanks in advance.

    Stoi84.

    • Snake USA says:

      The timestamps given would seem to corroborate what you’re saying, but could you please post your shortcut target (the green box), too?

      • stoi84 FRA says:

        “H:\Logiciels\Cursor Lock\CursorLock.exe” /O:”H:\Jeux\Star Wars-The Old Republic\launcher.exe” /A:”H:\Jeux\Star Wars-The Old Republic\swtor\retailclient\swtor.exe” /L /M:1

  4. kevin IDN says:

    how to unistall this program? I can’t find cursor lock in add or remove program list,can someone help me?

  5. CA NOR says:

    Works perfectly with Supreme Commander Forged Alliance. Which is great because it is an RTS game which means the cursor is visible even when in-game.

  6. Cps USA says:

    Forgive me if this has been brought up before, but when I use Cursor Lock on Fallout: New Vegas or Fallout 3 the cursor is still able to drift off of the left-hand side of the window. I have the New Vegas windowed through the game’s settings, and the Lock Region set to “Window Interior”, but the cursor still moves slightly off the left-hand side and ends up clicking on whatever is running behind the game. The cursor can also hover just over the top of the window’s interior, thus resulting in clicking on the window itself rather than the game. Is this an innate problem with the nature of Cursor Lock or the game? Or is there something else going on?

    • Snake USA says:

      Sounds like something to do with the game. Actually, I’ve been playing New Vegas recently, and for me the cursor will leave the game however it will not be visible or be able to click on anything. But you can see the cursor hovering over and scrolling things on the other screen. I’ve never seen New Vegas allow you to click underneath the game window itself, though, but given its other cursor capturing quirkiness, I wouldn’t be surprised. Very likely to do with your use of windowed mode.

  7. Rocky Hyland AUS says:

    I’m Having trouble with Tera. I’m trying to set up a shortcut that starts the launcher but locks the main process. While the launcher is running the mouse locks to the launcher but once the main process is started, instead of locking to it, mouselock.exe closes. I can tell because I have the Task Manager open and see it close. Could it be because there is a period of time between the launcher loosing focus and the main process starting? I can sometimes make it work if I quickly click the launcher, when it first looses focus, to keep it in focus until the main process starts. Is there a way to make it wait longer for the main process to start?

    • Snake USA says:

      Sounds to me like you aren’t setting Cursor Lock up right. If an Open Program is set (the launcher) while a Lock Program is also set, only the Lock Program will receive any cursor capturing. If you’re interested in seeing exactly what’s happening, enable the log feature, run the shortcut, and then inspect the log file. It will tell you when the cursor was locked and unlocked and why.

      • Rocky Hyland AUS says:

        This is what I just used.

        “C:\Program Files (x86)\Cursor Lock\CursorLock.exe” /O:D:\HappyCloud\Cache\TERA\TERA-Launcher.exe /A:D:\HappyCloud\Cache\TERA\Client\Binaries\TERA.exe /R:10 /M:2 /L:c:\log.txt

        This is the log, abbreviated.

        [11/26/2014 – 07:28:13 AM] App: Started.
        [11/26/2014 – 07:28:13 AM] Status: Program TERA-Launcher.exe started.
        [11/26/2014 – 07:28:15 AM] Status: Locked.
        [11/26/2014 – 07:28:15 AM] Status: Forcing Lock.
        [11/26/2014 – 07:28:15 AM] Status: Locked.
        [11/26/2014 – 07:28:15 AM] Status: Forcing Lock.

        [11/26/2014 – 07:29:10 AM] Status: Forcing Lock.
        [11/26/2014 – 07:29:10 AM] Status: Locked.
        [11/26/2014 – 07:29:11 AM] Status: Forcing Lock.
        [11/26/2014 – 07:29:11 AM] Status: Locked.
        [11/26/2014 – 07:29:11 AM] Status: Closing (lockapp closed).
        [11/26/2014 – 07:29:11 AM] Status: Unlocked (app closing).
        [11/26/2014 – 07:29:11 AM] App: Closing.

        I don’t know what that means. The launcher is still open and cursor lock closes before the main process window appears. Can you see what’s wrong?

        If I click the launcher after logging on to make sure it remains in focus, it works. This is the log, abbreviated
        .
        [11/26/2014 – 07:39:40 AM] App: Started.
        [11/26/2014 – 07:39:40 AM] Status: Program TERA-Launcher.exe started.
        [11/26/2014 – 07:39:42 AM] Status: Locked.
        [11/26/2014 – 07:39:42 AM] Status: Forcing Lock.

        11/26/2014 – 07:40:33 AM] Status: Forcing Lock.
        [11/26/2014 – 07:40:33 AM] Status: Locked.
        [11/26/2014 – 07:40:33 AM] Status: Unlocked (lost focus).
        [11/26/2014 – 07:40:34 AM] Status: Locked.
        [11/26/2014 – 07:40:34 AM] Status: Forcing Lock.

        [11/26/2014 – 07:40:43 AM] Status: Forcing Lock.
        [11/26/2014 – 07:40:43 AM] Status: Locked.
        [11/26/2014 – 07:40:43 AM] Status: Unlocked (lost focus).

        • Snake USA says:

          Hmm… Well, not being familiar with this game, I can’t say for sure what’s going on. But I can say that the only reason that Cursor Lock would close is if the lock app also closed, which means the launcher must be running the lock app multiple times (to do a login maybe?).

          You could try increasing the polling rate to several seconds. This will make the locking less responsive, but might overlook a brief instance of the lock app running. However, it’d probably be better just to use user mode and hotkeys instead.

          • Rocky Hyland AUS says:

            I see. I had a look for the main process while logging on and I think I know what happens now. When you click ‘Start’ on the launcher the main process starts immediately and it shows an overlay image on the screen until the main window appears. I think that image is displayed by the main process and that is what is locked. Then when the image disappears cursor lock closes, even though the process is still running. Is that possible? Does cursor lock look for the window closing instead of the process closing?

          • Snake USA says:

            No, it looks for processes running, since that’s how it’s set up. There must be a separate instance of the lock app running when the splash screen is displayed. Watch the process IDs in task manager. Or you can get something Procmon to be completely sure.

          • Rocky Hyland AUS says:

            I only saw tera start once and the PID did not change. Tried PROCMON but the game wouldn’t start if it detected it running.

  8. Fox USA says:

    Does anyone know if this works with Fallout NV? Almost certain I set up the program right but it just opends up the fallout steam page

    • Snake USA says:

      /O:”E:\Program Files\Steam\Steam.exe” /P:”-applaunch 22380″ /A:”E:\Games\SteamApps\common\fallout new vegas\FalloutNV.exe” /M:2

  9. Excalaber USA says:

    I am having an issue getting this to work with Borderlands 2. It is as if the program sees the game as larger than the actual game window. I have set it up following the video tutorial above and when launching the program it does lock the cursor to the one monitor during the initial launch splash screen but as soon as the game launches into full screen mode the cursor becomes locked to the game + about half of the other screen. The program is clearly doing somthing as I can only move into half of the second monitor while using cursor lock and can move anywhere on it without cursor lock, but it still provides no benefit as it continues to result in outside of game clicks minimizing the game while running around shooting baddies. Any thoughts on what may cause this odd perceived larger window issue?

    • Snake USA says:

      I wasn’t aware that Borderlands 2 had a cursor capture problem. But make sure you’re setting the lock program to Borderlands2.exe. Or you might try user mode if it’s still giving you trouble.

  10. Michael USA says:

    Hello, this looks to be a very helpful program, however, when trying to load up Warcraft III Reign of Chaos or Frozen Throne I get the following error message:
    Warcraft III was unable to initialize DirectX. Please ensure you have DirectX 8.1 or newer installed and that your display drivers are current. DirectX may be found on your Warcraft III install CD under Options.

    I have DirectX 11 installed

    I got this message before I added ” -opengl -window” to the target, after which I was able to open, run and play Warcraft III, albeit with my cursor leaving the game window.

    I saw a previous post, and I made a cursor lock short cut with the following parameters:
    Open Program: Frozen Throne.exe
    Open Program Args: -window
    (also tried it as ” -opengl -window”)
    Lock Region: Window Interior

    Any advice would be very much appreciated. Thanks :)

    Also, I’m running Windows 7 Profession 64 bit with a dual monitor.

    • Snake USA says:

      It works for me. Try again, friend. The DirectX error is (as I’m guessing you found out already) caused by lack of support for Windows Vista or newer in Warcraft 3.

      /O:”E:\Program Files\Warcraft III\Frozen Throne.exe” /P:”-opengl -window” /M:2

      • Michael USA says:

        It does not work. I forgot to mention, and this could be playing a part in it, that I am running a virtual drive, using Alcohol Soft, I could try using the physical disc and see if that would have any affect.

  11. Dr_Pizza CAN says:

    Hey I don’t know if it’s been answered but I’ve spent quite a long time trying to get Diablo 2:LOD working windowed with cursor lock. I’ve tried pointing it to open to both Diablo 2.exe and game.exe but it dosent seem to work. For open program args i have -w so its windowed. Is there a solution i missed?

    • Dr_Pizza CAN says:

      Edit: So I decided to try messing around with it again and for some reason pointing it to Game.exe seems to be working now. Works great except when trying to hold teleport and go downwards :p Thanks for the cool program dude~

  12. vlykarye USA says:

    Hello. I’ve recently needed to use a program like this. I’ve found a few, and each of them has it’s pros and cons. I like your program for the most part, but it seems to be buggy and unstable. I was wondering if you’d consider letting someone else work on the project to try to sort out some of the problems that come up for Windows 8 users. If so, please send me an email.

    • Snake USA says:

      Nope, it will remain closed-source. If you want to help, you can tell me what all these bugs are, because I don’t know of any confirmed Windows 8 bugs.

      • vlykarye USA says:

        Fair enough. It was worth a shot, though.
        The main problem I am having is wierd. At first, the hotkey feature was working, and now it isn’t. As for as I know, nothing changed inbetween except making a new shortcut. So, as for as that goes, I doubt you’d be able to help with it, as it’s probably a one-off error with my system. But, if you’ve heard of this problem with others, then I can try to clean install and recreate the problem.

        • Snake USA says:

          I’ve experienced myself at least one game that overrides all hotkeys. When the game had focus, no hotkeys; when the game was minimized, hotkeys worked again. Why a game would do this, I have no idea, but maybe you’re experiencing this, too.

          Play around with it some more, maybe you’ll figure something out. Like maybe use different keys. Or just restart Windows in case some other program is conflicting.

          • vlykarye USA says:

            Ah, ok. That sounds like what’s happening. I’ll try messing with it and see if I can get it to work. Thanks for the replies.

  13. Kond3P FIN says:

    Could you possibly make a feature that would allow to lock the cursor to a specific area? Currently there is screen, window and window interior. My provlem is that the cursor escapes behind the window, although it still is inside the window. It makes Team Fortress 2 lag horribly every time i move the cursor. The further away the cursor escapes from the middle of the screen, the more lag i get.

    • Snake USA says:

      Sounds more like you might not have Cursor Lock setup quite right for TF2. Don’t have the game so I can’t say with any certainty, but there should be no cursor escaping regardless.

      • Kond3P FIN says:

        I had the same lag before I tried Cursor Lock. I hoped it would eliminate the problem, which it did half way. Before I would click out of window during the lag, but the lag problem still persitsts

      • Kond3P FIN says:

        In further testing I noticed that the cursor barely moves from behind the middle of the window before a certain amount of time after a computer restart. I play in borderless windowed mode, but changing to fullscreen has no effect.

  14. Neinn USA says:

    Hello,

    i got 1 more question: is it possible to change the format of the screen (arguments)? Warcraft 3 is a little bit small for my 24″.

  15. nghia tang AUS says:

    does it work for League of legends? im a getting a custom pc soon and would like to know so i would be able to connect dual monitors and have one open for web seaches while playing the game. Thanks in advance

    • Snake USA says:

      I’ve heard that it works fine with LoL, although I can’t confirm it myself. Usually when people want to game on one screen while doing something else on the other, it requires running the game in windowed mode and toggling the cursor lock with hotkeys when you want to switch.

  16. Neinn USA says:

    How do i open Warcraft 3 in windowed mode + lock the mouse there? i really dont know where to put which link in….

  17. Sowsix FRA says:

    I’ve downloaded this for GTA IV
    Using the launcher et the gta exe

    “C:\Program Files (x86)\Cursor Lock\CursorLock.exe” /O:”C:\Program Files (x86)\Rockstar Games Social Club\1_1_3_0\RGSC.exe” /A:”E:\Jeux\Grand Theft Auto IV\GTAIV.exe”

    and it works fine !!
    Thanks a lot !!!!

  18. Mick AUS says:

    Hmmm.
    Whenever i try to open it straight away goes to Cursor Lock has stopped working. Any idea?

    • Snake USA says:

      I’ll need more information. Like what errors (specific error codes, line numbers, or stack traces) it’s giving and what version of Windows you’re using.

      • Mick AUS says:

        Windows 7 Home Premium 64 bit.
        No error codes or anything.
        As soon as i double click on cursorlock or cursorlock setup just comes up with a new window saying it has stopped working with the windows is checking for a solution message then it closes.

        I have no idea lol

        • Snake USA says:

          Yeh, windows isn’t ever going to automatically find a solution, and instead, obfuscates the actual error. Well, unless you can provide more info on the error, all I can recommend is installing or reinstalling .Net 3.5 or maybe try running as admin.

  19. Joseph CAN says:

    Im trying to use Uplay and i cant fine the Appcurser Number is there a path i can use or a number that relates to all the games in Uplay Plaz help and this is for Assassin’s Creed 2 and uplay

  20. highstrike ROU says:

    hi,

    cool program but how do i uninstall it?
    it doesn’t appear in ‘uninstall a program’ list like the other programs i have installed

    thanks

    • Snake USA says:

      this has been asked before. there is no uninstaller. if you want to remove the program, just delete its folder and start menu shortcuts.

  21. /hello PHL says:

    Stopped working

    Problem signature:
    Problem Event Name: CLR20r3
    Problem Signature 01: cursorlocksetup.exe
    Problem Signature 02: 2.6.1.0
    Problem Signature 03: 5230eb33
    Problem Signature 04: CursorLockSetup
    Problem Signature 05: 2.6.1.0
    Problem Signature 06: 5230eb33
    Problem Signature 07: d
    Problem Signature 08: e0
    Problem Signature 09: System.InvalidOperationException
    OS Version: 6.1.7601.2.1.0.256.48
    Locale ID: 1033

    Happens when I open Setup Cursor Lock.

    • Snake USA says:

      Well, based on what you posted, I would say that this is a problem on your end. I would suggest making sure you have .Net 3.5 installed.

  22. kable USA says:

    I cannot get cursor lock to work with watch dogs going threw uplay only if you know how to get the ap id or a way around the ap id I think it would work uplay only NOT steam

  23. nakedfury PRI says:

    Cant make it work for Uplay-Watch Dogs.

    I even tried in user mode and it wont still lock.

    I cant also save the settings since each time I close the program they reset.

    • Snake USA says:

      Can’t really help much with Uplay, unfortunately, as I don’t have it (nor do I want to). I’ve heard that maybe setting up the shortcut to have watchdogs as the “Lock Program” might work more effectively. But in that case, you’ll have to run the Cursor Lock shortcut before then running the game itself.

      I’m also interested in your report of settings not saving. Maybe you can tell me more about your system? Like what OS you are using? Where you installed Cursor Lock to? Whether or not you’re running on a limited account?

      • nakedfury PRI says:

        Windows 7 64bit
        Default install location for cursor lock(Did not change location)
        Did not know there was a special account so probably the most basic.

        I got Watch Dogs directly through Uplay, no steam launching, so I set the uplay launch exe as my Open program and watch dogs.exe as the lock program.

        Hotkeys on:
        ctrl+shift+z first option
        ctrl+shift+x second option

        Default options:
        Lock region: Window

        Creating the shortcut helps launch the launcher and it locks the cursor in a small window until the game starts but then for some reason it stops the lock.

        For user mode the same happens and since I cant seem to change the hotkeys I dont know if its toggled off at start.

        The first time I opened the cursor lock setup window I set the hotkeys on and only checked the first option for the tilde: `
        Now every time I open the setup it reverts back to that first hotkey.

        Also upon first using Start User mode I know the program works because my cursor is locked inside 1 monitor until the game starts after which it stops locking.

        Sorry for long post I wanted to cover every thing in detail.

  24. no_name_4_me USA says:

    Worked on fallout 3 GOTY Thanks

  25. jayrwafu USA says:

    THanks it works… on windowed warcraft 3 .. lock region must be window interior

Leave a Reply