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).


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.

| improve this answer | |
  • 1
    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

| 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
  • 4
    SHIFT NUMLOCK does not work for me! Note the preference has been moved to "Universal Access". – ZweiBlumen Mar 15 '12 at 9:09
  • 1
    For me on Ubuntu 12 SHIFT NUMLOCK enables it. While ESC brings me back to normal mode. – uvasal Aug 3 '13 at 12:26
  • SHIFT NUMLOCK works on 16.04 LTS. – GJSmith3rd Aug 18 '16 at 12:37

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"
| 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 askubuntu.com/a/794802/19753 – imz -- Ivan Zakharyaschev Jul 4 '16 at 18:06
  • True: <b>incredibly annoying keybinding</b> – Prashant Jun 27 at 4:55

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)
| 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" 
| 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.

| improve this answer | |
  • 2
    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 '16 at 0:02

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.

| improve this answer | |

On my 20.04 I could only get out of that mode using the following command which has been kindly suggested here:

dconf write /org/gnome/desktop/a11y/keyboard/mousekeys-enable true

Maybe too many system upgrades and prior fiddling made it the only way out for me.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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