330

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
  • 12,243
  • 4
  • 18
  • 30

1 Answers1

811

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
  • 12,243
  • 4
  • 18
  • 30
  • 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
  • 78
    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
  • 19
    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
  • 8
    (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
  • probably it can have something to do with remote desktop – or hor Nov 18 '19 at 05:39
  • 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
    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
  • 46
    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
  • 3
    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
  • 4
    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
  • 4
    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
  • 2
    @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
  • 2
    `pskill mspaint` if you have sysinternals installed. – Adrian S Feb 09 '21 at 17:16
  • 5
    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
  • 1
    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
  • 1
    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
  • 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 GPT Wizard Jul 15 '21 at 05:58
  • 5
    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
  • 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
  • 1
    still happens on win10 in 2022. Win11 has mspaint rewritten, hopefully it's fixed there – Adassko Mar 15 '22 at 18:28
  • Do not need to kill paint (like someone said in the comments). Just switch focus to another option in the ribbon, like the "Select" button. It's a graphics glitch and it goes away once you perform an action within Paint. – murphy1310 Nov 01 '22 at 14:50
  • 1
    Just had this happen. I noticed that the cursor would only move in a small (~400x500 px) area of my screen - holding the arrow key down, it would stop at a specific boundary. So I started minimizing windows, looking for any that appeared to correspond with that boundary. Lo and behold, the backmost window was "Untitled (Recovered) - Paint"! – Dan Henderson Dec 19 '22 at 17:21
  • An additional detail that you may want to add to your answer: Before I came across this question, I found another page that offered Scroll Lock as a suggestion. It turns out that I didn't have to close Paint, just toggling Scroll Lock completely resolved the behavior (even after turning it back off). – Dan Henderson Dec 19 '22 at 17:23
  • 1
    @Navin Still an issue in January 2023. – Ian Boyd Jan 27 '23 at 18:30
  • Just ran into this! 2023-04-20 – Dan Apr 20 '23 at 19:34
  • I thought my computer was demonically infested for a second there. But no, just a glitch in Paint. – Charles Jun 05 '23 at 08:40
  • Microsoft are the #1 largest software company in the world. – frankster Jun 16 '23 at 17:23