Page 1 of 2

How to change keyboard language layout?

Posted: Sun Jun 22, 2014 1:47 am
by toad
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.

Re: How to change keyboard language layout?

Posted: Sun Jun 22, 2014 5:35 am
by klricks
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.

Re: How to change keyboard language layout?

Posted: Tue Apr 07, 2015 2:50 am
by walterbyrd
This does not work for me. I keep getting "command not found"

Re: How to change keyboard language layout?

Posted: Tue Apr 07, 2015 9:16 am
by texy
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

Re: How to change keyboard language layout?

Posted: Thu Oct 08, 2015 5:45 pm
by Isturite
walterbyrd wrote:This does not work for me. I keep getting "command not found"
I have to use 'sudo -s raspi-config'

Re: How to change keyboard language layout?

Posted: Sun Jan 24, 2016 1:31 pm
by Mainstream
Is there a way to add to gui for managing input layouts to the raspberry pi?

Re: How to change keyboard language layout?

Posted: Thu Feb 11, 2016 2:20 am
by pollardji
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.

Re: How to change keyboard language layout?

Posted: Thu Feb 11, 2016 6:37 am
by klricks
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.

Re: How to change keyboard language layout?

Posted: Thu Feb 11, 2016 9:55 am
by pollardji
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).

Re: How to change keyboard language layout?

Posted: Wed Aug 17, 2016 10:08 am
by nl3prc
dpkg-reconfigure keyboard-configuration

Re: How to change keyboard language layout?

Posted: Sat Sep 24, 2016 12:17 am
by rchlebek1
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.

Re: How to change keyboard language layout?

Posted: Mon Feb 13, 2017 11:14 am
by Killertechno
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.

Re: How to change keyboard language layout?

Posted: Mon Feb 13, 2017 11:55 am
by k-pi
Maybe using 'setxkbmap it' will work.

Edit: Or, 'loadkeys it', but I think that only sets the command line keymap.

Re: How to change keyboard language layout?

Posted: Mon Feb 13, 2017 4:25 pm
by scruss
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.

Re: How to change keyboard language layout?

Posted: Mon Feb 13, 2017 4:31 pm
by Ernst
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.

Re: How to change keyboard language layout?

Posted: Mon Feb 13, 2017 5:13 pm
by Ernst
Have you looked at the contents of /home/pi/.config/lxkeymap.cfg ?

Re: How to change keyboard language layout?

Posted: Mon Feb 13, 2017 7:52 pm
by Ernst
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

Re: How to change keyboard language layout?

Posted: Mon Feb 13, 2017 10:52 pm
by wh7qq
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

Re: How to change keyboard language layout?

Posted: Thu Feb 16, 2017 7:58 am
by jojopi
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.

Re: How to change keyboard language layout?

Posted: Mon Feb 27, 2017 3:17 am
by ds18s20
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

Re: How to change keyboard language layout?

Posted: Mon Feb 27, 2017 4:33 am
by scruss
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.

Re: How to change keyboard language layout?

Posted: Mon Feb 27, 2017 1:31 pm
by klricks
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.

Re: How to change keyboard language layout?

Posted: Mon Feb 27, 2017 1:45 pm
by scruss
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.

Re: How to change keyboard language layout?

Posted: Sun Jul 30, 2017 5:02 pm
by Seylione
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!

Re: How to change keyboard language layout?

Posted: Sun Jul 30, 2017 10:22 pm
by DougieLawson
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.