I was having a similar problem for a couple of weeks (Debian 8 Jessie, Macbook Pro July 2012). Every time I hit / held a key down, the mouse would stutter across the screen, even as everything else ran at a normal speed. I was examining this in the code of a game I'm writing, so I could see the nature of mouse input changing as a key was held - those values reflected getting fewer mouse events with larger deltas.
Today I found the solution thanks to @sr_ in comments above, and cvasalik in this thread.
Apparently Debian on Macbook Pro installs a mouse emulator on your MBP keyboard.
$ sudo apt-get install xinput
$ xinput list
You should see something like:
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Logitech USB Receiver id=10 [slave pointer (2)]
⎜ ↳ Logitech USB Receiver id=11 [slave pointer (2)]
⎜ ↳ Mouseemu virtual mouse id=18 [slave pointer (2)]
⎜ ↳ bcm5974 id=16 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Video Bus id=7 [slave keyboard (3)]
↳ Power Button id=8 [slave keyboard (3)]
↳ Sleep Button id=9 [slave keyboard (3)]
↳ FaceTime HD Camera (Built-in) id=12 [slave keyboard (3)]
↳ Mouseemu virtual keyboard id=17 [slave keyboard (3)]
↳ Apple Inc. Apple Internal Keyboard / Trackpad id=15 [slave keyboard (3)]
See that Mouseemu
on the keyboard? It's there by default. Get rid of it with:
$ sudo apt-get remove mouseemu
And hopefully your heebie-jeebies will go away.
xinput list
? (xinput
is also the package name) Sounds like your keyboard is taken to be a mouse, too - I had a similar issue with an Apple wireless keyboard detected as a mouse (without any weird behavior following, but it just reminds me)xinput list
suggestion led me to a solution, below. Hopefully solves OP's too!