Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I installed Debian 6 on my Macbook in a dualboot configuration. Everything is working fine, except for the keyboard.

As I'm typing, I see the mouse arrow moving a bit and strange things happen, such as text under the arrow becomes highlighted or clicked. Other things such as Right-Click, selecting text and other mouse-related events also happen.

It's really hard to type like this! Does anyone have any ideas of what might be the cause and how I can fix this?

share|improve this question
Have logged out and in again? Have you restarted the whole system? What Desktop Environment are you using? – Tshepang Mar 6 '11 at 20:08
Yes, I have done all that. I'm using Gnome. I have no idea what it can be... – Bernardo Oliveira Mar 10 '11 at 2:24
Could you include the output of 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) – sr_ Oct 18 '11 at 11:32
@sr_ Thanks - your xinput list suggestion led me to a solution, below. Hopefully solves OP's too! – Arcane Engineer Jul 17 at 18:50

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.