Fixes #3483
Now, numlock=true means report keypad digits and numlock=false means report Home, End, etc.
This patch incorporates key remapping rules for the input filter that depend on the global numlock state.