If you just want the quick fix: try pressing SHIFT+NUM_LOCK. For the full gory story, as it affected me, read on…
A few weeks ago the numeric keypad on my work PC stopped responding. The Enter key still worked, but most of the other keys didn’t seem to do much. I wasn’t really surprised that it had finally given up the ghost: it was supplied with the machine seven years ago, and wasn’t the most deluxe keyboard in the world even when new. The silver painted coating had long since worn off of the well travelled parts of the device, and it had probably collected enough particles of my lunch over seven years to furnish a full banquet if anyone were foolish enough to shake it out.
It wasn’t until I was devoid of a numeric keypad that I realised how much I use one. Dotted quads for IP addresses trip lightly off the fingers of the right-hand rather than being laboriously thumped out of the row of digits at the top of the typewriter section. When programming my muscle memory flitted /* and */ comment delimiters into existence almost subconsciously. And when working with Inkscape the +,-,* and / of the keypad are my preferred route into the world of boolean operations on paths. I quickly resolved that a replacement keyboard needed to be found, pronto.
I could have asked work to buy me a new keyboard, but that would have got me another cheap model. Now I don’t mind the cheap HP model that had just died: it was quite a comfy keyboard to type on, and I hadn’t felt a desperate need to replace it in the past 7 years. But I’ve used other cheap (and some expensive) keyboards that were just horrible – one of my colleagues has a Dell monstrosity that nearly breaks your fingers to type on. But I knew that I had an old buckling spring keyboard kicking around at home that would be a delight to use every day.
An AT-to-PS/2 adaptor into a PS/2-to-USB adaptor later and I was typing away, number pad and all, with two side-effects. Firstly the clicky-clacky sounds emanating from my cubicle were enough to keep my colleagues awake – Hah! Secondly they made it a lot more obvious when I wasn’t writing code – D’oh!
Everything was rosy, I was a happy, clicky-clacky man. And then it happened: my number pad stopped working again. This was too much of a coincidence, so I went off a-googling and quickly found this to be a common issue, with the culprit being one of the keyboard accessibility options. From the search results I found it would appear that this has been an issue at least since Hardy Heron (8.04); the machine I’m using has the latest release, Lucid Lynx (10.04) so presumably this has been an issue for all the versions in-between as well.
Go to the System menu, select Preferences, then Keyboard, then the Mouse Keys tab. The issue was that this option had become enabled, meaning that my numpad no longer acted as a pad for entering numbers, but as a pad for controlling the mouse:
How had this happened? I wasn’t aware of ever going into that window and enabling that option – let alone having done it twice. It seems that there’s a keyboard shortcut to enable that mode – SHIFT+NUM_LOCK – which immediately toggles Mouse Keys whatever you’re doing at the time. With my frequent use of CTRL+NUMPAD for various Inkscape options, an accidental brushing of SHIFT+NUM_LOCK is a likely candidate for the cause of this confusion.
I can understand that having a keyboard shortcut for toggling this is invaluable for anyone who needs to use Mouse Keys regularly. However I’m not the only person to have been caught out by this, so I would suggest making it a little harder to enable by mistake. Specifically, there is an application called Assistive Technologies Preferences in which I specifically have “Enable assistive technologies” unchecked. Perhaps the state this checkbox should be honoured when a SHIFT+NUM_LOCK is detected.
There’s also a section for Accessibility in the Keyboard Shortcuts control panel. Why isn’t SHIFT+NUM_LOCK exposed there? That would perhaps be the best solution of all, as it would allow the toggle to be set to Disabled for users like me, who don’t want to trigger it by accident, but it would also allow an even more convenient shortcut to be defined by anyone who does want to access this feature regularly.
So if you’ve stumbled across this post because you’ve been affected by this issue, and a web search has sent you this way, try SHIFT+NUM_LOCK first. Unless you want to use your “broken” keyboard as an excuse to invest in a nice clicky-clacky affair.
Oh, and for what it’s worth the 7 year-old keyboard turns out to be fine. But I think I’ll stick with the buckling spring monster, if only for the sadistic pleasure of keeping my colleagues awake.