Take the 2-minute tour ×
Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. It's 100% free, no registration required.

My USB keyboard was configured slightly wrong. So far I have only tried it with the Debian image. Certain keys were not in the right place (such as the '~' character). I know how to change the keyboard configuration and that this is trivial for many Linux users. However, in the interest of benefit to the Raspberry Pi community (especially those fairly new to Linux), I was wondering if there's a simple way to automatically set up a keyboard to correct these sorts of issues.

share|improve this question
    
It's probably just set to US key map. Assuming you're British. –  Jivings Jun 13 '12 at 18:32
    
I'm not British, and assumption of locality is a pitfall on SE sites. –  jandjorgensen Jun 13 '12 at 18:37
1  
@jivings O dear! Anyway, I use a Mac keyboard on Linux. I still haven't got the mapping right! –  Alex Chamberlain Jun 13 '12 at 18:41
    
@jandjorgensen Sorry! Only because I thought most other English speaking nationalities use US key mapping and that's usually default. I meant no harm. –  Jivings Jun 13 '12 at 18:51
    
@Jivings No apologies needed, and I hope I did not come off too caustic. Good point on the key mapping. –  jandjorgensen Jun 13 '12 at 18:55

3 Answers 3

up vote 18 down vote accepted

You need to reconfigure you keyboard mappings. At the command line type:

sudo dpkg-reconfigure keyboard-configuration

Follow the prompts. Then restart your RasPi.

sudo reboot

Or

sudo nano /etc/default/keyboard

find the line where it says

XKBLAYOUT=”gb”

and change the gb to the two letter code for your country (e.g. US).

And restart your RasPi.

If after remapping your keyboard you get a long delay in boot up during the keyboard mapping phase type the following (once) on the command line:

sudo setupcon
share|improve this answer

I ran into this same issue and the second step of AndyD's reply to this question on the raspberrypi.org forum suggests an alternative to restarting.

Use the command:

$ sudo dpkg-reconfigure keyboard-configuration

to reconfigure your keyboard. Choose English (US) for keyboard layout (second page of configuration). Then either reboot or

$ invoke-rc.d keyboard-setup start

to reload the keymap.

The debian image I am using defaulted to a UK keymapping which made the pipe (|) key inaccessible using my 104-key US keyboard (as far as I can tell) and remapped the tilde (~) to the pipe key. It felt odd not being able to pipe output.

share|improve this answer

sudo nano /etc/default/keyboard

XKBLAYOUT=”gb” - changed gb to US

Worked like a charm, although boot up complains it can't find symbols/US. So far no issues.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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