User avatar
toad
Posts: 11
Joined: Thu Jun 19, 2014 1:27 am
Location: Canada now

How to change keyboard language layout?

Sun Jun 22, 2014 1:47 am

GB-en keyboard doesn't work very well when my layout is North American. The @ and " keys are swapped, there are £ and € signs coming up. The symbols and mapping is just not correct.

So far:
  • did this

    Code: Select all

    $ sudo rasp-config
    and

    Code: Select all

    $ sudo dpkg-reconfigure keyboard-layout
    which appear to access the same thing.
  • I changed the locale and time zone
  • I searched these forums, which don't have this topic within in logical searches
But no success in changing the layout. I also restarted rPi after making the changes I did. The problem with the keyboard layouts is that they are about manufacturers and models and not about actual key placement and what they do. If someone could point me to where I change to US-en layout for the keyboard (it's what we get in Canada), I would be most grateful. In the meantime, must remember that " = @ and where it is, which is the most inconvenient one.
strive be kind

klricks
Posts: 8642
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA

Re: How to change keyboard language layout?

Sun Jun 22, 2014 5:35 am

Don't try to use the boards search function, Use Google instead.

(For Raspbian OS)

sudo raspi-config

- Choose Internationalization menu
- Choose keyboard setup menu.
- If your exact keyboard is not on the list then choose one of the generic 101, 102 or 104 keyboards.

The following steps are Important! If need US then you must choose US. Don't leave it set to UK.......

- The default Keyboard Layout is [ English (UK) ]
- You may need to scroll down and select [Other] to get back to the country of origin menu
- From country of origin menu select [English (US) ]
- Then from Keyboard layout: menu, scroll to top of list and select - [ English (US) ]. Do not choose anything else unless you know exactly what you are doing!

- Complete the other menus then reboot.
Unless specified otherwise my response is based on the latest and fully updated RPi OS Bullseye w/ Desktop OS.

walterbyrd
Posts: 1
Joined: Mon Jan 12, 2015 4:22 pm

Re: How to change keyboard language layout?

Tue Apr 07, 2015 2:50 am

This does not work for me. I keep getting "command not found"

texy
Forum Moderator
Forum Moderator
Posts: 5174
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: How to change keyboard language layout?

Tue Apr 07, 2015 9:16 am

walterbyrd wrote:This does not work for me. I keep getting "command not found"

Code: Select all

sudo raspi-config
The above command does not work for you? If so, which OS are you using?
Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

Isturite
Posts: 4
Joined: Thu Oct 08, 2015 5:42 pm

Re: How to change keyboard language layout?

Thu Oct 08, 2015 5:45 pm

walterbyrd wrote:This does not work for me. I keep getting "command not found"
I have to use 'sudo -s raspi-config'

Mainstream
Posts: 1
Joined: Sun Jan 24, 2016 1:27 pm

Re: How to change keyboard language layout?

Sun Jan 24, 2016 1:31 pm

Is there a way to add to gui for managing input layouts to the raspberry pi?

pollardji
Posts: 3
Joined: Tue Nov 10, 2015 1:36 am

Re: How to change keyboard language layout?

Thu Feb 11, 2016 2:20 am

Didn't work for me either. And I was root.

What happened was that even after selecting the keyboard it never left the menu. Selecting <ok> just went back to the same place.

klricks
Posts: 8642
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA

Re: How to change keyboard language layout?

Thu Feb 11, 2016 6:37 am

pollardji wrote:Didn't work for me either. And I was root.

What happened was that even after selecting the keyboard it never left the menu. Selecting <ok> just went back to the same place.
Are you logged in remotely by SSH? The keyboard setup only works if a keyboard is physically attached to the RPi. AND the setup only applies to the attached keyboard not the remote keyboard.
Unless specified otherwise my response is based on the latest and fully updated RPi OS Bullseye w/ Desktop OS.

pollardji
Posts: 3
Joined: Tue Nov 10, 2015 1:36 am

Re: How to change keyboard language layout?

Thu Feb 11, 2016 9:55 am

No ssh login. I was locally logged in using the default X display/terminal window as in just after a boot (from the previous attempt), did a sudo bash.

It should work even over an ssh connection, after all, the selections are independent of what the script should be doing.I do understand the possible limited terminal info database that might have existed could cause some unexpected displays over ssh. I haven't looked at the tool to see.

What I ended up doing was just edit the file (/etc/default/keyboard and set the keyboard and layout) manually, and reboot. Much simpler, and I have been used to doing that before with other systems (such as Slackware). Just the manpage on the keyboard file was sufficient (the documented "defaults" worked) for other regions you would have to look at the other files referenced by the man page to find what to use.

The same thing happened with the region coding menu entry earlier, though that one seemed to take on one of the iterations (it had gone all the way through then asked to reboot, which I did).

User avatar
nl3prc
Posts: 176
Joined: Sun Jul 24, 2016 12:39 pm
Location: Den Helder the netherlands

Re: How to change keyboard language layout?

Wed Aug 17, 2016 10:08 am

dpkg-reconfigure keyboard-configuration

rchlebek1
Posts: 2
Joined: Fri Sep 23, 2016 11:21 pm

Re: How to change keyboard language layout?

Sat Sep 24, 2016 12:17 am

klricks wrote:Don't try to use the boards search function, Use Google instead.

(For Raspbian OS)

sudo raspi-config

- Choose Internationalization menu
- Choose keyboard setup menu.
- If your exact keyboard is not on the list then choose one of the generic 101, 102 or 104 keyboards.

The following steps are Important! If need US then you must choose US. Don't leave it set to UK.......

- The default Keyboard Layout is [ English (UK) ]
- You may need to scroll down and select [Other] to get back to the country of origin menu
- From country of origin menu select [English (US) ]
- Then from Keyboard layout: menu, scroll to top of list and select - [ English (US) ]. Do not choose anything else unless you know exactly what you are doing!

- Complete the other menus then reboot.
Worked for me. I'm in the US. Thanks.

Killertechno
Posts: 241
Joined: Wed Jan 02, 2013 8:28 am

Re: How to change keyboard language layout?

Mon Feb 13, 2017 11:14 am

I can't change keyboard layout.....
I've downloaded latest raspbian image from website and my keyboard layout is this:
Image

I want set keyboard layout to italian:
Image

On old debian images of Raspberry I just set my /etc/default/keyboard in this way:

XKBMODEL="pc105"
XKBLAYOUT="it"
XKBVARIANT=""
XKBOPTIONS=""

and all was working correctly.
Now I can't change layout (still UK layout).
I used both raspi-config and configuration settings from desktop.

At the same way I want avoid warning message of ssh password at boot, so I erased file:

/etc/profile.d/sshpasswd.sh

as suggested, but message still there.
Maybe somwthing wrong writing settings????
Thanks.

k-pi
Posts: 929
Joined: Sun Feb 12, 2017 1:46 pm
Location: Upper Hale, Surrey, UK.

Re: How to change keyboard language layout?

Mon Feb 13, 2017 11:55 am

Maybe using 'setxkbmap it' will work.

Edit: Or, 'loadkeys it', but I think that only sets the command line keymap.
Last edited by k-pi on Mon Feb 13, 2017 7:21 pm, edited 1 time in total.

User avatar
scruss
Posts: 5285
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON

Re: How to change keyboard language layout?

Mon Feb 13, 2017 4:25 pm

Killertechno wrote:I used both raspi-config and configuration settings from desktop.
Some keyboards aren't recognized by Raspbian and Debian's keyboard setup routine. If you try

Code: Select all

sudo dpkg-reconfigure keyboard-configuration
and you just get a couple of warning messages but no text GUI to change the layout, then your keyboard's not being identified.
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.
Pronouns: he/him

Ernst
Posts: 1385
Joined: Sat Feb 04, 2017 9:39 am
Location: Germany

Re: How to change keyboard language layout?

Mon Feb 13, 2017 4:31 pm

Killertechno wrote:I can't change keyboard layout.....
I've downloaded latest raspbian image from website and my keyboard layout is this:
Image

I want set keyboard layout to italian:
Image

On old debian images of Raspberry I just set my /etc/default/keyboard in this way:

XKBMODEL="pc105"
XKBLAYOUT="it"
XKBVARIANT=""
XKBOPTIONS=""

and all was working correctly.
Now I can't change layout (still UK layout).
I used both raspi-config and configuration settings from desktop.

At the same way I want avoid warning message of ssh password at boot, so I erased file:

/etc/profile.d/sshpasswd.sh

as suggested, but message still there.
Maybe somwthing wrong writing settings????
Thanks.
This could point to a read-only (=faulty) memory card.
The road to insanity is paved with static ip addresses

Ernst
Posts: 1385
Joined: Sat Feb 04, 2017 9:39 am
Location: Germany

Re: How to change keyboard language layout?

Mon Feb 13, 2017 5:13 pm

Have you looked at the contents of /home/pi/.config/lxkeymap.cfg ?
The road to insanity is paved with static ip addresses

Ernst
Posts: 1385
Joined: Sat Feb 04, 2017 9:39 am
Location: Germany

Re: How to change keyboard language layout?

Mon Feb 13, 2017 7:52 pm

supra wrote:
Ernst wrote:Have you looked at the contents of /home/pi/.config/lxkeymap.cfg ?
It is not in there. Where do I find this config/lxkeymap.cfg
I'm using latest jessie with pixel.
try ~/[DOT]config/lxkeymap.cfg (see above) alternatively copy the following line into a terminal window:

Code: Select all

nano ~/.config/lxkeymap.cfg
The road to insanity is paved with static ip addresses

wh7qq
Posts: 1580
Joined: Thu Oct 09, 2014 2:50 am

Re: How to change keyboard language layout?

Mon Feb 13, 2017 10:52 pm

For the original post (OP) to get the US keyboard mapping, simply edit /etc/default to read as this does:
# KEYBOARD CONFIGURATION FILE

# Consult the keyboard(5) manual page.

XKBMODEL="pc105"
XKBLAYOUT="us"
XKBVARIANT=""
XKBOPTIONS="terminate:ctrl_alt_bksp"

BACKSPACE="guess"C
For the person hijacking the post to get the code for Italian keyboards, the raspi-config>Localization Options>Change locale and Change Keyboard Layout both need to be changed. For some characters, the actual keyboard codes may have to be input. See https://superuser.com/questions/667622/ ... ithout-cha

User avatar
jojopi
Posts: 3712
Joined: Tue Oct 11, 2011 8:38 pm

Re: How to change keyboard language layout?

Thu Feb 16, 2017 7:58 am

wh7qq wrote:the raspi-config>Localization Options>Change locale and Change Keyboard Layout both need to be changed
It is not necessary for the locale and keyboard layout to agree, or they would not be separate options. (If your preferred layout uses a non-Latin script, then it is best for your locale's character encoding to support that script. But that is not an issue for Italian, and anyway the default locale in most images uses UTF-8, which supports all scripts.)
For some characters, the actual keyboard codes may have to be input.
Raspbian's layouts "Italian" and "Italian (eliminate dead keys)" have the missing ASCII characters ` ~ { } added onto the four keys between P and Backspace, and accessible using AltGr or Shift+AltGr.

User avatar
ds18s20
Posts: 83
Joined: Fri Dec 23, 2011 5:44 am
Location: San Francisco

Re: How to change keyboard language layout?

Mon Feb 27, 2017 3:17 am

me too; I just cross posted (sorry I didn't know better to use Google for my pre-post searches) and it seems like there's a defect with Pixel? Keyboard layout either can't be changed or the change doesn't survive a reboot?

Any solution? I just need to make the simplest of all changes -- make is US English...

Any CLI attemps etiher via raspi-config or another command end up with the same error:

Code: Select all

sudo dpkg-reconfigure keyboard-configuration
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
Thanks everyone
~B

User avatar
scruss
Posts: 5285
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON

Re: How to change keyboard language layout?

Mon Feb 27, 2017 4:33 am

No, those update-rc.d messages are what you get if Raspbian can't detect your keyboard. The code comes from Debian and is very old and hard to maintain, so I guess that's why no-one touches it. I've filed bugs with Debian, but there have been outstanding bugs in the package for over a decade that no-one has touched.
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.
Pronouns: he/him

klricks
Posts: 8642
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA

Re: How to change keyboard language layout?

Mon Feb 27, 2017 1:31 pm

ds18s20 wrote:me too; I just cross posted (sorry I didn't know better to use Google for my pre-post searches) and it seems like there's a defect with Pixel? Keyboard layout either can't be changed or the change doesn't survive a reboot?

Any solution? I just need to make the simplest of all changes -- make is US English...

Any CLI attemps etiher via raspi-config or another command end up with the same error:

Code: Select all

sudo dpkg-reconfigure keyboard-configuration
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
Thanks everyone
~B
Those same messages are also displayed when keyboard setting works... ignore them.
The keyboard setting only works if a keyboard is physically attached to the RPi.
Also does not work for BT keyboards.... GUI keyboard setting does not survive a reboot with BT keyboards and raspi-config does not work at all as if no keyboard is attached.
Unless specified otherwise my response is based on the latest and fully updated RPi OS Bullseye w/ Desktop OS.

User avatar
scruss
Posts: 5285
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON

Re: How to change keyboard language layout?

Mon Feb 27, 2017 1:45 pm

Yeah, but those messages are all you get if keyboard-configuration doesn't detect your keyboard. Otherwise you get a nice GUI to play with.

I've had the configuration stay with some BT keyboards … the situation isn't ideal, and the whole Debian keyboard identification code needs an overhaul.
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.
Pronouns: he/him

Seylione
Posts: 36
Joined: Fri Aug 23, 2013 4:49 pm
Location: France

Re: How to change keyboard language layout?

Sun Jul 30, 2017 5:02 pm

I am in France with a french Keyboard (AZERTY) or FR-fr.
I do remember most of the places of the Britain-English layout, but I would very much prefer a french layout. So I tried:
- sudo raspiconfig, changed locale to fr-FR.UTF8 UTF8, acknowledge all
and sudo reboot: result QUERTY still there;
- sudo dkpg-reconfigure keyboard-configuration, selected keyboard
(Logitech default) and language, acknowledge all, reboot:
QUERTY still around

My card is Raspberry Pi 2011.12
my cart comes from element 14, Raspbian OS, all dated 2013.02.08
my keyboard is a logitech wireless K330 with associated mouse M215

I'd rather change my kbd driver. The other solution is to buy a GB keybd (!).

Your advice please!
Lionel
NB: I DO NOT eat frogs and hate the idea!

User avatar
DougieLawson
Posts: 42382
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK

Re: How to change keyboard language layout?

Sun Jul 30, 2017 10:22 pm

With your AZERTY keyboard plugged in press [CTRL]+[ALT]+[F2] that gets you a login prompt.
Login with your pi/raspberry userid (or whatever you've set the password to).

Run
sudo dpkg-reconfigure keyboard-configuration

From the menu choose
"Generic 105"
Scroll to the bottom choose
"Other"
From the next menu choose
"French (legacy, alternative)"
[TAB]
<OK>
[ENTER]
From the "Key to function as AltGR" menu choose
"The default for the keyboard layout"
[TAB]
<OK>
[ENTER]
From the "compose key" menu choose
"No compose key"
[TAB]
<OK>
[ENTER]
From the "Use ALT+BACKSPACE" menu choose
"Yes"
[ENTER]
And you're done.

Sorry the menus are all in English even if I change my RPi to use FR_fr as the locale.
Languages using left-hand whitespace for syntax are ridiculous

DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.

The use of crystal balls and mind reading is prohibited.

Return to “Troubleshooting”