297

I'm encountering a strange problem on my W10 computer, for a few days my arrow keys have been "driving" my mouse pointer. Pressing the left arrow key will move the pointer a few pixels left, etc.

The first thing that came to my mind was "Oh well, I must have enabled Mouse Keys inadvertently". But Mouse Keys use the numpad and even then, it's not enabled. Rebooting doesn't help, but I've noticed it doesn't happen if the current window is ran as another user (Administrator) or if it's the Task Manager, which suggests the event filter that's catching the key press events is only active on my UID.

I've tried killing various processes but I'm running out of ideas. Could someone suggest some fix for this strange behaviour?

zdimension
  • 10,913
  • 4
  • 17
  • 30

1 Answers1

714

Tried killing all running processes on my PC till the problem went away and I can now say for sure the culprit was...

Microsoft Paint

(classic Win32 one)

Apparently it's got a feature that allows moving the mouse pointer using arrow keys, and for some reason sometimes it doesn't stop listening when the window loses focus, so Paint was running in the background since I often use it and it was still doing its job of moving the mouse.

This also explains why the problem can persist after a reboot: when you reboot Windows while Paint is running, Windows will automatically "save your work" and reopen Paint at system boot, causing the bug again!

zdimension
  • 10,913
  • 4
  • 17
  • 30
  • 10
    Please mark your answer as best answer. Good job finding the culprit. – DrZoo Aug 04 '19 at 09:02
  • 1
    I'll do after two days, the button is not enabled yet – zdimension Aug 04 '19 at 11:21
  • 2
    Thank you so much, I've searched for this quite a while. Never did i expect paint to be the culprit. (I Replaced mspaint.exe with a mspaint from a windows10 1806 version and it doesn't do this behavior anymore.) According to: https://winaero.com/blog/microsoft-is-updating-paint-with-new-accessibility-features/ Its a new feature in 1903 – Kage Aug 30 '19 at 12:42
  • 69
    I'm glad this website exists! I didn't think I'd find the answer this quick. – Hamid Heydarian Sep 03 '19 at 22:11
  • 17
    Thank you soooooo much, that answers the question why mouse cursor only moves on some strange small square. And seems it occurs only when you have several MSPaint running and wake up your laptop from sleep several times. – Leo Li Sep 09 '19 at 03:14
  • 7
    (In my case) I guess Paint was open before my crash. After the crash, when windows recovered what it could of my session, this was suddenly happening. Closing Paint worked for me too. Thanks! – Regular Jo Sep 13 '19 at 16:15
  • 3
    I thought I was going insane. Thank you. – Warren P Nov 08 '19 at 15:49
  • 2
    It was paint after all .... – Jelly Nov 11 '19 at 02:24
  • probably it can have something to do with remote desktop – or hor Nov 18 '19 at 05:39
  • 1
    Thank you. Just happened to me today and I was freaked out. I closed paint and it stopped. – LeviathanTheEsper Jan 10 '20 at 22:19
  • 3
    Yup! Just had the same issue, amazing you found out, thanks for sharing! – Celius Stingher Feb 15 '20 at 21:59
  • 2
    Man! This was it :) – mlvljr Feb 17 '20 at 11:08
  • 1
    holy f#$!, nice looking out! Never would've guessed it was this one! – icy Feb 27 '20 at 21:18
  • 2
    Normally when I stumble across similar issues to what I'm having on these kinds of things, the weirdly specific solutions never worked. This is the weirdest solution I've come across and lo and behold, killing paint fixed it for me too :D – Steve McCormick Apr 12 '20 at 11:37
  • 4
    This just fixed it for me too. I didn't even see it running. You can kill them all with this powershell 1-liner `ps | where Name -like '*paint*' | % { $_.Kill() }` – monkey Apr 20 '20 at 18:33
  • 1
    easy to give upvote by getting off this annoying behavior immediately by killing the mspaint – SKLTFZ May 25 '20 at 09:25
  • 1
    it's a good hack to control your mouse cursor through keyboard macros though. Very useful feature(?) when you DO know about it! – Erin B Jun 01 '20 at 13:45
  • 39
    Happens if the paint was automatically reopened after a forced update! – Abhishek E H Jun 12 '20 at 09:46
  • 1
    Add another victim to the list, thank you - I was checking accessibility/ease of access and finding nothing. – KellCOMnet Jul 07 '20 at 13:31
  • 1
    And another victim here too. I use mspaint constantly for screen shots, and it's never happened before. Very strange. – Odj fourth Jul 08 '20 at 22:37
  • 2
    Same here, only on "recovered" paint sessions after Microsoft forcibly shuts down your pc and kills all your work when you walk away. I'm switching to Linux. – Triynko Jul 16 '20 at 18:54
  • 1
    Very helpful!!! – Adrian Jul 19 '20 at 08:39
  • 2
    No need to kill paint -- just focus the window, maybe do something, and your mouse will be yours again. – emragins Jul 29 '20 at 16:18
  • man, you saved my life, where tosend money )) – Oleksandr IY Sep 24 '20 at 06:03
  • 1
    Amazing - most random solution I've come across here yet. – Xsjado Nov 02 '20 at 14:05
  • 2
    Lol, wtf ;) Microsoft itself is not able to use a simple Window.IsActive – Finn Nov 03 '20 at 08:43
  • 2
    This is insane that Paint does this by just running in the background!! Glad I saw this answer, because I never would have guessed. – dougd_in_nc Nov 13 '20 at 02:09
  • 3
    This seems to be related to restoring a session - like on bootup, crash recovery, remote desktop etc. When it restores windows, Paint for some reason doesn't get the message that it's minimised so it takes over. – PlausibleSarge Dec 13 '20 at 02:35
  • 1
    @PlausibleSarge yeah! probably this, it happened exactly to me - I rebooted my machine because of Windows Update and when it got back with Paint open I noticed that weird issue. I honestly thought Windows Update broke something, again. – Dominik Szymański Jan 23 '21 at 01:54
  • 1
    `pskill mspaint` if you have sysinternals installed. – Adrian S Feb 09 '21 at 17:16
  • 3
    I was incredulous at first, but killing ms paint worked. So this is still an issue in Feb 2021. – Navin Feb 23 '21 at 00:43
  • It happened to me when restarting Windows without closing MS Paint first. Just closing the window fixed it. – shieldgenerator7 Mar 05 '21 at 03:40
  • I had a similar but related bug where arrow keys teleported my mouse to the bottom right hand corner of my screen. Checked, and found that Pain was running. Closing fixed this bug as well. – DoublyNegative Apr 03 '21 at 14:02
  • Closing Paint works! :)) – Pavel Biryukov Apr 07 '21 at 06:19
  • ~500 upvotes for this answer! Imagine the number of people affected by this "functionality". Damn you m$ for this crappy bug! – Mugen May 15 '21 at 14:54
  • I logged in to upvote this, really scared me this bug. Shows how many people still use the good old ms paint – jeea Jul 04 '21 at 18:50
  • Thank you for helping to preserve my sanity. – Sylvia Else Jul 15 '21 at 00:40
  • Using mspaint a lot, and first time such thing happened to me now so didn't even suspect this simple piece of software. And I'm not surprised even a bit, it's typical bug of Microsoft. Thanks, and glad to share some of my rep as a well deserved bonus. :-) – Shadow The Kid Wizard Jul 15 '21 at 05:58
  • 2
    Just encountered this after 20+ years of Windows usage for the first time. I don't have a slightest idea how anyone figured this out. – polkovnikov.ph Aug 26 '21 at 13:22
  • Thanks, This answer saved my life! – Chandan Gupta Oct 14 '21 at 05:09
  • Let me join the list of people thanking you. Beginner programmer mistake on the part of the Paint team. – deanis Nov 26 '21 at 18:23
  • still happens on win10 in 2022. Win11 has mspaint rewritten, hopefully it's fixed there – Adassko Mar 15 '22 at 18:28
  • Thank you! Logged in to like this answer! – user Jul 15 '22 at 08:22