2

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.

3 Answers3

2

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
# KEYBOARD CONFIGURATION FILE

# Consult the keyboard(5) manual page.

XKBMODEL="pc105"
XKBLAYOUT="gb"
XKBVARIANT=""
XKBOPTIONS=""

BACKSPACE="guess"

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.

Ingo
  • 42,097
  • 20
  • 85
  • 197
1

I use English US for the keyboard and language on this RPI 3B+ with new RPI keyboard & mouse. I cound not get the Fn key to work. after much serarching some one mentioned checking :

cat /usr/share/X11/xkb/rules/xorg.lst

found a 78/79 keyboard as macbook/mackbook pro

In keyboard and mouse I set the keyboard layout to macbook/mackbook pro that had right number of keys(78 for US and 79 for UK?). :( But All the red function keys seem to be working now, which is great for me as I often enter a couple of numbers and switching on the Num Lock seems a pain. the only light I can not get to work is the one on the far left (looks like a box with a down arrow. I have no clue what it is for) I hope this helps others with the official RPI keyboard and mouse (and other mini keyboards). Cheers!

1

I found "Generic 102-key PC (intl.)" matches my UK layout official Raspberry Pi keyboard (79 keys), specifically the location of <@> <~> and <">.

I haven't been able to get the number pad keys (m for 0, j for 1 etc), but never use them anyway.

Michael
  • 11
  • 1