If you use iTerm2, a great alternative to Terminal on Mac, then you’ve probably tried to use the number pad and realized that it doesn’t type numbers. Good news, there is a setting you can change to make the keypad work.
In iTerm2 go to preferences -> profiles -> keys -> load preset… and choose “xterm with Numeric Keypad”
Close the preferences and enjoy using the number pad on your keyboard!
Tip via iterm2 issues