I've had this problem in 17.10 and 16.04, and now I'm having it again in 18.04 on a fresh install of Ubuntu. Put simply, after booting, any attempt to use the numpad in a desktop environment results in the behaviour associated with the Mouse Keys feature.
At present, the only thing I can do is go into the settings, under the Universal Access section where Mouse Keys is located, and turn it off. Oddly enough, it already shows that it is off, which means I must first turn the feature on, then off, so that the function is disabled.
Toggling the feature is all well and good, but once the session ends and I restart the system, I'm back to square one, and have to toggle it again.
Is there a fix for this bug? If not, what is the terminal equivalent of disabling Mouse Keys? I can just add the command to the startup applications list and be done with it.
According to the list of similar questions, this issue seems to go as far back as 15.04. Possibly further.