This key is close to others on my keyboard which contributes to some accidental key presses. I would like this key to be a no-op. I am mainly interested in a solution that works when I log in via Unity desktop. Gnome-terminal is a critical app where this causes me problems. I don't log into TTY very often, so I don't think I need a solution that works in that domain if it is different from the Unity desktop.
To add context to SetJmp's answer in case you don't want to read through UbuntuForums:
xevin a terminal
- Press the key that you want to disable (in this case, num lock). Note the keycode (in my case, 77)
xmodmap -e 'keycode number = NoSymbol'. In my case, this was
xmodmap -e 'keycode 77 = NoSymbol'
I haven't tested if the keycode is standard across computers or if additional steps are needed to make it persist across reboots.
I found this approach helpful: