Did the following as normal user and reboot, still not working
gsettings get org.gnome.settings-daemon.peripherals.keyboard numlock-state
Did the above as root got answer:
(process:3378): dconf-WARNING **: 14:35:23.197: failed to commit changes to dconf: Erreur lors de la génération de la ligne de commande « dbus-launch --autolaunch=0f76e53a9e0b4f1f8ddd7b2736e88499 --binary-syntax --close-stderr » : Le processus fils s’est terminé avec le code 1
gsettings get org.gnome.settings-daemon.peripherals.keyboard numlock-state
'unknown'
Next ? Purchase new keyboard still not working, funny the maths key ∕⋅−+ works but not the numbers
Problem solved.
On a mac keyboard the "clear" key functions as the number lock key.
Don't run this command as root/sudo ! Instead run it as user.
To turn on the numlock type
Maybe programatically setting numlock will help you, based on numlock being reverted when switching keyboard layouts.
After looking around the Menu I found the answer as follows:
Ubuntu 18.04:
Choose appropriate keyboard
Settings --> Region & Languages --> Input Sources --> Click add + --> Select your keyboard language --> Check if all the keys works
For me, it is because I should turn on the numeric keypad by pressing "Num Lock" key.
reference