Use non-US keyboard layout in MDM

One pretty annoying fact if you're using a non-US keyboard layout, is that even if you correctly set it up in your Desktop environment, the MDM display manager used in Linux Mint to ask for user credentials before effectively launching your Desktop environment (that's MATE or Cinnamon), will still use a US keyboard layout.

The solution to that problem can be found in the Linux Mint GitHub repo issues. It is surprisingly simple and works as follow:

Edit /etc/mdm/Init/Default

> sudo nano /etc/mdm/Init/Default

ADD ABOVE exit 0 at end of file:
/usr/bin/setxkbmap fr

In this case we're using a French keyboard layout (fr), you'll need to adapt to your particular hardware of course.