I had the same problem. I'm also (still) on Ubuntu 11.10.
In my everyday work I use mousekeys primarily because I like using the num-5 key for mouse key presses.
Then I discovered that in Unity you can do very nice window tiling (ctrl-alt-num4 sends a window to the left of the screen, ctrl-alt-num6 to the right, ctrl-alt-9 top-right, etc).
So to do my window tiling I want to momentarily disable mousekeys.
I found the answer here: http://ubuntuforums.org/showpost.php?p=11776864&postcount=4
I saved the script as ubuntu-toggle-mousekeys and when I need to I type:
... in my terminal.
Here's my very slightly amended script - I just added some comments really:
# I needed this when I connected a big monitor to my ubuntu laptop.
# Unity has nice window tiling shortcuts that need the number keypad to work.
# ctrl-alt-num4 sends a window left, ctrl-alt-num6 sends a window right, etc.
STATUS=$(gsettings get org.gnome.desktop.a11y.keyboard mousekeys-enable) #Are mousekeys on (true or false)
if [ "$STATUS" == "true" ]
gsettings set org.gnome.desktop.a11y.keyboard mousekeys-enable false
notify-send -i "/usr/share/icons/gnome/48x48/devices/keyboard.png" " Mousekeys OFF"
echo "Mousekeys are OFF - use ctrl-alt-num4 to send window left, ctrl-alt-num6 to send window right"
gsettings set org.gnome.desktop.a11y.keyboard mousekeys-enable true
notify-send -i "/usr/share/icons/gnome/48x48/devices/keyboard.png" " Mousekeys ON"
echo "Mousekeys are ON"