Cissou,
I was Also struggling with this Hardware USB Keyboard mapping problem with (Azerty French) and you just gave us the right settings
Thanks a lot, problem is solved (on RPi3 Libreelec 9.0)
There is one more place where you can set your layout :
System --> Input --> Keyboard Layouts
on-rpi3-be-latin1-keyboard-layout-not-working