How can I change the Keyboard Layout on login screen?

I changed my Keyboard Layout from Swedish to English, but now my password doesn’t work and I can’t login. I need a way to change the keyboard layout at the login screen without having access to the keyboard or a way to enter the password using characters not available on the keyboard itself.


  • Press Ctrl+Alt+F1 to switch console mode. Type your username and press Enter and also now type your password.

  • Next type sudo dpkg-reconfigure keyboard-configuration and hit Enter type your password again and follow screen instruction.

As usual, it will prompt you for the model of keyboard (what the keyboard is), and then for the keyboard layout (what the keys should do)

To apply new settings, restarting the keyboard-setup service with this

 sudo service keyboard-setup restart