Weird Keyboard Mapping


10 posts
by Bonehead_pi » Tue Feb 05, 2013 1:38 am
I'm a linux noob, and I need help solving this rather odd problem.

I bought a Motorola labdock to use with my Raspberry Pi. I got the necessary adapters from China, built the "forked" USB cable, and it all seems to be working quite well. Except that, today, while trying to write some code, I found that the keyboard is mapped funny. Trying to type the "#" symbol (shift-3) gives me... the symbol for a British pound. Trying to type a double quote gives me the "@" sign.

How do I remap the keyboard back to an "American English" keyboard, so that it matches what is shown on the keys?

Thanks,
Posts: 16
Joined: Tue Oct 09, 2012 3:35 am
by efflandt » Tue Feb 05, 2013 2:14 am
Code: Select all
sudo raspi-config

and properly set your locale. Make sure you unselect whichever en_GB is the default and select en_US.UTF-8 UTF-8

Check keyboard selection too. Or make sure that afterwards /etc/default/keyboard lists:
Code: Select all
XKBLAYOUT="us"
Posts: 359
Joined: Mon Dec 03, 2012 2:47 am
Location: Elgin, IL USA
by klricks » Tue Feb 05, 2013 2:16 am
You need to run the raspi-config and do the keyboard settings:
sudo raspi-config
If you don't have one of the exact keyboards listed then select one of the generic keyboards. 101 or 104 etc. Next menu you will be asked for language where you can select US. After that the [shift 3] key will work as #.

The local setting did not change the keyboard for me.
Go here for my RPi writeup. Basic config, Serial Port add-on etc:
http://home.budget.net/~klricks/Comp/RPi/Rpi.html
Posts: 1458
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
by Bonehead_pi » Tue Feb 05, 2013 3:48 am
Many thanks! I'm not sure if it was the keyboard definition, or changing the "locale", but my keyboard behaves properly, now.

Thank you.
Posts: 16
Joined: Tue Oct 09, 2012 3:35 am
by pluggy » Tue Feb 05, 2013 7:38 am
The Yanks have had it their way for far too long with keyboard mapping.

Long live Raspdian defaulting to UK layout. :)
Don't judge Linux by the Pi.......
User avatar
Posts: 2603
Joined: Thu May 31, 2012 3:52 pm
Location: Barnoldswick, Lancashire,UK
by LemmeFatale » Tue Feb 05, 2013 12:53 pm
Just wanted to say thanks for this, as I'm currently waiting on the arrival of a Lapdock setup, and, though I'm British, I prefer to use a US keyboard layout - it's really good to know this info before I get started with it. :)
Classic - Raspberry Pi Model B (512MB) with Motorola Atrix Lapdock
Lemcon-One - Raspberry Pi Model B (256MB) PiMAME TV-Box
User avatar
Posts: 254
Joined: Fri Feb 01, 2013 8:47 pm
Location: UK
by RaspyPete » Tue Feb 05, 2013 3:59 pm
So, I am running with a motorola atrix lapdock as well. I bought one with a UK keyboard without paying much attention to it. Which keyboard type represents the keyboard on the UK atrix lapdock? Should I be just be using the 105-key international generic layout or is there something more specific that you guys could recommend?

Thanks for the help!
Posts: 5
Joined: Sat Jan 19, 2013 11:47 pm
by pluggy » Tue Feb 05, 2013 5:27 pm
The standard UK layout will be fine. Crippled ( ;) ) keyboards usually work with standard layouts. When I put Linux on a laptop of any type I just say its a UK keyboard and it works, no matter what its physical layout is (hunt the delete key is a pastime of mine, its never in the same place on a laptop).
Don't judge Linux by the Pi.......
User avatar
Posts: 2603
Joined: Thu May 31, 2012 3:52 pm
Location: Barnoldswick, Lancashire,UK
by Donji » Sat Jun 08, 2013 5:19 am
does anyone which is the right keyboard model to pick in sudo config for an american keyboard?
Posts: 5
Joined: Tue May 21, 2013 6:12 pm
by klricks » Sat Jun 08, 2013 1:30 pm
Donji wrote:does anyone which is the right keyboard model to pick in sudo config for an american keyboard?


sudo raspi-config
If your exact keyboard is not on the list then choose one of the generic keyboards 101, 104 etc.
Go here for my RPi writeup. Basic config, Serial Port add-on etc:
http://home.budget.net/~klricks/Comp/RPi/Rpi.html
Posts: 1458
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA