Use this application to disable or bypass the sticky corners in Windows 10 for dual displays or multiple monitors. What it does is hop the mouse over the sticking corners, as well as the screen edges when moving windows. Thus it allows the dragging of windows through screens without your mouse getting hijacked by the Snap Assist.
The Hot Corners and Snap Assist still work, but now only when you want them to.
Note: A user has reported this app got falsely flagged as a game cheating app – which may cause issues for any Blizzard or Activision games, such as CoD.
Latest Version released on 15th of June, 2020.
Here is the actual application itself if you wish to save it directly and run it whenever you wish: –
Click to download Non-stick mouse
VirusTotal (0 out of 89)
I’ve been asked for an installer so it can run automatically on boot – so here it is, an installer: –
Click to download NSM setup
VirusTotal (0 out of 89)
And for your peace of mind the full source code written in Delphi, 3 files on GitHub.
This application does not read or write to any drive, it does not access the registry or connect to the Internet.
I am only sharing this as I took the time to write it and I notice many people are annoyed by these Microsoft “features”.
It hides its window – so terminate it use the Task Manager. It is not designed to be overly clever, it does not have a notification tray icon.
If you want it to run on start up make a shortcut to where you have saved it in the start up folder, or use the installer!
If it is does not work at all please let me know and I will try to fix it when I have time.
It won’t fire when the active/topmost window belongs to a process which is running with privileges elevated higher than what NonStickMouse itself is running with.
In an effort to minimise misfires this take parameters of when to fire: –
“corners” – only fires when in a corner (thus dragging a window across screens will stick).
“lag” – a delay between firing the hop. The default is 500 milliseconds but that can be overwritten by putting a value after the word lag.
These parameters can be affected by being emedded in the filename itself, thus renaming “NonStickMouse.exe” to “NSM_Corners_Lag_200.exe” will activate both, with a delay of 200ms. Use as required.
Subsequently I have also developed a debug version: –
(Consequently, due to the mindless stupidity of virus-scanners, of which I’m not even going to bother to try to counter, I took it off my site. If you need this app to help diagnose your issue please let me know and I can make it available for you.)
This has a User Interface showing the screen dimensions and offsets of each monitor, the mouse tracking, and the values it was at when the last hop was fired. This application will also hop the mouse so for complete accuracy please terminate NonStickMouse.exe when using it.
You may choose to compile this yourself for your own sense of security – in which case follow the instructions here: –
Developed by Jonathan Barton
Disclaimer: Jonathan Barton is not responsible for any damage or presumption of damage caused by this application. All information here is to be considered advice of which you may chose to act or not act on; this includes compiling the application yourself. As one guy said, you received free, give free – this application cannot be repackaged and resold for commercial gain. You may contact me if you see an opportunity for this. Consider this paragraph as the End User License Agreement – which can be changed at any time without notice.
Hi! Just wanted to say thanks for this!
I’ve got two monitors connected by corners and it works great.
Only time it doesn’t work is when I have a visual studio update install window selected.
If I click any other window, it works just fine.
Not that it’s a problem, just a weird tiny bug.
Thank you very much 🙂
To answer your question that was my comment “it won’t fire when the active/topmost window belongs to a process which is running with privileges elevated higher than what NonStickMouse itself is running with.”
The reason MS prevents reading and controlling the mouse when an elevated program is running is to prevent apps from elevating themselves. Otherwise an app could re-launch itself as administrator, while it immediately clicks on the UAC message from the limited instance, which would then terminate itself allowing the admin leveled app to do whatever it pleases!
Thanks for producing this app and for being so transparent with the code!! I’m playing with it to help reduce frustrations when moving my mouse and windows between monitors. From left-right and right-left movements it works great, but top-bottom or bottom-top movements it doesn’t help. I found a couple comments above related to this issue and it looks like you resolved their issues so I suspect my configuration is causing additional complexity.
I have 2x 24″ (1920×1200) in side by side, a 20″ (1600×900) next to the right 24″ with the tops aligned, and a 15″ laptop screen (1920×1080) below the 20″ and sharing some of the right side of the right 24″. Using the debug version, I get the following layout:
screen 0 | 3840 | 913 | 5760 | 1993 | 1 | _ | _ | _ |
screen 1 | 1920 | -01 | 3840 | 1199 | _ | 3 | 2 | _ |
screen 2 | 0000 | 000 | 1920 | 1200 | _ | 1 | _ | _ |
screen 3 | 3480 | -01 | 5440 | 0899 | 1 | _ | 1 | _ |
When I move the mouse between the 20″ and the laptop screen (vertical, up or down) it sticks very hard to the border. On the top screen it sticks at the bottom of the taskbar, and on the bottom screen it sticks at the top of the screen. I can “break” the stick with a very solid and fast movement, but it “feels” stickier than the left to right movements. What sucks even worse is the stickiness is not specific to dragging windows; it also happens when just moving the mouse by itself. While the side-side movements have been frustrating, the top-bottom have been extremely frustrating and require me to stop what I’m doing to actively confirm my mouse is getting where I need it to go.
Running either the release or the debug version does not change the stickiness of the top-bottom or bottom-top movements. Both apps do improve the side-side movement between any of the monitors, including the 24″ to the laptop screen through their small overlap (1200 – 900 pixels).
I’ve noticed that in the debug version, the “Last Hop” segment does not always update properly when moving between windows. The highlighted line in the grid changes reliably. I don’t know if that is of any relevance but I thought I’d mention it jic.
If we can determine what is causing the top-down/down-top issue, would it be (reasonably) possible to update the app to handle cursor movements when no window is being dragged? My hope is that MS will update Win10 to better handle these issues but I’m not holding my breath.
Please feel free to reply by email if that would be simpler.
I edited your comment putting code tags around the screen layout grid.
I’m swamped with work currently, sorry to say – and when I have the time to give your well thought-out post the courtesy it deserves I certainly will!
It could be the same issue Danny is finding with my app – in which case I should be able to post here, otherwise for sure I’ll catch up with you via email until this is resolved (or at least identified as beyond repair haha!).
Edit: With that last hop not always firing please check to make sure NonStickMouse itself is not running, as this could effect the hop before the Debug does, thus it won’t register for the Debug version.
Looking at these numbers shows the screens aren’t perfectly aligned, it only takes a pixel out for Windows to drop the ball on the Snap To.
I knocked up a spreadsheet with your values, and I made a scale image so I could double check. This is what I’ve worked out: –
The numbers up top are your current ones (the one in red was a typo I corrected), and the numbers at the bottom is where we want the screens moved to so they are aligned.
Please have a look at my comment here on how to move the screens whilst seeing the monitors’ offsets: –
Note this is done by using the Control Panel Display options, not the [tile themed] one you when you right-click the desktop.
If this doesn’t resolve it please let me know and we’ll see what else we can fiddle with!!
Thanks Jonathan! That is my exact layout, and the pixel offsets were the cause of my issues. I suspected they might be but couldn’t get the numbers better before my first posting. Your debug version did show me that something was off but the garbage screen layout tool in Win10 wouldn’t give me the fine detail I needed to get them into proper position. When I go to Control Panel -> Display, I find no option for the old layout tool. The only things listed are “Change size of items” and “Change only the text size”. The left options aren’t anymore helpful. I’m curious if the old screen went away with the anniversary update or if I’m just missing something.
I tried the new layout tool again with no luck. I poked around in the registry in HKLM\SYSTEM\CurrentControlSet\Control\GraphicsDrivers\Configuration and found a bunch of different configs. Some of these had what seemed to be related Position.cx and Position.cy settings. I found one that matched the #s listed in your debug version, tweaked the numbers, but nothing happened. I suspected a reboot would be needed and started to see that being a deep rabbit hole.
I’m a license owner of DisplayFusion and remembered it had a powerful screen layout tool and thought I’d give it a try. I haven’t used it since my last Win10 rebuild, hoping that MS finally made multi-monitor setups a first class citizen. Up until now it was good but this layout issue was crippling. Anyways, sorry to trail on… after adjusting the monitors in DisplayFusion the bad stickiness issue between 3 & 0 is gone. I have to chock this up to MS failures not only in the layout but in moving between monitors that aren’t aligned directly next to each other.
FWIW on the Last Hop display in debug, I don’t think I was running both programs at the same time, unless the release version stays running after it is killed in Task Manager. I tried it again this morning after fixing the monitor layout and it doesn’t show any values. The current screen position is still show and the grid functions properly. I suspect that DisplayFusion’s hooks might be causing a conflict with the debug app. It can be a little brutish and I normally have to dig into advanced to tell it to play nicely with others.
Thank you again for the app and for the impressive turnaround on my issue. If you are ever in Oklahoma City, ping me and I’ll buy you a beer.
Haha, I absolutely will 🙂 Boutique beer of course!
DisplayFusion is a great app, I stopped using it too when MS finally made multi-monitors functional.
As I was looking around I found there are 2 Control Panels, but as a short-cut you (just for future reference) may be able to get to the original one via Start / Run (or Windows Key + R) and in the Run dialog put “control desk.cpl”
Also note the origin numbers don’t appear until you start moving the screen – so you need to “touch” each one to get it’s offsets.
As for the hops, I couldn’t say why they aren’t listing. NonStickMouse and NSMDebug are two separate apps, they aren’t aware of each other, both are complete – so the debug one isn’t re-firing the original – it may just be a glitch in my hop tracking.
I just confirmed that “Control Desk.cpl” loads the new (aka: Garbage) display settings tool after the Anniversary Update install. A co-worker who hasn’t updated still gets the old (aka: Decent) display settings tool shows pixel data when dragging.
I’ve made a big reply, so I didn’t nest it here! It’s [currently] at the bottom, or here! https://www.jawfin.net/?page_id=143#comment-15310
Thanks! I was unable to get everything lined up perfectly (I’m running Windows 10 and they’ve moved the screen you’re talking about into the new control panel app instead of an applet like on Windows 7. This new app doesn’t show the numbers). I basically had to just throw everything around and get it back to the way I wanted it. It got closer than it was before, and now it’s crossing the up/down boundary without issue. Thanks for your help!
There’s even 2 control panels (maybe – I can’t guarantee that for you) – but you can try doing this: Start / Run (Or Windows Key + R) and in the run dialog box put “control desk.cpl”.
See if that gets you back to the old one. Otherwise, you could keep closing and re-running my debug NSM to check each change, as painful as that is, but only need to get it right once!
Ok ok ok, I’ve really gone to town on this one. I spend a few hours researching, looking for tools, doing registry dumps; all good fun.
Although I located the values, changing them in the registry has no effect (I know why, but is too detailed to explain here). If you’re curious they are stored in the GUIDs of the graphics cards at the location: –
and each monitor per card numbered, from 0000 onwards. (This will include inactive cards [like the onboard one] and inactive ports in the cards, their keys will have only a couple of entries.) The values are in the DWORDS of Attach.RelativeX and Attach.RelativeY (with Attach.ToDesktop having a 1 indication card + port are in use). Also, use F5 to refresh if you’ve moved screens and want to see their new values. But I recommend getting my latest debug.
What I have done is rewritten NSMDebug to give live feedback of the monitors’ settings, as well as fix some bugs with identifying the monitors. Get the latest version from: –
So, what you can do is use the Display Settings and watch the Debug version for the numbers – you do need to click Apply each time. Here’s some tricks I found. Select the monitor you want to move, then use the cursor keys to move it. Each tap will move it 40 pixels, and if you hold Shift it will move it only 8 pixels. I have also found the best way to align one monitor to another is to overlap it a bit and drop it so it shift back to the side but aligned. Like this picture, the red star is where my mouse is, moving the right screen over the left: –
Of course I only have 2 monitors, so I can’t say this will work cleanly in a group.
Another thing to remember is Windows built in zoom. You can zoom the Display Settings screen to check by eye the layout. Pressing Windows Key + Numeric Plus will zoom where the mouse is. You can keep pressing for greater zoom. Use Windows Key + Numeric Minus to zoom out, or just Windows Key + Escape to cancel the zoom.
I really wanted to provide a solution where you could just type in the numbers and the displays will take it – but after many reboots, logging out, closing explorer etc., it won’t behave (again I know why, but just being hopeful!).
Hello, thanks for app (just installed it). After reading some comments looks like some quirks are not because of your app but how Win10 handles mouse.
So I’ve wanted to ask is there any update from Microsoft about this issue?
Sadly no. I keep a watch on all the threads about this issue on Microsoft’s Answers page. It is rather a surprise really, I’m sure some of the guys at MS use more than one monitor, and they can’t but notice the constant and irrevocable jamming in all the corners – maybe if some MS managers started to use more than one monitor it may get a faster response. Perhaps a kickstarter campaign for the decision makers at MS to get more than one screen? I kid of course!
Love you man, was looking for a fix when win10 first came out and couldnt finde anything, THX a lot <3
Our company recently ‘upgraded’ to Windows 10 – under duress, I assure you.
I run a four monitor setup and the sticky screen corners are driving me nuts.
Your fix works perfectly, but Symantec freaks out because a program is taking control of the mouse.
At which point the IT staff swarm my desk, kick me off, quarantine the program, uninstall it and leave me with a – once again – incredibly frustrating display.
(Yes, I see the irony:
Microsoft can hijack your mouse and trap it with no way to fix it. Acceptable.
Johnathan Barton moves your mouse 1 pixel when you ask him to. Call the cops.)
I know you have the source code posted. The IT department won’t budge on this and want to stand by SEP.
Is there any way to get Symantec Endpoint Protection to relax?
Thanks for your help!
Do you know how I am good at my job? It’s because I don’t work in an IT department. Haha, nevertheless, if Symantec is crying about the mouse being moved by an app there is just no way to get around that. I will think on it though, and if I have the chance I’ll install Symantec Endpoint Protection and see if I can write my code so it gets ignored – but, bear in mind, even if I do manage that they [Symantec, or even on reflection, a Draconian IT department] would consider that I have bypassed their security and will “patch” it next update.
I am sad to say that your only solution may be to disable the Snap-To feature in Windows 10. If there are any programmers in your IT department I can [maybe] rewrite my app into a language they know (which has to have a compiler native to Windows) and it could thus become an in-house development.
Thanks for the reply Jonathan.
I know the feeling – I escaped the IT department job years ago. Best idea ever.
I agree a workaround would just end up being patched, and thus would end up as a game of cat and mouse between your fix and their patches, ultimately wasting your time which could be spent on better things.
Some feedback from the people speaking with Symantec:
“This was marked by Symantec as a low risk/potentially unwanted program. Such a detection occurs when a file/application has been flagged to Symantec by numerous other customers as a risk, and Symantec have validated accordingly that the application may present a potential risk.
The intended function of the application isn’t the concern. It’s that the application operates at root level privilege, to the point that Symantec didn’t have sufficient privilege to stop the service without shutdown of the OS.
If this application has any vulnerability (e.g. exposed to buffer overflow/code execution), then this could be used by another service for privilege escalation.”
There’s a lot of weight on the “If” in their last paragraph… =/
I’ll continue using your fix at home and will look into trying to move the window close button [X] 40 pixels to the left while using AHK and a multi-button mouse to move windows between monitors.
Keep up the good work. Thanks again for replying.
Oops, just noticed my reply to you wasn’t nested – see my entry below https://www.jawfin.net/?page_id=143#comment-15352
“flagged by numerous other customers as a risk” – extremely unlikely, in fact I’d say the probability of that is zero! But that’s their stock reply to get you off their back, as it’s unprovable.
The app most certainly does not operate at root level (root level? That’s a Linux term – I suppose they mean as administrator, of which it also doesn’t run at) but you know we can’t argue with them, not when the threat of a pixel is at risk, as you said 😉
Data Execution Prevention is obviously not a risk as they maintain, source code alone shows that – nothing custom, all basic stock Windows APIs, no in-line assembler, no side-loading of DLLs, no code-cave or memory injection or even any dynamic memory allocation! (all of which is detectable by any anti-virus).
Thanks for being so understanding though, sorry I couldn’t help more. The only way out is to have an in-house app, or disable snap-to, sorry.
Still, for a giggle, try the debug version mentioned up there somewhere ^^ it will work and may not get flagged, never know your luck ☺
This works fairly well, except when moving between two monitors of a different size (I have 4 – 20″, 23″, 2 x 24″). Then, the mouse still sticks in the top/bottom corners when moving between screens. This is probably just Microsoft’s poor design and nothing wrong with your program. It is annoying because when attempting to move to another screen to click on something, if the mouse gets stuck in the upper right of a monitor and you have a maximized window on that screen, when you click, you close that program.
I don’t know if this is something that could even be fixed outside of Microsoft doing it. The monitors are all aligned at the top edge in the control panel, so my expected behavior is for the mouse not to stick at the top corners, but if they are going to stick then do it at the bottom. I think some of this is left over due to the charms junk they put in.
It could be a charms legacy, I recall that used to drive me mad until I installed Classic Shell. But, please also check the alignments of your monitors. If you get the chance please run the debug version here: –
and updated here: –
and post here what numbers it is showing for monitor resolutions and offsets.
Even if a monitor alignment is out by a pixel Non-Stick Mouse may not fire, and with the Windows display they show the monitors are aligned even if they are not.
Also note if you are running Anniversary Windows 10 the Display Properties mentioned here https://www.jawfin.net/?page_id=143#comment-14914 showing screen offsets has been removed, we need a third-party app (or look in the registry of that second post) to get the coordinates.
Hope that helps!
Jonathan, can you please put this on github? That way we can all centrally keep track of issues and contribute to it 🙂 I want to contribute since I’m very glad this exists and I want to improve on it instead of rebuilding it myself. I don’t know a lick of Delphi but this will bug me enough to make me learn, that’s for sure.
Here you go: –
I’ve been a sole developer for so long I’m unacquainted with that aspect of github and such like sharing resources.
If you need me to do anything from github to make it work as you want it to please let me know.
No worries. But very cool, thanks for providing this! I may still give up on this if I don’t have time to go the OSS route. It would be helpful to document the issues that others have had here and put that into the github tracker so that you can just point people to that and to please issue a pull request if they’re interested in fixing it themselves 😀 Helps to outsource it a bit!
I say that because I could submit a dupe issue in a moment (with it skipping across the screen). When I get back on my Windows 10 machine I’ll have to make a quick screen recording GIF of it and post the issue there.
If you mean the silly little thing skips from screen to screen in the corner, like jumping left/right/left a dozen times a second, then yea! I know about that – and I just can’t kill it!! I tried upping the .sleep (such desperation, sleeping the main UI thread..!) and setting a bool to say it already fired, and putting a small time-out so it won’t fire again in say 500ms – and yet it still does it. I can only think Win10 is desperate to jam it into the corner for all eternity and just will not relent, it’s also providing false information of the cursor’s position. I have even tried moving it more than 9 pixels.
In the end, all my attempts made the mouse behaviour worse than it’s auto-wiggle, so I just relented and left the code unchanged!! Once the user moves it out of the gravity zone it’s all happy again.
Thanks for helping me out with this 🙂
FYI, I’m not getting notifications when you reply, so that’s why there’s such a giant delay. I only end up replying when I’m back on my Win10 computer and get frustrated by this again.
So, I see the quagmire….
I tried this myself as well using AutoHotkey, writing a solution entirely from scratch. Even if you hook into WM_MOUSEMOVE (which actually TELLS you precisely where the mouse SHOULD have gone PAST the “sticking” point). I detect when the hook indicates the intended movement past “sticking”, then I teleport the mouse to that position in a *separate* thread and even after a delay and yet it still insists on returning the mouse back after moving it just 1px by hand (actual mouse input).
Thanks a lot, Microsoft. Some features we don’t want, others we do — why can’t we choose? Anyway, I will continue to fight the fight on my own as well.
Yea, MS Win10 lies about mouse position and forces it back into the corner. I may yet go with a prediction solution (pun, solution, as in firing solution? anyway…) as mentioned here: –
In short: “I was actually thinking of tracking its movement by storing the last couple of positions, work out it’s acceleration, and postulate where it will be next, and check if that position is on a new screen, and if so, hop it there.”
In actual fact, that may well be a pretty clean solution as it will actually skip the corner before it gets there so MS won’t do it’s best to entrap it forever (which reminds me of a cool game I used to play, Moraff’s Entrap).
Alright, I think I’ve actually got a reasonable fix! See here on github, complete will full explanation and installation instructions:
This works a bit better for me. Let me know what you think too and if you’d like to contribute there. The code isn’t as elegant as Delphi but it’s pretty accessible to lots of folks plus a big community that backs it up (for now at least).
But yeah, I see what you mean about tracking last several positions. See my write up under “Methodology” where I go into some (but not 100%) of the detail regarding my solution. My only issues right now regard tweaking my delta coefficient coming from current hook mouse position minus the current mouse position and that that point you can calculate a sort of instantaneous acceleration (a la calculus, baby). The important key factor here, however, is in adjusting the “bump” (cross axis shift).
My WordPress won’t let me reply to your nested posts, so here will do!
That’s a pretty sweet app – works well. And due to MS it suffers a little from the issues I’m hitting, like doing that little toggle dance in the corner. I noted some of the teleports yours is doing are rather large, you could probably cap them with a maximum delta of 9 px or so. But for me and my 2 monitors its indistinguishable from my app, so congrats on a masterful job 🙂
I think I will now have to have a stab at my prescience approach, just to one-up you, haha!
Alright then 🙂 Mine is tweaked for my own use so since I’m going to be using it regularly as well I’ll be able to maintain it, I think (esp once I’m Win 10 full time).
p.s. Are you able to configure your WP installation to send emails to commentors when there’s a reply? Right now I’m just manually watching the thread (last comment for tonight, ‘er, morning). Been up all night dealing with this crap.
p.s. If you do happen to use any of my techniques or code, please be sure to provide credit! That would be appreciated. I’ll make sure I drop in some credit to your version since it inspired me to try writing my own.
lol, nesting issues again.
It should be doing that already though. The email will come from email@example.com – so check that’s whitelisted and not accumulating in a junk/spam folder.
If I do rewrite anything I can email you directly anyway, if you’re interested. One little thing I noted is while the mouse is dormant both our apps are drawing 0.02% CPU usage (on my PC here) but when the mouse is moving yours can jump up to 1%. I know you can’t help that as that is from AutoHotKey, is just more of an observation.
And credit, I certainly will 🙂 Given I pinch your code! I’ll have a nice close look at it when time allows too.
Alright, great! Since it’s on Github please feel free to submit anything you notice there.
p.s. I just checked my spam folder and I’ve got nothing. If it helps, I’m using Gmail by proxy of Google Apps on my catchyour.com domain.
I’ve been using your little tool for a long time now, but recently it stopped working and I get stuck in the corners again. I didn’t change anything manually on my computer when it happend, but it might have been related to a recent MS Update ofcourse. They’ve come quite a bunch for Win10 lately.
Mainly curious if anyone else have any problems or it’s just me and I should start to dig around and see what might be messing it on my side…
Hmm, that will be hard to solve. Sadly the last 3 Microsoft updates failed to install on my computer, although they did reset it about 30 times trying!! I ended up having to use their utility which hides updates. So I really can’t help with this as I can’t see it. What you can try is the debug version, not for the sake of debugging, just to see if it’s approach to the issue will resolve it for you. Get from: –
and see how it goes.
I really hope it does work. Failing that though, terminate nsm.exe with the Task Manager and try running it as Administrator (let me know if you’re not sure how to do that) as the elevated privileges may allow it to step up and work with the OS.
Thansk. I’ve downloaded the debug version and I’ll play around during the weekend, and remove/reactivate different things to see if I can find any conflict or reasoning behind why it happends. I’m not actually sure it is windows update, so I’ll just do some testing and see what I can come up with, and I’ll get back to you.
As for your problem, I had the exact same problem on my “old” machine and had to hide the updates aswell. Only thing that worked was a clean install of Windows 10. Guessing you might have an upgraded Win7 or something like I had, and there was some old “crap” messing the system up…
Ok, this was weird. I stopped the NSM that I had autostarting and switched to the debug version and it didn’t change anything that I could notice. Then I switched back to the old NSM and then it was a bit better. It didn’t work when Task Manager was active, but we knew that since before, but it also didn’t work while Chrome was active, which is a lot weirder. All other windows I tried was ok. But then I rebooted and now it works as before, only Task Manager (and simillar) blocks it, everything else seems fine, Chrome included.
As a coder myself, without being able to easily reproduce this, I’ll just shrug and say “shit happend” and be happy that it works again. It isn’t worth the time or effort to try to solve an issue that might very well be related to some temporary 3rd party thing.
Thanks for taking the time to look into it. It seems the universal panacea of the reboot fixed it!
An update on 2nd of December, 2016!
I decided to attempt that look-ahead routine I mentioned several times, which I now humorously call “stochastic ability”. It works very well for it, so much so I could take out the sleep() and make the hop only 7 pixels instead of 10. I couldn’t extend the timer to a bigger delay, it still needs the high reaction rate.
What it does is it checks to see where the mouse will be next frame based on it’s current course, if it will cross a monitor next frame, NSM will hop it across immediately, based on the same speed it took getting to the monitor’s edge.
But here’s the funny thing, corner-wise Windows will still think you are trying to sneak through a corner and not be jammed forever (such naughtiness), so, the stochastic move will still jam it in the corner, but the next time NSM fires (1 millisecond later) it sees the mouse is jammed and uses the range hop to free it onto the next monitor. That means, you don’t even see the jam at all (unlike how it currently was) so it’s very smooth. The decreased hop range also makes for smoother movements, and as Windows accepts its a legitimate monitor cross it should no longer do that little jiggle in the corners when at a lower speed.
And here’s the thing, it was only 1 line of code to implement! Being the last line in the CheckForMove() function: –
I tidied up the code a tad more, some speed optimizations (i.e. less math checks), and removed all sleep() calls making it a lot more thread happy and responsive.
I LOVE THIS PROGRAM THANK YOU SO MUCH
This is absolutely brilliant and is helping save my sanity. I’m not a Microsoft hater – I think Windows, for all its faults (and in spite of Windows millenium and Windows 8 ughhh) is pretty amazing, really. And I can understand that someone thought it would be useful to have the cursor stick at the corners – I’m not really sure why, but someone obviously wanted it and was happy that it worked like they wanted. What I want to know is how they could possibly think that EVERYONE would want it. Who did they try it out on? They should have asked me, I would have been happy to set them straight. Idiots.
lol@ME reference 😛
It is surprising that it has not been addressed though. Still, means I get to write little apps which does in 100 lines (though I could logic optimise down to about 30, unreadable code though) what MS hasn’t achieved in a year-and-a-half!!
Hey, just installed Windows 10 and am aghast at this problem. I was really excited to come across your program, but when I installed it it doesn’t seem to have an effect. I tried running the debugging software you provided but I’m not quite sure for what I’m supposed to be looking. Could you provide any insight? thanks!
Sorry about the delay in reply – I was out of my office all day!
The first thing we’re looking for is the screen alignment. So if your monitors are side by side we’re looking at the top having the same number (most likely zero) – even if it’s out by one pixel Win10 misbehaves to such an extent that even my app can’t compensate.
Have a look here about this process: –
If it’s still playing up please try taking a screenshot of the Debug version and posting it on http://imgur.com or some such site and put the link to it here – hopefully I can work it out from that!
I read about your non-stick mouse application in the Microsoft forum thread dedicated to the unwanted sticky mouse problem ( https://answers.microsoft.com/en-us/windows/forum/windows_10-start/windows-10-mouse-cursor-sticks-to-edge-between/d7480fb3-1d4b-4c3b-9f49-92a75ac45047 ). I posted my issue to the thread in Oct 2016.
I am seeing the problem that the original poster in the Microsoft thread is having, where the entire screen edge between the monitors is sticky (not corners, somebody diverted the thread to talk about sticky corners and that was not the intent of the thread).
I just tried your app on two PCs that have the issue. One of them has 4 monitors in landscape arranged 2×2. The other has two monitors in landscape that are top and bottom, and a 3rd monitor that is in portrait mode to the left of those two.
FYI, the app had no impact on the problem I see.
On both computers moving left and right between monitors is not an issue at all.
But when I move vertically between monitors (bottom monitor to top monitor, or vice-versa) the mouse sticks anywhere along the edge between those monitors. The only way to move to the other monitor is to move the mouse rapidly (there is no stick with rapid mouse movement). It’s extremely annoying to have to always remember to move the mouse rapidly when moving vertically between monitors or else it won’t go past the source screen edge to the destination screen. There is no sticky corners issue, it is screen edge to screen edge.
Both PCs are Windows 10 Pro version, always kept up to date, both with video drivers kept up to date (although I doubt seriously video drivers have anything to do with this issue). It seems as if Microsoft gave thought to multiple monitors arranged horizontally, but not a lot to arranging them vertically.
Anyway, just thought I’d let you know. If you do another update I’d like to test it out. If you don’t, no big deal and thank you for the effort you have put into this problem in the past.
Also, I thought you might want to know about a problem with this page. When I started entering this comment, the submit button in the lower right corner said that I needed to reload the page before submitting a comment. I didn’t notice that until the entire comment was entered, and have no idea why it said that in the first place. It definitely wouldn’t allow the comment submission without reloading the page. Anyway, it’s lucky I copied the comment before reloading, as the page refreshed with the form blank. Then came another irritation — the button counted down for something like 20 seconds before allowing me to click “Post Comment”.
Thanks for pointing that out – it’s the spam-guard stuff in WordPress. I’ll do some research and see if I can train the behaviour to be kinder!
With respect to your monitors, it’s possible they may be out of alignment by a pixel. You can’t see this as they will look aligned on the display manager – you can only see this from the registry. I went into some detail about this here: –
To see if this is the case for you, try the debug version of my app which shows all the monitors dimensions and offsets: –
If nothing obvious is jumping out at you (eg. an odd number would definitely be out-of-place, all resolutions are even numbers) then if you like post a screenshot of what the debugger is showing you. Images can be hosted on http://imgur.com or whatever you like 🙂
And we may see if its something I need to fix in the app or not.
This program works exactly as intended! I am having one issue though. My current configuration is a dual-monitor set-up with a portrait monitor on the left and a landscape one on the right. Whenever I have World of Warcraft up on the right, and I click the left 1/4th or so of the window, the mouse snaps to the other monitor. If I change the game from fullscreen windowed to fullscreen, it still happens but only goes as far as the edge of the monitor. If I close the NSM process, the problem immediately stops. Any ideas?
It could be WoW is changing the resolution. At least, when it goes Full Screen that’s highly possible. It may also be a DPI scaling issue – locate the NonStickMouse.exe and change its Compatibility turning off the DPI scaling (let us know if you’re not sure how to do this) : –
See if that’s any help!
I do not understand why microsoft can’t handle highdpi correctly… for example I have 3 monitors, I have a 55 inch that is 3840×2160, to the left, a 27 inch that is orientated verticle at 2k, and then another 4k 28″ that’s verticle. The 2 28 inch monitors are the same size but different resolution, yet there is absolutely no way to have the display align between them, if they considered not just the resolution, but the size of the monitor along with the preferred DPI then you could make it so you could align everything even across different sizes and resolutions… but they won’t ever do that, it’d only please the .001 percent of users who could benefit
Ps, what’s with the ‘please reload this page to post a comment’ ?
If they got it right the mouse wouldn’t get stuck in the corners in the first place!
I don’t see a “please reload page” for my test posts, I do see a “Please wait 30 seconds” – it could be the same thing. I’ll look up the wordpress settings for comment posting.
Aha, found it. The spam filter requires the visitor posts within 10 minutes of arriving on the page (I just cannot see how that’s going to prevent spam anyway) – and considering all the thoughtful comments by other readers 10 minutes hardly cuts it!! I’ve disabled that timeout thingy.
You rock and your program does too!!!
I love this program! I am so grateful to you for making this!!! 🙂
I do have one little issue that I would like to point out, when ever I run Steam your software seems to be overridden by it and I can no longer transition between monitors easily and it’s like your program has stopped do it’s job. As soon as I exit Steam the program seems to work fine transitioning between monitors again. Is there any easy fix for this?
Thank you for your time and attention 😉
I would suspect you’re running Steam as administrator which means my app cannot see the current mouse’s position (note the last sentence in my blurb above). The reason being if an app could see/control an app which has a higher privilege it could simply re-launch itself as administrator then click Yes on it’s own UAC and terminate the limited instance. To resolve this for NSM run it as administrator too!
If this isn’t the case though (Steam running as admin) please let me know.
Your a freakin genius man!
I elevated the privileges for NSM and sure enough it fixed the issue. Thank you so much for your help!
It’s good/smart people like you that make this world go round, esp since Micro$oft doesn’t give two hoots and doesn’t listen to their customers. Why the HECK would they make a transition from one display to another such a chore? To top it off the old reg hack that used to make transitions work properly is broken! C’mon, stupid Micro$oft! lol. I’m just glad that you are awesome enough to make this sweet program to truly fix the issue!
Thanks again good sir, keep up the great work!!! 🙂
It is surprise, I’ll be honest. What was supposed to be a quick hack which was carry us over for a month or two has now been running for years..! Anyhoo, there it is!! I’m glad it’s now working for you 🙂
I just wanted to say thank you, the sticky cursor has been one of the most frustrating experiences in Windows.
How do I give you money? You have saved my $4000 laptop from being thrown through the closest window.
Hi Jared, thanks for the very generous offer 🙂
If I may, I’ll just copy/paste my answer from a previous commenter who asked that: –
Thanks so much for your generous thought but I will not profit from Microsoft’s mistakes. This isn’t me being over-righteous, I treat my business customers the same – I’ll even go on site and not charge to fix Microsoft issues with their network. Microsoft provides the platform for my business to run, so I feel that obligation towards them.
But, if you are really determined, you can buy my Pro version of Solitaire 3D for Android from here: –
That way you can give it 5 stars too, hehe.
I’m glad it’s working for you and it saved a nice laptop 🙂
Where is the donate button? The amount of frustration & time you have saved me with this application needs to be rewarded.
As I’ve now have been asked this a few times I’ll work something out and set a button / link up. Cheers 🙂
Alrighty! Donate button is now in the main text above. Hope it works, haha.
Cheers and thanks 🙂
Thank you for helping people. Do you happen to know why it still sticks if you move the mouse diagonally up and to the right when transitioning between from your left monitor to the right one? (when you have a window maximized on both windows) I believe I am running this program but am unsure because it still sticks in this scenario.
It could be the monitors are not perfectly aligned as detailed in this comment: –
Or that the top-most window is running at a higher level of admin so NSM cannot read or intercept the mouse cursor position.
Or indeed, I may have a bug! I’ll see if I can replicate your description and duplicate that behaviour!
Wonderful app, but I think M$ broke it again in the latest update. I just moved to build 15063.138 and it stopped working.
I thought it had to do with the DPI setting thing in the software compatibility settings, I remember having to set those to disable display scaling on high DPI, but then I might have just been paranoid. In any event fiddling with the new indecipherable DPI compatibility settings until my breath stops hasn’t fixed it.
On a side not I saw in several locations in this thread where screen alignment was a consideration. Now this doesn’t make a huge deal of sense to me because it was working great before the update and my screens have never been aligned (pic related). Any thoughts on that?
Bah, in that case I may not be able to help 🙁
I haven’t been able to install updates for a while, not the major ones. They keep crashing over and over again, resetting my computer a dozen times a day. I’ve had to use that tool to disable them so I can just work. I’ve tried to get this resolved but you can imagine how effective that is.
Maybe the debug version may be able to help, at least if I have real figures from that (screen resolutions and offsets) I may be able to follow through – but if it’s an update what killed it I don’t hold out great expectations.
I really should put that link in my original post!
Okay, thank you for the debugger, it was very helpful and it allowed me determine the source of the problem.
I was right about the DPI scaling, the debugger and an hour of fiddling proves it. To make the debugger work you need to set the compatibility option to “Override high DPI scaling behavior: Scaling preformed by: Application”.
I know that disabling DPI scaling is necessary to make it work, but that isn’t the only factor because after disabling the scaling on my monitors (not just compatibility options) the regular application still doesn’t work when moving across corners, but it does for aligned monitors. The debug program actually does work across corners.
Well, at least now I have a use for Windows 10’s task view feature. I have put a vdesk script in my startup folder to launch the debug version at boot and put it in a different desktop, that way it’s off my taskbar.
Haha nice one!
I do employ a slightly different method in the mouse hop in the debugger than I do in NonStickMouse.
I want to free up a day where I can play with all of this and make it more compatible. As I only wrote this originally for myself, and I have 2 basic 17″ monitors at the same resolution, I could afford to make it rather dumb. I had also hoped MS would have noticed this glaring bug by now and change that 1 or 2 lines of code to fix it. It seems the ball is still in my court so I’ll pick up my game a bit and broaden its functionality.
I figured I’d have a look around to see what I’m up against. This post reveals MS has completely changed its approach to DPI: –
So now I will have to try to get the updates to install (they all crash for me), which means ages of mucking around with the file and system (and registry) security settings, as that’s always the issue. That, and I also had to move my PF folder to another drive as I have a small SSD boot disk (I used virtual directory links to compensate). So, if I can get these updates to install I can have a crack at it, otherwise I’m sidelined :/
Thanks for making this wonderful tool, it really makes using multiple monitors in 10 enjoyable again. Unfortunately, I still have the World of Warcraft problem Jeff J reported a while back:
While playing World of Warcraft (DirectX 9/11, fullscreen, windowed, windowed fullscreen doesn’t matter), I get weird glitched cursor movements while near the edge of the screen where my other monitor is. I left-click somewhere in the game world, which usually makes the cursor disappear and the mouse controls the camera directly. As soon as I release the click (even without moving), the cursor is on my other screen. I can only imagine that WoW, in order to hide the cursor, moves it somewhere where it’s unfortunately triggering NonStickMouse’s cursor offset.
I actually made a video of this in action, so you can see what I’m talking about: https://u.nya.is/bysctc.mp4
I wanted to try the Disable display scaling on high DPI settings you posted last time, but this button isn’t there in my current windows 10 version (Pro, 1703, Build 15063.0). Instead there is “Disable full-screen optimisations” and “Override high DPI scaling behaviour. Scaling performed by: Application/System/System(enhanced)”. No combination of these seems to solve the problem, though.
Is there some way you could maybe fix this? It’s so annoying while gaming that I almost have to disable the tool, as I am constantly misclicking stuff on my other screen and losing control over my game :/
That looks super frustrating!
I’m just writing here first to state message received!! Its near 2am for me so I am about to slide off to bed. I did just want to say that I managed to install my windows updates (only because as I posted above I needed these for the new DPI stuff [and it’s not really DPI – they just change the font size and border thickness, its not a greater density of pixels per resolution]). Back on point that means I can look at this once again.
I did have a go already, this is with the Creator Update (version 1703 as you have) – and couldn’t fault NonStickMouse for what I was looking for (scale & diagonal monitors).
You are right with your assumption with the mouse. Most games will lock it to the center of the primary monitor and when it’s moved they snap it back. This is my theory: the mouse is forced to the center of the screen for WoW, and when you click off it goes to where the WoW cursor (lets call it a virtual mouse) runs off the WoW form back onto the real mouse. This means, NonStickMouse sees in 2 frames the mouse move something like 500+ pixels between 2 grabs, and it calculates (at that rate) the next position will be on the next monitor, and hop it there for you – i.e. jumping it another 500+ in that direction.
My brain’s running on empty at the moment, but I have a couple ideas – either I disable my “stochastic ability” and wait for it to jam before hopping it, or cap the speed it could move in that math – like if the delta movement is over 50 pixels or so, don’t predict its next location. Combined with that don’t predict unless it’s within 50 pixels of the next monitor – given my assumption is right. I’ll have a fresh look at it when I can.
But, if you are losing focus without leaving the WoW window (like NonStickMouse is moving it away) then I could be wrong. Here’s a quick and dirty solution though – if you don’t mind you can run WoW as administrator, which will disable NSM from “seeing” the cursor. I could also hard-code ignoring NSM if a certain window / application is top-most. Currently though I am not doing any window / handle / application interrogation – that kind of activity could look suspicious to Machiavellian virus scanners.
Ok, to test my theories I’ve put a couple of switches in my debug version: –
Terminate NonStickMouse.exe when running this as this also does the hops and we don’t want NSM interfering!
Now play with the switches and settings related to Look ahead and limited.
I would hope by disabling the lookahead, or at least restricting it, it will stop interfering with WoW. If this proves to be the case I’ll put these switches into NonStickMouse.exe [somehow] – probably with command-line parameters.
Edit: If that’s not working I’ll progress with the more interactive solution of disabling NSM when designated windows / applications are top-most.
Thanks for your quick reply Jonathan! I have tested the NSMDebug version you posted:
Exactly as you said, the jumping in WoW only occurs if the lookahead is active. If I have it active and restrict it enough, the problem also does not occur. On my 1080p dual monitor setup with WoW on one monitor only I can go as high as a ~400 pixel limit and never notice any jumping. Only if I overlap a windowed WoW over the edge of my two monitors I can find some points where a jump occurs that is less than this value. You can probably always find some points where it can still occur, regardless of how low you set the limit (found til 10), but these are not the usual use cases. For my usual use case, 400 would already be fine. If you offer this as a switch in the regular program, this would be great 🙂
On a sidenote, may I ask where the lookahead is actually used? I did not notice any missing functionality while having it off.
There’s no way a user could make the mouse move more than 400px in the time of 1 millisecond, so there’s no downside to capping it – I won’t need to put a switch in, I’ll just fix that code.
You highly probably have decent machine so the lag caused by not having it on won’t be noticed – but without the hop won’t fire until it is actually jammed in a corner. If you run a benchmark app, or something to use up your PC grunt then try with the switch off you may see it stick in a corner before it hops. I am using idle CPU power to check the mouse position (polled, not event-driven) – so take that idle away you’ll see it – even still, it is quite minimal.
I’ve changed the code to cap it to 30, it seems rather well behaved. I did have to fix a bug, which, possibly, could expose it’s bad behaviour more, but the cap should protect it from that. Source code updated: –
Get the latest version from the download links in the original post https://www.jawfin.net/nsm
With the new version, the WoW bug seems to be fixed. Thank you very much. 🙂
As it’s set to 30 you’ll still be able to force bug it, by I suspect moving the psuedo-fullscreen-windowed DirectX window to 30 pixels from the edge of the next monitor – but as you already know not to do that we should be good 🙂
Having troubles with startup when the computer is turned on, the program shows in the processes but the mouse still sticks in the corners until I open the program manually. When I do that then it shows 2 processes of non stick mouse, is there a way to fix this startup so that it works without having to manually open the software again?
I used the installer, not the click and open one.
Using Windows 10 build 15063 BTW
I cannot replicate that – it works for me. But one thing I noticed is Windows processes the Start Up folder last in it’s booting sequence, which means it can take over a minute for the application to run and register.
Another solution would be to remove the shortcut in the Start Up folder, and add it as a job in the task scheduler. Here’s a how-to on that: –
The one advantage of using this method means you can set applications to run at administrator level without needing to click the User Access Control permission dialog. Perhaps not relevant in this case but well worth remembering! Note though, NSM will not work if the app which is topmost has a higher level of privilege – for instance it won’t fire when the Task Manager itself is running!!
Ill try task scheduler and report back
Thanks that seems to work for now.
It works on Windows 10 1703.15063.296… Thanks!
Would you know why the registry key additions for MouseMonitorEscapeSpeed on EdgeUi did not work?
I could only guess that Microsoft no longer consult the registry for those values in Windows 10+ like it did in Windows 8. Apparently they feel only they have the right to corral mice!
Its also possible that set values may not have been compatible with their new DPI approach – but – one only needs to multiple the value by the factor the DPI is set by to scale it (which admittedly can be different per monitor, but that is still easy to account for).
Why Kaspersky says your program is a potential virus and an adware and deletes it from my computer?
I cannot speak for Kaspersky, but the term Draconian springs to mind.
You can see the source code, both here and on github, and you could submit it as a false positive.
For my own curiosity I ran it on virustotal here: –
Note Kaspersky clears it, but curiously a product called Rising flagged it. I hadn’t heard of that one, but it’s a Chinese antivirus which stopped supporting English language customers 4 years ago: –
So then I went completely experimental to see if I could compile my code on-line. It seems I couldn’t, but, Lazarus is a free compiler which converts Delphi code, so I got that from here: –
Downloaded it, loaded my code, compiled and ran it no worries!! It works well. To feel secure you can follow that process – obviously checking every line of my [well documented] code to ensure there’s nothing sneaky in there.
I do forcefully state though, only run applications on your computer of which you feel perfectly safe.
Unfortunately your awesome program seems to have stopped working for me after the Windows Creators update (version 1703). Any way to get it working again? I have already made sure to give the highest privileges in the security tabs ect, and run as admin just to be sure, plus not allowing any other program to run on startup that could interfere with it like I had when running steam previously. Any ideas good sir?
I’m running Creator, have done since it came out – so it shouldn’t be that specifically.
Try running the debug version, because it shows feedback of when hops actually fire. It’s at: –
It’ll also show if the monitors aren’t aligned perfectly. If you’re not sure you can post a screenshot of it running and I’ll check the numbers – but it’s usually obvious, in that the Y offset will be zero for screens side-by-side.
Otherwise, you’ve already tried any other suggestions I would have thought of!!
Oh man I’m sorry, I just realized that it’s something else, but I still can’t figure out what it is… the mouse will go to the edge of the screen and if I continue pushing the cursor over it will eventually show up on the other monitor… like it has extra distance to cover! So strange!
All the monitors are right up against each other via the windows or nvidia monitor layout screens (which they have to be anyways as I have never seen the ability to space out monitors further apart and they “snap” back together and touch no matter how you place them anyways).
Am I missing something here? This never happened before, I’m using the latest nvidia drivers too…
There is one more thing, I know for a fact that when I put the two monitors corner to corner (the way I REALLY want them to work on the layout) non-stick mouse used to let me transition between the two corners no problem, that FOR SURE doesn’t work anymore though 🙁 Maybe it’s related to this strange issue I’m currently having? <-I'm more concerned about this problem actually, any ideas here?
I’m still going with the debug version solution for the exact numbers. I’ve found just because they line up by eye, doesn’t mean it’s pixel perfect – and NSM requires that so it doesn’t unduly mess with the mouse when it’s not needed.
I wrote a bit about that phenomena here, if you want a boring read!
It’s hard to look further until we’re sure the offsets are spot on.
Ok, I have kinda figured out whats going on.
First off your program WORKS just like you said, and one thing I had setup and didn’t realize is my second monitor had resizing enabled on it as it doesn’t display properly without that feature, but it now explains why it appeared to have a dead spot/extra distance when transitioning the mouse pointer over to that monitor. Sorry about this, that’s my bad!
From what I can see the only real spot that seems to actually work for me when doing an absolute corner-to-corner configuration is when positioning the 2nd monitor to the very top left corner of my main monitor. I have tried positioning the 2nd monitor on the top right corner, the bottom right corner and the bottom left corner in relation to the main monitor position. The ONLY spot that allows flawless transition is the top left corner. All other spots/sides around the main monitor also work just fine, just not the three mentioned corners.
I thought I had a theory as that maybe it had to do with the taskbar and the start button being at the bottom left as well as the “show desktop” being at the bottom right or just the taskbar as a whole causing the issues around the corner areas, but alas it didn’t matter as moving the taskbak anywhere else gave the exact same results, and the top left corner is still my only option for that perfect transition. This is great at least I have an option now, but sadly I cannot choose any other corner as they are for some reason blocked when doing this kind of corner-to-corner monitor placement.
Any ideas on those three mentioned corners? I did a short read on the previous link and tried out the debug version but I wasn’t able to get anywhere with that at this time.
It shouldn’t matter which corner as the code is the same. I can test that here though with my monitors – there could be a bug. I was also thinking the Show Desktop button too until you said you checked for that – so still stumped! If I find anything I’ll post back.
I had a play, setting my monitors corner to corner in every configuration I could – but NSM didn’t break – it kept firing exactly as it was supposed to do. Which means I’m no closer to solving why it’s not behaving for you, sorry 🙁
Damn, thank you so much for looking into it for me 😉 Whats good is now I can look at other possible reasons why only one corner is working. I will report back with my findings if there is any.
On a scale from 1 to frigging amazing: Your a super hero! Thanks for doing what microsoft can’t be bothered to do. 😀
Honestly I wish they would. No company worth its salt should have its credibility damaged for such a little thing.
It’s too late. Even if they fixed it today, there is nothing they can do that will fix the black stain that they have soaked for almost two years into their own reputation.
I have some sort of problem where when certain windows such as my web browser are in focus NSM stops working. I’ll see if I can’t put together a list of affected programs and leave it here before the end of the day.
It sounds most likely those apps are running as administrator, or at least at a higher level of privilege. For them NSM cannot “see” the mouse when those apps are top-most.
Yeah, that was the problem. Not admin applications did it, so it took me a few days to encounter one again. When I did I restarted nsm to make sure that just resetting the application didn’t fix it, then ran nsm as admin. That fixed it. I’ve seen your code, I don’t think it’s gonna hurt my computer to run it as admin.
*not all admin applications
There’s no edit button. 🙁
First, thanks for the tiny prog that eliminates the tiny Hell from Micro. Second, I have this small issue where NSM randomly ‘crashes’. I have a shortcut in Startup. Any given time after first run from boot, the program disappears from the process list. Completely random. Sometimes when I have been on for a few hours playing GTAV, in ‘sleep mode’ which is just monitor off after a minute idle and CPU down to 10% (i7 4790K), or even a minute after boot with no power saving options whatsoever. However, after I re-run the program after initial ‘crash’, it stays running without ‘crashing’. Is there anything at all you can think of as to why this would be happening? Windows 10 Home 1511 build 10586.104
If not, it’s ok. I can still just re-run it. Just a small bother when it does it because I don’t know when that is until I try to move to my 2nd monitor and fffffuuuuuu- I find out it’s not running anymore. LOL. Thank you.
Hah, no but I can’t. I could only imagine it’s some third-party power saver knocking out apps which are running but apparently haven’t been used by you in say an hour. NSM isn’t a service, it’s actually a console application without an interface, so it may appear to be unused.
I wouldn’t think its a virus scanner hitting it as they like to boast about how they’ve interfered – like a cat bringing a dead [or living] mouse back to it’s master!
NSM doesn’t self-terminate for any reason, it just spins on the spot until shut down.
It’s easy to tell what applications launch other apps with utilities like Process Hacker, but to see what kills another application you can only guess.
Ah, alrighty. I don’t use anti-virus so I can’t say it’s one of those things. Not sure about any third-party power saver thingy, I don’t remember ever installing anything in that category. I have an MSI Gaming z97 mobo, that utilizes it’s high performance potential. I don’t use MSI’s power saver app thingy (not installed). I’m clueless to this as much as you are, and this is happening on MY PC. Nevertheless, I do appreciate you replying to my question, as well as others’ questions in here! Maybe you should work for MS for a day or two just to fix that line or 2 of code, LOL. Thanks, man!
New version released, and the source code is much smaller, and a bit smarter.
I realized a lot of code wasn’t required now and at times interfered.
It should run with less CPU overhead, not that there was much in the first place!
It’s being picked up as a Trojan by BullGuard Antivirus.
I also ran it by virustotal and a couple of scanners flagged it as a generic trojan.
My only reply is exactly what I put here:-
I don’t think there’s anything I could further reply than what I researched there. I hope it helps!
Rewrote when I noticed a nested procedure was only being called once, so just moved it into the body of the code – cuts down on CPU and run-time stack and local variables.
Also getting annoyed at stupid virus scanners flagging this, the only invasive (if it could be called that) activity is to move the mouse, not even clicking it! As it still flags I may rewrite by removing the Delphi units (which do have significant overheads) and just directly load the APIs I need.
Haha how it hates me, sigh >.<
(Ironically I run MWB professional on my PC, and it doesn’t care, go figure!)
If it gets very annoying I may just rewrite the whole stupid thing in raw assembly code using this excellent tutorial by Steve Gibson: –
Having nothing better to do on a Sunday I rewrote it without the greedy Delphi units: Forms and Controls.
The file size dropped from 792 KB to 31 KB!
Ironically, the virus detector count went from 11 to 13…..
I suppose the more cute I make it the more it flags as dangerous. There’s only like 50 lines of code now, and even a non-programmer could see it doesn’t do anything malicious. I’m still curious how it would behave if I wrote it exclusively with Windows APIs only directly importing the procedures from the DLLs. But as that would take many hours to source and import every call its just not worth it.
Another update when it occurred to me newer code may have killed the working behavior for diagonal-only monitors. Logically it should not have, but again logically Microsoft should have fixed this years ago. Anyway, I had to work in the older (more expansive) code to get it working – I just put it in the newer approach for small file-size.
As expected TotalVirus hates it – how dare any application move the mouse and undo all the fine work by Microsoft of jamming it relentlessly in the corner. I feel so guilty. Anyhoo, scan results: –
I also did a couple of fixes to the debug version to keep it up-to-date.
I’m just posting again to state that Windows Defender now picked it up as malicious. I can only assume there’s some new nasty malware out there which must share similar code patterns to what I’ve had here for years. Anyway, just throwing it out there. Still thinking of re-doing it yet again with direct API…
Thx for all your work! And yeah, I dont know why Windows detect it like a virus
I could have a guess. Its been flagged (as I can best tell) as a Trojan injector. A Trojan injector doesn’t have a payload in itself (it doesn’t do anything naughty) but is an application which downloads and installs the actual malware. So all an injector needs is to access the Internet, save to the Hard Drive, and run other applications – ironically NSM does none of those things. Some Virus scanners take the approach if its not sure then flag it, being on the safe side.
Asking an anti-virus company to white-list this application would be just as useless as asking Microsoft to fix their bug in the first place!!!
My F-Secure says it’s a virus.
Hey mate, thanks for writing. I can only refer you to my last 9 posts above this one, and also specifically this one: –
I’ve been trying you app for a few days now.
The “NonStickMouse.exe” doesn’t work on my win 10 (admin privileges) BUT the “NSMDebug.exe” does. The only problem is that I can’t close it to tray or hide it. Do you know what could it be the problem with the normal exe?
Thanks for your work. Really appreciate it.
Hi Gygun. Could you try running the very latest version as there were a couple of tweaks I put in which may make the difference? I only think that as my latest version is using the exact same code as the debug one (they were different for a while as I didn’t bother to update the debug with some enhancements I was trying). More precisely I reverted NSM back to the code the debug version uses as my improvements weren’t perfect.
If that doesn’t help then what I can do for you is make it so the debug one can run invisibly. That way you can use it instead of the actual NSM app. Nothing like doing a cheap hack to a cheap hack to fix a dumb MS bug 😛
Another new version. Quite a bit of code smartening. Fixed a bug in corner detection.
Changed master loop to use a lot less CPU, up to 10 times less usage I estimate.
Still getting hated on by virus scanners…
I am now suspecting this is general attitude towards any non-window application. I can write this as a service (I think, I mean, I can write services no worries, but they tend to not interface with the UI and can even run as another user – which is why services need helpers) OR as a normal windowed application which immediately hides the window handles so it’s still behind-the-scenes.
Another point now. I’ve updated the Debug version. Runs the same code, but more importantly is that it now has a Hide button which hides all it’s User Interface, rendering it invisible. I also extended this functionality so that if the word ”hide” appears in the command line that executes it, it will automatically press that Hide button. This can be done by putting the word ”hide” as a parameter in the properties of the short-cut that executes it. Or even better, just rename the .exe itself to something like NSMDebug_hide.exe and it’ll take that. Once hidden it cannot be ”unhidden”.
Ironically no virus scanner is picking this lumbering mass of an application as a virus, even though it has duplicate code in the guts of it, in that it completely contains all of NonStickMouse source code, fully encapsulated, and yet not a blip. Stupid anti-virus scanners..
Download for this is at: –
https://www.jawfin.net/download/NSMDebug.exe as shown in the original post.
Thanks for the reply and the quick fix man! wow!
Unfortunately, neither the new exe or the new debug fixed my problem. In fact, the new debug doesn’t work at all, and the old one does. Is there any way I can provide you a debug log?
Thanks for your help.
Not a log per se, but you can take a screenshot of it and upload to imgur and post a link here, I may be able to see what it’s not happy about!
This works: https://puu.sh/wKP8P/cb3e009c14.png
This doesn’t: https://puu.sh/wKP7R/40fcb96e89.png
I’ve gone out for dinner so can’t resolve this yet! But those screenies seem fine, layout wise, so I’ll extend the apps functionality and see how that goes.
Alrighty, back in the room!
I’ve done that tweak for the Debug version, so download to get the latest.
There’s a new edit box on it called Apply Range. Have a fiddle with it, see if you can find the sweet spot.
For a clue, 0 will never fire (as it never looks over the fence), 1 will probably just sit there and jump between the 2 screens endlessly, and very fast! 2 is minimum. Anything over 10 will start to get a bit messy!
Here’s what it does: it casts about that many pixels seeing if there is another monitor to hop on to, and moves if it does so. It’ll move it to the position it checks, so if you set it to say 20, it’ll shoot it 20 pixels into the new screen from the corner – rather disconcerting!
Note you’ll have to disable the Lookahead switch below it so it’s only using the range process to check for hops.
I’m pretty confident this will fix it for you, and I would guess 8 pixels to be about right. See how that goes for you. Meanwhile I’ll put these code changes back into NonStickMouse itself.
I found the problem!
First, I finally understand what the program does, thanks! Yeah, 8 pixels jump works like 99% of the time. That’s the sweet spot for me. The old debug exe was doing that by default, like a jump of 10.
Now, what annoys me the most is that in the TOP side between monitors there is still a invisible wall that didn’t let me move, no matter what. The new debug still doesn’t work there!
After testing the old one, I noticed that in that specific spot, it was jumping not only horizontally but also vertically.
This is the new debug: https://puu.sh/wL1xP/a1eb713110.mp4
And this is the old client: https://puu.sh/wL1ze/2e9cbc7f7d.mp4
For some reason the mouse disappears when I move it at Y = 0 so I cant’t record it, but let me draw it:
X8 Y9 coords from left to right https://puu.sh/wL2np/b53f9a5ec0.png
X-9 Y9 coords from right to left https://puu.sh/wL2qk/08b4b880e1.png
That’s why the old one works, It jumped the red dot moving my mouse a few pixels down.
Maybe you can add a custom box for the Y axis but that only works at the top (and bot, yes), but not in the middle, that would be awesome =)
I really don’t understand what Microsoft was trying to do here, maybe helping people with low mouse control focus in one screen? It’s really annoying tbh…
I asked a friend and he has the same problem in the top or bot most side between the screens. Can you reproduce the error I’m showing you?