Taking your diagnosis at face value:
Mouse keys is supposed to use only these keys:

but if your password contains some of those keys, I can see how it would be difficult to log in.
IF (and only if) Your Apple-ID password does NOT contain any of those affected keys, your should be able to enter you password wrong three times, then be offered the option to log in using your Apple-ID and Apple-ID password instead. Readily available connection to the internet (without having to do anything complex) is required.
NB>> If that works, the Change you Mac login password to NOT include any of those characters.
If no joy, perhaps something else is preventing login.