I bought one from the Pi Hut (with a GB layout).

I made the mistake of changing keyboard layout to generic 105 keys and now nothing at all happens when I type. Nor does the mouse, which is plugged into it, move now (strange).

I repeated with another copy of Noobs on a new SD card, selecting Raspbian with desktop, and got the same result.

I could just reinstall the o/s and not change the keyboard layout, but I think that the real solution ought to be documented somewhere, and I can't find it by Googling.

And, can I set it by command line? Or by editting some config files? raspi-config is not my friend; it doesn't display the keyboard selection menu, just returns to where it was previously.


To modify the keyboard layout on the command line you can edit /etc/default/keyboard. I don't know what this file should contain for the official Raspberry Pi keyboard (GB). But the unmodified settings from an Raspbian image looks like this:

rpi ~$ cat /etc/default/keyboard

# Consult the keyboard(5) manual page.



I suppose this supports the official keyboard. If you look at man keyboard, you will find:

Description of all available keyboard models, layouts, variants and options is available in /usr/share/X11/xkb/rules/xorg.lst. In most cases, in /usr/share/keymaps/ or /usr/share/syscons/keymaps/ you will find several keymaps that can be used with the variable KMAP.

  • Thanks for that. I will test it this evening. Fortunately, I can still ssh in. – Mawg Jun 10 at 13:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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