Open terminal and execute the following command.

1
setxkbmap -option 'numpad:microsoft'

Other helpful shortcuts are Ctrl+Alt+Arrow when you want to navigate back or forth after peeking into function defintions and going back to previous functions. In Ubuntu 18.04 by default these shortcuts are taken by the system. To make them available for use in text editors, use the following commands.

1
2
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-left "[]"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-right "[]"