Physical keys on a keyboard are mapped to key codes using xkb. Here's how I got numeric keys working with java applications (like Intellij) on a Debian derivative of Linux:
- Switch to root user
- cd /usr/share/X11/xkb/symbols
- cp keypad keypad.original (just in case)
- Edit keypad and replace all occurrences of KP_Up, KP_Down, KP_Left & KP_Right with Up, Down, Left & Right, respectively
- Save
- dpkg-reconfigure xkb-data
- Reboot
Now the numeric keypad will emit the regular, arrow, key codes and not the java-unrecognised, numeric keypad, arrow, key codes.