Linux Tip: Permanently Disable NumPad Mouse Keys

I’ve been using Ubuntu with GNOME for my desktop Linux distro for a few years now.  Every so often I found myself sometimes triggering the most annoying keybinding in the world: SHIFT + NUMLOCK.  This turns on Mouse Keys in the Keyboard Preferences, rendering your numeric keypad completely useless.  This is not the most obvious keybinding in the world… and if you do it by accident, you may NEVER figure out how to get it back.  I’ve done it enough accidentally to go to the trouble of disabling it permanently.

Of course SHIFT + NUMLOCK does turn it off again, as does going into System->Preferences->Keyboard “Mouse Keys” and unchecking “Pointer can be controlled using the keypad”.  Which is a pain, as I’ve never used the numeric keypad to control my mouse; I’d rather just turn off the option altogether.  Thankfully, disabling it is very easy:

  • Open /usr/share/X11/xkb/compat/complete for editing as superuser
    (eg) Hit ALT+F2 and then enter gksudo /usr/share/X11/xkb/compat/complete
  • Comment 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”
    };

That’s all it takes!


Tags:
Copyright Tyler Style 2015. All rights reserved.

Posted 2011-08-07 by Tyler in category "Linux

About the Author

Totally a geek engineer type - I like to think, tinker and make things go BOOM! I'm also pretty introspective, and enjoy analyzing most things around me and talk about them (often to exasperation). I don't do much pop culture in general, and don't own a TV - give me lively debate with another inquiring mind instead any day of the week!

Leave a Reply

Your email address will not be published. Required fields are marked *