I want to set my keyboard settings to Swedish, but on the Raspbian configuration tool my keyboard is not on the list.

Update: Changing XKBLAYOUT to "se" doesn't work. And internationalization in raspi-config doesn't either. My keyboard is a Logitech Wireless Touch Keyboard K400r, if that might help.

13 Answers 13


Take a look at the Raspberry Pi wiki on re-mapping the keyboard with Debian Squeeze:

Re-mapping the keyboard with Debian Squeeze

If different letters appear on-screen from that which you typed, you need to reconfigure you keyboard settings. In Debian, from a command line type:

sudo dpkg-reconfigure keyboard-configuration

Follow the prompts. To apply the changes type:

sudo setupcon

From the command line type:

sudo nano /etc/default/keyboard

Then find where it says


and change the gb to the two letter code for your country.

Here is the list of current country codes from Wikipedia if you don't know your country code (use the codes in the column labeled alpha-2).

Another way you can try switching the keyboard layout:

$ setxkbmap de
$ setxkbmap fr
$ setxkbmap us
  • 1
    none of these worked, any idea why? 'sudo: dkpg-reconfigure: command not found' and changing the keyboard defaults to 'se' did nothing even tho I saved before quiting. – justanotherhobbyist Oct 20 '13 at 18:54
  • 1
    Did you restart after saving that file? – syb0rg Oct 21 '13 at 3:26
  • Yeah I restarted. – justanotherhobbyist Oct 23 '13 at 20:48
  • 1
    @hustlerinc I'm not sure why sudo dpkg-reconfigure keyboard-configuration isn't working for you. Are you working from a fully updated vanilla Raspbian OS? – syb0rg Oct 24 '13 at 21:56
  • Yeah, haven't really done much at all since writing the img, and I always do update > upgrade before trying to install new packages to make sure I have the latest updates. But pretty much everything has gone wrong like bad SD card that wont boot NOOBS, wifi dongle with broken drivers and the keyboard issues. It's a good learning experience though. – justanotherhobbyist Oct 25 '13 at 1:43

Here is one thing to try out:

Edit /etc/default/keyboard with your favorite editor (vim, nano,). Remember to use sudo:

sudo nano /etc/default/keyboard

Make the file look like this:


# Consult the keyboard(5) manual page.



Save the file, then reboot.

  • This didn't work either. =( – justanotherhobbyist Oct 23 '13 at 20:57
  • Exactly, what does not work? You do not get @ when pressing ALTGR+2? Or doesn't Ö show up in the terminal? – Sitron_NO Oct 24 '13 at 6:23
  • It's not about the special characters, I know they have no place in terminal. The problem is your first example, always having to google "US keyboard layout" and have an image open to find the brackets, semi colon etc is starting to piss me off. :P – justanotherhobbyist Oct 24 '13 at 9:37
  • Do you have these to packages installed? keyboard-configuration and kbd (Use dpkg -l to check) – Sitron_NO Oct 24 '13 at 10:47
  • No it wasn't installed, atleast when trying dkpg -l, but apt-get install keyboard-configuration says "keyboard-configuration is already the newest version", same with kbd, but syb0rgs answer didn't work for some reason, says it's not installed. :S – justanotherhobbyist Oct 24 '13 at 11:03

sudo vim /etc/default/keyboard

  • Didn't work the only thing added though was ctrl:swapcaps. The problem seems to be it doesn't recognize "se". – justanotherhobbyist Oct 23 '13 at 20:58
  • @hustlerinc You did both? Well it should work. Did you try at the initial configuration as well? – Loko Oct 23 '13 at 21:00
  • Yeah, the "se" part was allready there. By initial configuration do you mean raspi-config? If so yeah, hundreds of times but my exact keyboard is not there, so I tried with a few other models by the same manufacturer. – justanotherhobbyist Oct 23 '13 at 21:11
  • @hustlerinc Yeah I meant raspi-config... :S Sorry I couldn't be a help Goodluck man I dont think theres much I can do for you – Loko Oct 23 '13 at 22:29
  • np, you get some bonus reputation for the effort. – justanotherhobbyist Oct 24 '13 at 9:51

My solution was to run "dpkg-reconfigure console-data" as root and select "select keymap from full list" from the appearing dialog window. No reboot needed.


I have an emulation of Raspbian in a Sony Vaio VGN-FW-11E in Spanish language.

I could solve the problem by runing in command prompt sudo raspi-config and then going to Advanced Setup and then "Update" (this tool to the latest version). This connects your computer to a raspberry pi server and download the latest version of the config tool, which assures that you have the most updated options and languages.

Then I could choose the language of my keyboard which is Spanish and everything went fine!


It seems to have something to do with that speciffic keyboard (Logitech K400). I ran into the same problem when trying to use the Danish layout.

Everything seemed to be configured correctly, but the actual layout was still US. When I switched to another keyboard, the layout was Danish, without any further modifications...


I suppose the problem disapears when you use a wired keyboard.

If it is the case, it seems linked to this bug: https://bugs.freedesktop.org/show_bug.cgi?id=39460

  • 1
    You have got the beginnings of a great answer, just include some specifics on the bug and you'll be there! – Darth Vader May 31 '16 at 15:18

Gents, the best way if you want several keyboard layout available is to right click on your top panel icon (the hour for example) then go to : 'Add/Remove Panel Items' then go to : 'Panel Aplets' tab then 'Add' then select : 'Keyoard layout handler' then it will appear as an icon in your panel (it can be a flag or keyboard or country code). Right click on the keyboard icon go to 'kyboard layout settings' and then un-check the box 'system settings' and then add as many keyboard layout you want! Enjoy.

# Consult the keyboard(5) manual page. 



sudo raspi-config internationalisation options keyboard layout generic US 105 or 102 keys depending on your keyboard then choose US then choose what sort (eg. EU setup with a EURO sign on the 5 key)


This issue is related to the logitech unifying receiver. See my answer given here

  • Could you please include the information in the link in your answer? – Darth Vader Aug 28 '16 at 11:10
  • Welcome to Raspberry Pi! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. Please take the tour and visit the helpcenter to see how things work here. – Ghanima Aug 28 '16 at 12:00
  • We're trying a new policy with regard to informationless link-only answers here. If this post is not edited to contain information that can stand as an answer, however minimal, in 48 hours it will be converted to Community Wiki to simplify having it corrected by the community. – Ghanima Oct 16 '16 at 17:55
  • This answer did it for me. Indeed, I'm also using a logitech K400 keyboard – bvdb Jun 4 '17 at 13:16

None of the answers worked for me:

  1. editing /etc/default/keyboard
  2. using raspi-config
  3. using dpkg-reconfigure keyboard-configuration

The reason was that LXDE has its own config and it has overwritten config set by above ways. To change it once and for all I had to use keyboard and mouse configuration from "start menu" -> preferences.


Go to Menu, Preferences, Mouse and Keyboard Settings, Keyboard, Keyboard Layout.

  • Welcome to Raspberry Pi! Please take the tour and visit the helpcenter to see how things work here. Note that the OP wrote but on the Raspbian configuration tool my keyboard is not on the list. suggesting that a GUI based solution did not work (maybe it now does). – Ghanima Oct 16 '16 at 17:54

Not the answer you're looking for? Browse other questions tagged or ask your own question.