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

201K

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

356 Responses to Cursor Lock

  1. Darquel NZL says:

    You have no uninstaller for this, please add this for future releases for convenient removal of the program.

    • Snake USA says:

      This was brought up once before (I believe on CNET). In future versions, I may have an uninstaller, but it’s totally unneeded other than for your minor convenience. And I’m starting to find it difficult to add requested features to software that you’re not even paying for.

      • Darquel NZL says:

        I think it’s just courteous for those that’ve tried the program and decided they don’t want to use it anymore to remove it.

        Not everyone is tech savy enough to know where to remove the program in its entirety from their system, and having an uninstaller simplifies this.

        I just find it curious that you have an installer instead of say, a zip file and having people extract the program from the .zip but don’t support the counterpart to an installer, which would be the uninstaller.

        Hopefully you can give this some more thought and reconsider your stance on this.

        • Dragoon DEU says:

          You can just right click on the folder and click on delete (shift+left click on delete if you want to bypass the trash can) The standard way how you delete files and folders in Windows. The tool don’t leave or need any registry imprint, so no worries.
          I think nowadays these ready to use, out of the box tools, that don’t require installation are called portable apps.
          Very convenient if you want to copy it on an USB-Stick to use it somewhere else.

  2. Aceless USA says:

    I’ve been trying to get this to work for Diablo 1 and every time i try and set something up it won’t even open up the game. I have also tried using using user mode then opening the game. The game still seems to over ride user mode.

    • Snake USA says:

      Everything I’ve read says that D1 doesn’t have a windowed mode and when I run it normally (fullscreen), it’s already locked. So you must be running it with some sort of modification. Someone asked about Diablo 2 recently and that appeared to require an increased poll rate. Maybe Diablo 1 needs the same. I also can’t imagine that user mode isn’t working, although it is a pretty old game now, so who knows.

  3. Scott AUS says:

    firstly i wanted to say what a clever program you have developed. I only wish i had the programming skills like this to develop great prgrams like this.

    I have been trying to work with cursor lock to make access to a certain part of a program not accesible. I will mention if it helps that we are working only on one monitor system for this program. We are working in a radio studio enviroment with an music playout automation system. The main goal i am trying to achieve is for the lower portion of the sceen to not be accessible so no certain features / options can be toogle on and of since some of our staff have bad habits of doing so. However after playing around with Cursor lock all i seem to have been able to achieve is for a user to not be able to select anything on the windows tasks bar but they can still access any options on the programs status bar.

    Is cursor lock able to restirct further in then just the border of a programs winow? The software we are using is BSI Simian automation system.

    I have tried using user mode as described in your documentation but whatever i seem to do this the options in user mode continue to be greyed out. I have set all hot keys etc but with no luck.

    I am sure your busy but i thought i would try seek some assistance.

    Thanks.

    • Snake USA says:

      Nope, Cursor Lock does not presently restrict movement to a user-defined area on the screen, only whole screens or windows.

      Maybe you can customize the interface of your automation app to remove functions that you don’t want some users to be able to access.

  4. Dragoon DEU says:

    Thanks for the new Version. This tool proved to be essential again when I went playing Galactic Starfighter. After all these years I think it’s appropriate to donate 10 buck as thank you.

    • Snake USA says:

      Thanks, mate. I’m glad you’re still finding it useful. When I first made this tool, I had no idea it would have so many uses and with so many games.

  5. Bas Fournier SWE says:

    I have noticed that Cursor Lock will always use the screen boundary as a lock region delimiter, even when the lock region is set to window or window interior. This means that if I lock a window that is partially on one screen and partially on another, Cursor Lock will not allow the cursor to reach the whole window. A small thing, I know, but is this something that can be changed in a future version? Thanks.

    • Snake USA says:

      Well, looking at the code, I can see that for the window lock regions a function is called that intersects the window rectangle and the nearest monitor rectangle. Unfortunately, I didn’t document exactly why I did this, but I’d imagine that I didn’t write all the code required to do that for no reason. My best guess is that the cursor cannot be clipped across monitors, so this was the least objectionable fix for that.

      • Bas Fournier SWE says:

        Ah… well, fair enough. I don’t suppose this scenario occurs very often, so that’s reasonable.

        • Snake USA says:

          I tested this further because it was bugging me and it appears my guess was incorrect. The cursor clip does work across monitors (at least in Win7). I’m still trying to figure out why it is I wrote the window locks this way. In the meantime, if you’d like the modified executable that disables screen intersection, just send me an email.

          Thanks for the feedback, Bas.

  6. Kelly USA says:

    I cannot get it to work for Torchlight II, even with User Mode. It locks the cursor to one screen just fine until I load the game, then suddenly it can move between screens. I tried toggling my hot key a few times, but it did not help. Any ideas?

    • Snake USA says:

      sounds like you have the wrong program set for the “lock program”. i had Torchlight 2 installed but the game just got too boring. so i can’t confirm the exact parameters needed for cursor lock, but i’m pretty sure there was a launcher involved.

  7. Jesse USA says:

    I cannot for the life of me get cursor lock to open Diablo 2 in windowed mode.

    • Snake USA says:

      luckily, i’m feeling generous and i actually have this game. but seriously people, CURSOR LOCK ALWAYS WORKS AND IF YOU CAN’T FIGURE IT OUT: USER MODE. i think i need to put that message into the installer.

      anyways, this is the shortcut you need to send to Cursor Lock to get it to open D2 in windowed:
      /O:”E:\Program Files\Diablo II\Game.exe” /P:-w /R:500 /M:2 /F

      it seems to have an issue with locking the game to window interior when it first starts if the resolution is set to 800×600. i fixed this by either raising the poll rate or diddling the toggle lock hotkey off and back on again.

  8. snowdogjoe USA says:

    Having some trouble with Mech Warrior online (free to play great game try it) Cursor Lock will run the game in “test” mode but when I try to start it with the Short Cut ( it created) nothing happens. I can see Cursor Lock running in the task manager but no game comes up. The game has a type of launcher (lobby) that lets you “set up” prior to battle and then runs the “connect” part of the game(dropping you into battle). The launcher is windowed the game is full screen. LIke I said the game is free to play ( but you will love it) Download it and see what I am doing wrong.

  9. Coolo AUS says:

    Hey, is it possible to lock the mouse in a specific region on the screen? I want to use this with terraria and xpadder to use my controller, but without locking the mouse close to the player, it gets lost and can take forever to move with the analog stick…

    • Snake USA says:

      If you want to lock the cursor to a region smaller than the window’s interior, then Cursor Lock won’t be able to help you. Maybe there’s something you can do with xpadder that will slow or constrain the mouse movement.

  10. John Ochia PHL says:

    Hello Sir!! I wonder if this software currently (still) works for Diablo 3? If so, what settings should I choose? I want to lock the cursor in the game while it is running on “Window mode” but not necessarily on “Full Screen Windowed”. I have tried your offered solution in a previous post but it no longer works and was dated a year ago. I’d be grateful if you can provide for me the correct settings!

    • John Ochia PHL says:

      Nevermind, I got it to work using the settings on your previous post. I guess there’s something I didn’t do right. Anyways, thanks for this awesome piece of software :)

  11. Dean GBR says:

    Hi, I’ve been trying to use the programme with Rome II but it seems to only lock the cursor in the programme’s initial launcher and not when the app actually run. So when the launcher is open, my cursor is locked, but when the game launches the cursor is no longer locked. Since it is a Steam game, I have to Steam as the target for ‘open program’ so I can’t sort it that way.

    Thanks in advance

    • Snake USA says:

      as i don’t have this game, the only thing i can tell you is that it sounds like you need to set a different executable to the “lock program” option. check out the tutorial video if you’re confused. or maybe ask on a Rome II forum for what exact options are needed.

      and if you’re still stuck, user mode is always an option.

  12. Triton USA says:

    Hey, I’m having some problems using your program with TF2 in windowed mode. I’m pretty sure my setup was correct because it made the shortcut and booted the game up perfectly fine, but when I got into the actual game, I could still move my mouse outside of the window. Anyone know how I could fix this?

    • Snake USA says:

      you can enable the log file to see if and when TF2 is being locked. if it never locked, your shortcut programs could be wrong. if it locked and then unlocked, there might be something conflicting on your system.

      Log will look something like this:

      [01/01/2013 - 12:00:00 AM] App: Started.
      [01/01/2013 - 12:00:00 AM] Status: Program xxx.exe started.
      [01/01/2013 - 12:00:00 AM] Status: Locked.
      [01/01/2013 - 12:00:00 AM] Status: Unlocked (lost focus).
      [01/01/2013 - 12:00:00 AM] Status: Locked.
      [01/01/2013 - 12:00:00 AM] Status: Unlocked (hotkey).
      [01/01/2013 - 12:00:00 AM] Status: Locked.
      [01/01/2013 - 12:00:00 AM] Status: Unlocked (app closing).
      [01/01/2013 - 12:00:00 AM] App: Closing.
      
  13. Crixler USA says:

    Hi, I finally managed to get this to work properly with Skyrim with SKSE, while still having Steam functionality, which was a difficult feat. I learned something from it, and it might be good to update your Steam guide with this bit of info:

    If you try setting this up with a non-Steam game through Steam, -applaunch will not work. -applaunch only works for actual Steam games. However, -gameidlaunch works for both Steam and non-Steam games. So I suggest using that instead of -applaunch.

    So I got that working, which was awesome. No more mouse messing around on my other monitor, without having to sacrifice SKSE or Steam! Except there’s still one thing that’s bugging me a bit. When I hit shift-tab to bring up the Steam interface, my cursor is still locked to Skyrim. Is there any way to make it unlock when I do that? I tried to set shift-tab as a toggle hotkey, but Cursor Lock didn’t seem to like me trying to use tab in that.

    Thanks!

    • Snake USA says:

      this is very interesting. I hadn’t yet heard about the gameidlaunch parameter. so I did some research on it, and it seems that this is only helpful if one added a “non-steam game” (Library > Add a Game > Add a Non-Steam Game) and still wanted the game overlay to work. so I think for the majority of users applaunch is still perfectly fine, but gameidlaunch is still good to know about for those fringe cases. seems like you went through a lot of trouble to use Cursor Lock with skyrim + skse + steam overlay, but good to know it’s actually possible.

      as for shift-tab not working as a hotkey, I’ll look into this. seems like it isn’t capturing the tab key correctly, so maybe a bug.

      thanks for the heads up.

    • Deaks GBR says:

      How did you get it to work?? I’ve tried so many things, but it still won’t work with SKSE! :'( Please explain how you did it?

      • Taber USA says:

        Well two years later you probably aren’t playing Skyrim right now but I used Crixler’s information above to figure it out and thought I’d let you know haha.

        I added SKSE as a non-steam game, (click add game at the bottom of library,) and got its app ID by creating a shortcut of it on the desktop (right click on it in the library,) and looking at the target of that shortcut. The probably crazy long number at the end is it. Do everything else like a regular steam game, and be sure to use -gameidlaunch like Crixler said. For anyone else that came to this page almost 4 years after Skyrim’s release, here you go!

  14. Chun CAN says:

    Hello, I’ve been having an issue with Dark Souls where the cursor does a “rubberband” (http://steamcommunity.com/app/211420/discussions/0/846940248008216704/ this guy explains my issue perfectly). I followed the instructions to fix it from here (http://forums.steampowered.com/forums/showthread.php?t=2900481) but it still happens. Is there something wrong with how I set it up?

    • Snake USA says:

      huh. never heard of that issue before. are you playing in fullscreen or windowed? either way, sounds like something is constantly causing the foreground window to change. you might try turning the log on to see if that is indeed the case and there might be something you can do with your system to fix it. otherwise, maybe try turning the poll rate down to something like 50ms or use user strict mode (which is not affected by foreground window changes). good luck.

  15. Lachlan AUS says:

    Working perfectly with Age of Empires 3:The Asian Dynasties. Got it working after about 15 minutes (including watching the tutorial video). Very well done!

  16. avatar12Dave USA says:

    Hi there, I’m having some struggles with the program. One thing I can’t figure out is how to get the hotkeys to save. I run “Setup Cursor Lock” and go to the Hotkey tab and see the default Shift+D in there for toggle. I then choose a different hotkey combo for toggle… such as Shift+Alt+L.

    However, when I run the program – either via shortcut or “Start User Mode”, only Shift+D works. Furthermore, if I re-open “Setup Cursor Lock”, my hotkey has been replaced by the default Shift+D again.

    Any ideas?

    • Snake USA says:

      Well, first of all, I’m a bit confused as to why Shift+D is your default toggle. It’s supposed to be Ctrl+Alt+L. You might check on that.

      As for the settings not saving, it could be because of write permissions on the Cursor Lock config file. See if cursorlock.ini exists in “C:\Program Files (x86)\Cursor Lock” (Windows 7) and is writable. You might even try deleting the config to reset all settings. This Shift+D stuff is perplexing. Let me know how it goes.

      • avatar12Dave USA says:

        It is possible I hit Shift + D while troubleshooting, but either way, it is stuck in there now. I checked the cursorlock.ini and Shift D was in there. But nothing I did could get that to change (or anything else in that file).

        Write permissions are set properly on that folder.

        If I delete the ini file, it does not re-create itself.

        I guess I am a bit confused about how things work. At what point does that ini file get created and written to? Since there is no “save” or “apply” option in the setup, I am not sure when I should be seeing changes, etc.

        • Snake USA says:

          It writes settings back to the config file on three events:

          1. Self Test
          2. Test
          3. Closing Setup Program

          It really should also save on shortcut creation, though. I’ll add that for the next release.

          • avatar12Dave USA says:

            Ok, something is borked with mine then, it is not writing on any of those events right now (although clearly it must have at some point in time) – I’ll try a fresh re-install. But first, how does one uninstall the program? I don’t see it in add/remove. Should I just delete the program folder?

          • Snake USA says:

            It’s not really installed. It’s just extracted. So if resetting the config didn’t help, then probably re-running the installer won’t help either. I’d try restarting Windows first. Or make sure Windows didn’t decide to run Cursor Lock in a compatibility mode (right-click cursorlocksetup.exe > properties > compatibility > should be unchecked). Or try running as admin. What Windows version is this, BTW?

          • avatar12Dave USA says:

            Ok, so I think the problem for me is that the config is only updating if I run a ‘Test’… not if I just close the setup program. Who knows why, probably specific to my machine, but I don’t mind running a Test each time I need it to save.

            Thanks for the help! If this works for me as I hope it will, I promise to donate to your development time.

  17. nahuracunt NLD says:

    Your UI should speak for itself rather than the clusterfuck it is right now. Responding to people with ‘RTFM’ is nothing less than autistic.

    • Snake USA says:

      Cool story, troll. I really should have just deleted the comment, but I thought I’d give other visitors a chance to agree or disagree with it, hopefully in a more thoughtful manner than you seem to be capable of.

    • Dragoon DEU says:

      An autistic would probably have read the manual. Some are highly literate, with skills above the general population. So he would be ahead of you.
      Since I not a native English speaker, I’m unsure. When someone shows very rude behavior is dick or jerk the proper term? Also feel free to delete this comment as it’s probably quite off-topic.

  18. Boradordin USA says:

    For Baldur’s Gate: Tales of the Sword Coast, the old, original game, set Open Program to Baldur.Exe. Set Lock Program to BGMain2.Exe

  19. PoloniumFist USA says:

    I’m trying to play War Thunder with Cursor Lock in “borderless fullscreen window”. When I’m in the menus and when I have a free cursor to select menu objects it locks to the window as intended. Problem is, when I’m in a game and I aim around with my mouse I frequently pull up my desktop dock, which unhides on mouseover, making my game no longer the active window.

    Some of my other games, like TF2, lock the cursor to the center of the screen, so when the monitor refreshes (or something like that) the cursor returns to the center. Is there a way to lock the cursor to the center of the screen with Cursor Lock? Or do you know of any other way to do this?

    Thanks. Great program btw.

    • Snake USA says:

      you might try using strict user mode. this mode isn’t affected by changing foreground window.

      i think i understand what you mean about the cursor centering, but not sure you’d want to try to change something like that since it could have an adverse effect on the way the game tracks mouse movement. but beside strict user mode, you might also try making the game window slightly shorter or perhaps adding the game to an exception list for your dock program.

      • PoloniumFist USA says:

        Couldn’t find a way to except unhiding the dock while certain programs are running, nor did Strict User Mode work, nor can I change the dimensions of the borderless fullscreen window. :/ Oh well. Just researching all this made it seem as if cursor locking to a single point is done in the game engine and that this hasn’t been an issue long enough to be considered by game developers. So I guess I’ll have to post on the forums and see what happens.

    • Dragoon DEU says:

      It works perfectly with User Strict Mode (USM). It works so good that USM is the only way how I use Cursor Lock. Run Cursor Lock to create a shortcut on your desktop for USM. Then run it when ever you need it.
      The trick is then to use the hotkeys to toggle the lock on/off and to switch modes from lock to screen, to windows or in case of TF2 to windows (interior).

  20. marcaqua HRV says:

    Yeah hello there, didnt find any time to re-read the issues of the others maybe my issue will be in it but ill post it anyway. So my problem is, the cursors lock works fine when im starting a game (playing also in windowmode) but i still want to switch while in game the monitors. First start up works, but when using the hotkey to toggle off cursor lock it wont let me toggle it on. Any suggestions how to fix that? Thanks.

    • Snake USA says:

      maybe check your hotkeys and make sure you’re doing toggle instead of close. or try playing with some of the options, specifically force lock and lock region. could be something specific to this game that is messing the lock up.

  21. Max Chu MYS says:

    I got a game is having problem with the cursor but it can only be launched by Steam. Is there anyway to integrate them to launch steamapp?

    • Snake USA says:

      Watch the tutorial video above.

      • Max Chu MYS says:

        Thanks for the tutorial. I m not sure why, but its not working..
        The game i was trying to fix is Warframe.
        Here’s my setting.

        Open program: D:\Steam\Steam.exe
        Open program args: -applaunch 230410
        Lock program: D:\Steam\SteamApps\common\Warframe\Warframe.x64.exe

        /Force Lock
        /Lock Region: Screen

        • Snake USA says:

          looks right, although i can’t confirm that the lock program is correct, but it sure sounds like it. does the game at least launch correctly? you’re just not getting a lock? does it work when you use User Mode?

  22. PonziPilate USA says:

    First off, thank you, Snake, for the excellent program.
    Is there a way to set Cursor Lock to force windows to startup in Strict Mode?

  23. PonziPilate USA says:

    When I download Cursor Lock (173.47 kB) from the link above, though the Setup file says 2.5.2, it installs version 2.5.1.
    I need, for my uses, the newer version that fixes the strict mode shortcut bug. Where can I locate it?

    • Snake USA says:

      i think you’re just seeing the version reported wrong in the about tab. i’m pretty sure the download link is in fact 2.5.2. are you having any other specific problems?

      • PonziPilate USA says:

        Yes, when I attempt to create a shortcut for strict mode I recieve the following error message:
        “C: [Path] You don’t have permission to modify files in this network location. Contact the administrator per permission to make these changes.”
        I am running it as Administrator.

  24. Krille SWE says:

    Hey i try to open warcraft 3 but it doesn’t happend anything, i also tried re-istaling this prgoram bur it seems that i wont work either please help me

  25. Skye USA says:

    So I’m a bit of a bind. I’ve watched the tutorial video, and it covered Steam games, which is awesome, but I’m still stuck in the dilemma of having no answer to how to do this with other games that use launchers, such as Starcraft II, World of Warcraft, or Star Wars: The Old Republic (in other words, games that have their launcher .exe’s the same as the actual program). Can anyone offer some advice?

    • Snake USA says:

      if there’s only one executable, then you only set that one exe to the open program argument. in this case, there is no launcher.

      if this doesn’t work, then there may be a launcher. i don’t have any of these games so i can’t tell you for certain what is the case. let me know how it goes.

Leave a Reply