Apparantly, after activating numlock once, the numlock modifier stays turned on (use xev(1) to verify). So, to resolve useful keysyms, we remove the numlock flag from the event state. What currently does not work is actually using your keypad.