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.


  • 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





Cursor Lock

221 kB - EXE



via Paypal

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



354 Responses to Cursor Lock

  1. Stormbringer USA says:

    Is a pixel-border feature possible? I would like to not have Window’s taskbar rise up when the mouse touches the side of the screen :)

    • Snake USA says:

      I’ve never know that to be a problem. Are you playing something in windowed mode? What version of Windows? Is your taskbar somewhere other than the bottom of the screen?

      • Stormbringer USA says:

        Well, no. What is needed is for the Windows taskbar preferences to have an option under “hide taskbar” that says “don’t unhide with mouse” but since that’s happening, your software is the closest thing to a fix:

        If it can keep the mouse from touching border pixels, even just one, then it can keep the taskbar from flying out if your mouse gets close to the edge of the screen.

        Not for games, but if you are playing a game in a window, it could theoretically be a problem.

        I put my taskbar on the side, and make it very wide, so you can see the titles in it. To add insult to injury, if you touch the side of the screen, the taskbar gets in the way of what you were wanting to touch and must be hidden. You can either hit the Win key twice, or move the mouse and make another more cautious approach.

        Either way it’s Windows stepping on its own foot. A regular nuisance.

  2. Daniel Urabl AUT says:

    I tried this program out for csgo and now when i play other games I cant alt-tab anymore and go to my second screen, please help. How can I remove this program again?

    • Snake USA says:

      If you’re using program mode, you may have set it up incorrectly. Regardless, you’ll want figure out or set a hotkey to close Cursor Lock.

  3. redtory CAN says:

    I was really hoping this would work with C&C Generals, but it doesn’t seem to do anything. Pity.

    • Snake USA says:

      99% of people claiming Cursor Lock doesn’t work have just set it up wrong.

      • redtory CAN says:

        That could well be the case, but I’ve used your nifty utility with success on other programs, so I don’t think that’s the case here. I did notice in the earlier comments from several years ago that you indicate you don’t have any of the Command & Conquer games, so I guess it’s not possible for you to test it to see if it works on this particular one…

  4. Dimpl AUS says:

    I had the problem where alt-tabbing out broke the cursor lock, but user mode seems to have fixed it. It would be great if the program appeared as a taskbar icon (in the bottom right corner) while running.

    • Snake USA says:

      Maybe you have the wrong executable selected for Lock Program? With any typical program, Cursor Lock is supposed to keep running as long at the lock program is running to specifically allow for alt-tabbing.

      Also, any future versions will most definitely have a taskbar icon.

  5. Noah Woerner USA says:

    Hello! First off, I’d like to say thanks for making such a fantastically useful application. It’s great for poor PC ports of console games (*cough* DARK SOULS *cough*). I have, however, been having some troubles with the application, specifically regarding hotkeys. I can’t seem to get ANY of them to work properly. I’ve tried changing the hotkey commands to all sorts of different things (most using 1-2 modifiers, as recommended), disabling my AutoHotkey program, running the application as administrator, and even running in compatibility mode (I’m using Windows 10). I don’t suppose you’ve got any ideas what may be causing this? The program’s still usable, but I’d like the ability to switch the lock on/off.

    • Snake USA says:

      Sorry I forgot to respond to your previous comment. So can you set the hotkeys okay, i.e. do they enter into the program correctly and are they still there after re-opening Cursor Lock? Or are the hotkeys just not functioning as expected? I’ve heard of a couple games that seem to override all hotkeys, but I don’t recall if Dark Souls was one of them.

  6. Francisco Becerra CHL says:

    I was wondering if there is a chance that future versions may have a cursor position lock, so that everytime it’s not moving, it gets locked to a certain coordinate on the screen.

    • Snake USA says:

      I don’t think so. That is a fundamentally different function and (AFAIK) fringe use case. But thanks for asking.

      • mike CAN says:

        What about adding a border that it activates at before hitting the edge?, I’ve got a program that even at the highest poll rate it got a little outside the window before it snaps back, i think the program measures the difference in the mouse position to figure out how far to move. This results in me still clicking outside the window at times.

        • Snake USA says:

          Sounds like the lock is lost immediately, so lowering the poll rate would not be an ideal way to fix that. I’m inclined to say that Cursor Lock is set up incorrectly (because 99% of the time, that’s the case). But just in case that isn’t what’s going on, what program are you trying to use Cursor Lock with?

  7. Garrett G USA says:


    I am running Windows 7 and attempting to get Cursor Lock to work with Diablo II window mode. I have the shortcut configured as:

    Open Program: Diablo II.exe
    Open Program Args: -window
    Lock Region: Window Interior

    I also have force lock checked, and a toggle hotkey configured.

    In order to open the shortcut, I have to Run as Administrator. When I do, the Diablo II window opens, but there is no locking effect. The toggle does not seem to be working either. This is the log that is being generated when I run the shortcut:

    [01/09/2017 – 10:12:07 AM] App: Started.
    [01/09/2017 – 10:12:07 AM] Status: Program Diablo II.exe started.
    [01/09/2017 – 10:12:08 AM] Status: Closing (lockapp closed).
    [01/09/2017 – 10:12:08 AM] Status: Unlocked (app closing).
    [01/09/2017 – 10:12:08 AM] App: Closing.

    Any thoughts?

    Thank you,

  8. Isaac Saffold USA says:

    Just out of curiosity, what did you code this in?

  9. Dragoon DEU says:

    Merry Christmas and a happy new year.
    Can’t believe it’s already 10 years since version 1.0, and since then it’s has been an essential.
    I tried others progs but I always came back for this one. Thank you for taking the time to code this nifty tool.

  10. dckx USA says:

    Thanks for the app, works like a charm although sometimes the mouse still manages to leave the screen a tiny bit, but enough to click outside the fullscreen game and get it minimized… it doesn’t happen to often, though. Now, I am just curious. Why is this even a problem? Why do we need cursor lock to begin with? Is there any way or do you have at least any thoughts regarding what causes this? In my case, it started to happen in Windows 10. Never had this issue in Windows XP, Windows 7, and Windows 8.1

    • Snake USA says:

      You should try lowering the poll rate if you’re experiencing momentary Cursor escapes. Or look for other running programs that might be stealing window focus. The logging feature can help you determine what’s happening.

      As to your inquiry about the origins of Cursor Lock, it’s primarily just oversight by developers. It first came to be a problem when multiple monitor setups became popular circa 2005. Few developers had any clue that the mouse cursor could actually leave the game window because it was previously always bounded by the desktop (screen) size. But with multiple monitors, the game and desktop sizes are no longer the same and thus not all sides of the game window are bounded. I think once developer knew of the problem, it was quite trivial to fix it. IIRC, the DirectX API even includes functions to “capture” the cursor, which restricts it to only the game window.

      I’m not really sure why so many newer games are still afflicted with this problem, though. It’s probably a myriad of reasons: poor console/mobile ports, inexperienced indie developers, lacking backwards compatibility of Windows, or perhaps even a mere perceived increase in offenders by users that are now playing more games windowed or with multiple screens.

      But anyways, I appreciate the question and your interest in the matter.

      • dckx USA says:

        Thanks for your response, snake. I actually solved the problem that was causing this issue to being with. I use Actual Multiple Monitors (8.9.2) to manage my three screens —I have used this software since Windows 7, as it provides the best options for having multiple taskbars as far as I am concerned. Anyway, I realized that windows 10 comes with its own multiple taskbars settings, which is something not present in older windows (for instance, the option to place the taskbar buttons on the taskbar of the screen where a window is open. It still doesn’t allow as much customization as AMM does, but that’s the main functionality I need). Anyway, I activated Windows 10 native multiple-display taskbar, and disabled the one provided by AMM. And voila, problem solved. The game I was playing was Medal of Honor Allied Assault (2002), a fairly old game that never gave me problems with or without multiple displays and multiple-displays managing software. I had just started playing Infestation: The New Z (which is new) and I was having the same issues, which are now gone as well. I will still keep a copy of cursor lock just in case this issue reappears in the future.

  11. Gen3ric CAN says:

    Any plans to add a portable version in the future?

    • Snake USA says:

      It’s already essentially portable in that settings are saved wherever the program resides. I suppose more could be done to make the program execution less dependent on a specific installation path, though.

      In the future, I’d like to make Cursor Lock a background app that monitors which program has focus and applies the lock settings specified. Program Mode in the current version of Cursor Lock is good for efficiency, but not user-friendly enough for most people. This approach might also make portability easier to implement as well.

  12. fattzilla USA says:

    Windows 10; latest version of chrome, keep getting error that a virus was detected and I can’t install.


    • Snake USA says:

      I think someone else mentioned this recently on youtube comments as well. It looks like it’s probably overzealous anti-virus software. I assure you there is no infection with the file that is hosted here. I even double-checked if the downloaded MD5 matched the original installer and it did. BTW, it’s a14529624223a1f4e483b07957ed7b60 for version 2.6.1, in case anyone is paranoid.

      • Connor Ross USA says:

        I looked into it when it gave me the same error, and windows security essentials displays it as a trojan virus.

        • Snake USA says:

          Well, that is interesting but still inaccurate.

          From this this virus scan report: “There are strong indicators suggesting that this file is safe to use.”

          Some other developers using the same (popular) NSIS installer that Cursor Lock does are also reporting false positives, so I expect this to be rectified eventually.

  13. Jerah USA says:

    Works on Subnautica… i havent tried other games yet but im curious if anyone knows how to fix this issue ive had since i rid my computer of a nasty virus… of course i had the issue with the mouse going out of the games (even in fullscreen) mostly because the screen would flicker my desktop everytime i clicked… if i click to fast (rapid clicking) then it ends up clicking stuff on my desktop or minimizing or closing the game… this screen flickering is the root of my issues with my mouse going outside game walls and i cant seem to fix it myself… i now play most games in windowed mode as that seems to slightly stop it from clicking out of the game but it still flickers and sometimes even acts unresponsive after a single click (that is random) and sometimes it screws me over by clicking out of game (i assume its doing that to cause this next issue) and if i was moving forward with “W” then my character keeps going even after i let go of it! i have o hit “W” again for them to stop… same with other buttons, even clicks. this doesnt happen every time but press a button or click but its pretty frequent. i am also having a constant issue with an error coming up saying my display driver has stopped but successfully recovered…. if that happens in game the screen then freezes but i can hear myself still in the game, but the screen remains frozen on what ever was happening in game when the error came up….. any fixes for these issues? you guys seem computer savy so i hope i can get some sort of help. thanks in advance.

    computer is 2014 Dell Inspiron 15-3537 running Windows 10. Processor: Intel Core i5-4200U CPU 1.60GHz 2.30GHz.

    • Snake USA says:

      What you describe sounds a lot like how a mouse cursor acts when it isn’t “locked” or “captured” by a program window. Other than that, I’m not sure what you’re getting at, although I would suggest updating your video card drivers.

  14. Garrett USA says:

    Where would you find the “Open Program Args” numbers for an Origin game?

  15. Yodamoo CAN says:

    Does this work with Windows 10? I am having an issue. the cursor is sort of locked to the screen but not very well. It keeps going past the edge but then bouncing back to the edge. Makes panning very choppy and pretty much impossible. Also you still have the chance to click off the screen for the half second the cursor is over there before bouncing back.

  16. k4njin ITA says:

    It possible to lock (when playing league of legends) the mouse only to the center screen in nvidia surround?

    • Snake USA says:

      I assume setting the lock region to screen instead of window would do what you want, unless Nvidia Surround makes the independent screens appear as one screen to Windows.

  17. McFrugal USA says:

    I tried to use this on Windows Vista and it does nothing. There is no evidence that CursorLock.exe ever successfully runs, as it’s not in the processes tab in Task Manager.

    • Snake USA says:

      Enable logging to help you figure out why Cursor Lock might be closing prematurely. The most common cause, though, is with Program Mode if the program to lock opens and then closes for some reason, causing Cursor Lock to also open and close. It can happen so fast that you can’t even see it in Task Manager.

      When in doubt, just use User Mode.

  18. Ed USA says:

    Hi. I have two (hopefully easy) feature requests that wouldn’t seem too intuitive at first but I guarantee they’d make this program the ultimate thing.

    Request one – Optional horizontal and vertical mouse wrap-around within a locked window
    Request two – Hiding the windows mouse cursor.

    Reason: Not sure if you’re familiar with the program known as ‘Splashtop’ but it’s basically a PC remote control program that’s *almost* perfect for remote gaming. Where they are almost perfect is in the area of mouse control for FPS games. With this program and those two feature additions you’d be a god among Splashtop users.

    • Snake USA says:

      Interesting ideas, but I think they’re out of the scope of Cursor Lock. I can’t think of any applications for cursor wrapping; most FPS games read raw input and don’t care where the cursor is on the screen. Hiding the cursor is certainly doable, but again I don’t know of any applications where you’d want to do this (and also use Cursor Lock) and I’m sure there are tools to do this already.

      From my brief inspection, Splashtop doesn’t seem to be a unique bit of software. Lots of companies are working on remote access tools and specifically ones for gaming. I’d suggest that your problems need to be addressed by the remote access application.

  19. Thomas C USA says:

    Hi! I’m on windows 7, playing Quest for Glory 2 VGA remake, 640×480 window mode, using User Mode with locking Window Interior.

    When I’m on the farthest edge, the regular window cursor appears it doesn’t register clicks inside the game. I made an animated gif recording of this:

    Hm that’s strange. The screen capture shows the mouse all the way out of the window interior, but it’s really not. When I’m not recording it, the mouse cursor is inside the border.

    Anyway, yeah, it’s not registering clicks when I’m on the farthest edge. Is there any way to fix it? Thanks :)

    • Snake USA says:

      Interesting. It looks like it might be due to the Windows theme that the program is using, such that Windows thinks the game window dimensions are different than the game thinks they are. And since the “window interior” region is based on what Windows is reporting, that might cause your problem. You might try fiddling with compatibility settings for the program. Otherwise, I’m not sure how you might further explore what the problem is except with a developer tool like Spy++.

  20. daldaren USA says:

    So I installed this for trying something with Baldur’s Gate Enhanced Edition on Windows 10. Tested what I needed to, and then tried to uninstall. It wasn’t listed as an Application in the windows 10 Program’s list, so I searched here an saw it mentioned to manually delete the program.

    Unfortunately, Windows 10 didn’t like that. I now have a blank listing in my Start -> All Apps, and when I open the file location, it just goes no where. Kind of annoying, so I tried ccleaner to just delete the extension. Nope.

    Any thoughts on how I can fix this, because this is going to give me Windows 10 PTSD.

    • Snake USA says:

      The start menu is just a special directory. In Windows 10, it should be located at %ProgramData%\Microsoft\Windows\Start Menu\Programs. Failing that, you might just need to refresh the start menu somehow. Had a zombie shortcut on my start menu recently, and that one did have an uninstaller.

    • C:\Users\computer name\AppData\Roaming\Microsoft\Windows\Start Menu\Programs

      That’s where it’s located.

  21. Kat USA says:

    Confirmed working for Star wars The Old Republic. Thank you so much for this. It’s awesome. Working as intended and makes gaming SO MUCH EASIER!

  22. fairfolk1 USA says:

    Hello. What would I do if I wanted to lock onto a window that was forced into window mode through adding -win to the target?

    • Snake USA says:

      All you have to do is use lock region of window interior. If you need to know more, read the manual.

      • fairfolk1 USA says:

        I’ve done so, and it doesn’t detail what to do if you forced it into windows mode. I’ve tried to do what you said for Warcraft 3 below (Adding -window to args), tried targetting the original file and shortcuts, but whenever I open the cursorlock shortcut it is resumes back to fullscreen.

        Another problem is when I target another game I get the error “unable to init draw”. I’m guessing this is game side and it’s just not compatible with Cursorlock, but worth an ask anyways.

        • fairfolk1 USA says:

          Urgh, ignore the top one…I went back and realized there’s a checkbox next to args. I’m an idiot. Unable to init draw still stands though.

          • Snake USA says:

            AFAIK, Cursor Lock has no incompatibilities with any other programs. It works on a level that games don’t even know it’s there. I would guess it has more to do with Warcraft 3. I fact, I remember having problems myself when I tried to play it on Windows 7 recently, so maybe google a bit on it.

  23. Bobby USA says:

    Hello, first of all I would like to thank the developers of this software! However, I have noticed a slight nuisance that I believe is not working correctly on my Windows 8.1 machine. I am trying to create a “user strict” mode in which TAB is used to lock/unlock the screen and ESC is used to stop the program so that TAB will no longer act exclusively as the screen lock. TAB works fine, but I am noticing that ESC is not killing the process, is this what the “Close lock program/unlock hotkey” checkbox is supposed to complete?

    • Snake USA says:

      I’m surprised that Tab alone can be used as a hotkey. I wouldn’t recommend using either tab or esc as hotkeys as they can often interfere with existing program functions. You should always use a modifier key like shift, ctrl, alt, or win when specifying hotkeys for Cursor Lock.

  24. Need something to lock my cursor for Fallout: New Vegas. This app worked once before, but now will not lock the cursor to the game window, either with a program shortcut or with “user mode strict”. With the latter, it will work for other program windows, but not with the game.

    • Snake USA says:

      Well, I have Fallout NV, so I can confirm that Cursor Lock works with it. Make sure FalloutNV.exe is set as the lock program. If you still can’t get it to work, consult the log file.

  25. Chester Honn USA says:

    I’ve been successful with the software working for most of my games, but I’m confused on how to get this to work with Minecraft. Is it possible?

Leave a Reply