Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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

My numeric keypad has somehow got into a "mouse emulation" mode where the number keys just move the mouse pointer around (2 = down; 8 = up, 6 = right, etc). Anyone know how to make it work normally again?

None of the other numpad keys work either (I first noticed the whole thing when Ctrl + ÷ (numpad division sign) no longer produced "line comment" in IntelliJ IDEA). Toggling num lock doesn't affect this (though the indicator LED works as usual).

I'm using GNOME on Lucid Lynx (10.4).

share|improve this question
up vote 6 down vote accepted

From the menu, use

System > Preferences > Keyboard

On the tab titled "Mouse Keys" there is a check box to toggle "Pointer can be controlled using the keypad" .

You can disable this behaviour there.

share|improve this answer
Yes, that was it. Thanks! – Jonik Oct 21 '10 at 14:36
could not find this setting in Ubuntu 14, though SHIFT+NUMLOCK worked – SAFX Jan 1 '15 at 2:14

Or you can press SHIFT+NUMLOCK

share|improve this answer
Thanks! This appears to be the only way to do it as of 11.10 since the preference Richard lists above is not there. – DisgruntledGoat Dec 17 '11 at 13:33
SHIFT NUMLOCK does not work for me! Note the preference has been moved to "Universal Access". – ZweiBlumen Mar 15 '12 at 9:09
Thank you so much, it worked for me (Ubuntu 12.04) – Anthony O. May 29 '13 at 12:50
For me on Ubuntu 12 SHIFT NUMLOCK enables it. While ESC brings me back to normal mode. – uvasal Aug 3 '13 at 12:26

You can permanently disable this incredibly annoying keybinding by editing /usr/share/X11/xkb/compat/complete in superuser mode (ie, gksudo gedit /usr/share/X11/xkb/compat/complete) and commenting out mousekeys & accessx(full):

// $XKeyboardConfig$
// $Xorg: complete,v 1.3 2000/08/17 19:54:34 cpqbld Exp $
default xkb_compatibility "complete" {
include "basic"
augment "iso9995"
//augment "mousekeys"
//augment "accessx(full)"
augment "misc"
augment "xfree86"
augment "level5"
share|improve this answer
Any idea if it can be done dynamically using a script? I ask because I need this feature for my laptop at home but it can cause severe crashes at work (mouse pointer keeps moving downwards like crazy, forcing me to reboot) if I forget to turn it off. – highsciguy Sep 11 '12 at 14:30
@highsciguy Yes, this can be controlled with a command (xkbset) from a script – imz -- Ivan Zakharyaschev Jul 4 at 18:06

In Ubuntu 12.10, to solve this problem you can follow the below steps:

  1. System Setting
  2. Universal Access
  3. Pointing and Clicking
  4. Turn off the Mouse key by clicking the Mouse Key (Control the pointer)
share|improve this answer

as root user, type the following command that will completely inhibit the feature:

gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory --type string --set /desktop/gnome/accessibility/keyboard/mousekeys_enable "false" 
share|improve this answer

Just a heads-up, in Ubuntu 12.04 (Unity) this "feature" can be enabled and disabled in the Universal Access dialogue under the Pointing and Clicking tab.

share|improve this answer

Apart from Shift+NumLock (bound to the corresponding action to enable/disable this mode), an additional xkbset utility can be used to control this from command line:

xkbset -m

Learned this tip from Enabling mousekeys.

share|improve this answer
Thanks, it works! I'm using a minimal window manager so I don't have all those fancy menus people are talking about. Your answer is the only one that's relevant for me. – Niccolo M. Jul 5 at 0:02

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.