bluetopia
Posts: 4
Joined: Wed Jun 26, 2019 2:59 am

Issues changing keyboard in raspi-config

Wed Jun 26, 2019 3:07 am

Just downloaded Raspbian Buster to re-image a Raspberry Pi 2 that I have, and have run into some issues with changing the keyboard.

This has never been a problem for me in the past, load up raspi-config, go into Localisation Options and change things there.

When I loaded it up (after performing apt-get update/upgrade) there were a number of keyboards that had box characters in them, and the selected option was "PC genèric de 105 tecles (intl.)"

Going to the next screen results in a lot of garbage box characters, and "Anglès", which suggests that I'm in some variation of Spanish.

I've tried re-imaging just to make sure it wasn't a bad image, but still get the same problem.

Any ideas on where to start with this?

Andyroo

Re: Issues changing keyboard in raspi-config

Wed Jun 26, 2019 2:24 pm

Not seen anything like that - are you 100% the image is OK i.e. the SHA values match?

I use Etcher and have it check the SD card as part of the write.

You could try SSH into the Pi to see if that lets you set the keyboard etc up.

bluetopia
Posts: 4
Joined: Wed Jun 26, 2019 2:59 am

Re: Issues changing keyboard in raspi-config

Wed Jun 26, 2019 3:47 pm

I'm using the Lite version of Raspbian Buster, and have checked the SHA-256 sum on the file; no issues there.

The image was created using Etcher, with validation enabled, so there shouldn't have been an issue in the write.

I'm connecting directly to the Pi via keyboard/hdmi.

I've also attached a photo of the dialog for 105 Key.
keyboardDialog.jpg
Picture of keyboard screen
keyboardDialog.jpg (90.54 KiB) Viewed 1627 times

n9iels
Posts: 2
Joined: Wed Jun 26, 2019 3:48 pm

Re: Issues changing keyboard in raspi-config

Wed Jun 26, 2019 3:51 pm

I've got the same exact issue!

Using a Raspberry Pi B V1.2, fresh download of Raspbian Buster Lite 2019-06-20 and the SHA256 hash matches.

spl23
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 378
Joined: Fri Dec 26, 2014 11:02 am

Re: Issues changing keyboard in raspi-config

Wed Jun 26, 2019 5:08 pm

Unfortunately, this seems to be an error in upstream Debian - the keyboard selection database is corrupt. It will presumably be fixed at some point, but it's not something we've done to it!

I'd suggest using the GUI Mouse and Keyboard Settings tool - which uses a separate database which is fine - but if you're on Lite, that's probably not an option; your best bet is to make the relevant settings in /etc/default/keyboard, which is an editable text file.

n9iels
Posts: 2
Joined: Wed Jun 26, 2019 3:48 pm

Re: Issues changing keyboard in raspi-config

Wed Jun 26, 2019 5:15 pm

Changing the keyboard layout over a SSH connection also works fine for me.

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

Re: Issues changing keyboard in raspi-config

Wed Jun 26, 2019 5:51 pm

spl23 wrote:
Wed Jun 26, 2019 5:08 pm
Unfortunately, this seems to be an error in upstream Debian - the keyboard selection database is corrupt. It will presumably be fixed at some point, but it's not something we've done to it!
If I remember correctly the problem disappeared after the first apt-get upgrade.
The road to insanity is paved with static ip addresses

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

Re: Issues changing keyboard in raspi-config

Wed Jun 26, 2019 7:32 pm

I love this bug!

There is a typical Debian Perl script, /usr/share/console-setup/kbdnames-maker that is responsible for looking up the translations of every keyboard layout and variant in every language. This script has not changed since stretch, but apparently something has changed in Locale::gettext, because it is now caching the first results it finds, regardless of language.

It does the languages in alphabetical order, so most people will find that the instructions are in their own language, the layout names are in Bulgarian, and the variant names are in Catalan.

(The boxes are due to the lack of Cyrillic alphabet glyphs in the default console font.)

bluetopia
Posts: 4
Joined: Wed Jun 26, 2019 2:59 am

Re: Issues changing keyboard in raspi-config

Thu Jun 27, 2019 3:14 pm

jojopi wrote:
Wed Jun 26, 2019 7:32 pm
I love this bug!

There is a typical Debian Perl script, /usr/share/console-setup/kbdnames-maker that is responsible for looking up the translations of every keyboard layout and variant in every language. This script has not changed since stretch, but apparently something has changed in Locale::gettext, because it is now caching the first results it finds, regardless of language.

It does the languages in alphabetical order, so most people will find that the instructions are in their own language, the layout names are in Bulgarian, and the variant names are in Catalan.

(The boxes are due to the lack of Cyrillic alphabet glyphs in the default console font.)
Well that explains a lot. Hopefully it get fixed soon :)

In the meantime, I was able to get a US keyboard by modifying /etc/default/keyboard.

Thanks everyone!

patricktokeeffe
Posts: 4
Joined: Thu Apr 13, 2017 9:51 pm

Re: Issues changing keyboard in raspi-config

Wed Aug 07, 2019 8:13 pm

I also ran directly into this issue when running `raspi-config` during initial boot (Buster/Jul 2019 on RPi3 via Rufus). The default selection of the keyboard layout list was (sic) "PC gen?ric de 105 tecles".

However, unlike previous reports, all I had to do was exit the config tool and choose 'yes' when prompted to reboot. Afterwards, I see a normal keyboard layout list (both locally and over SSH).

weado
Posts: 5
Joined: Tue Aug 06, 2019 9:27 pm

Re: Issues changing keyboard in raspi-config

Tue Aug 27, 2019 7:05 pm

Hello,

Do you have some news about this issue ? Because even if I set correctly my keyboard (FR) I have a problem with the accentuated caracters...

User avatar
DougieLawson
Posts: 36322
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Issues changing keyboard in raspi-config

Tue Aug 27, 2019 8:39 pm

weado wrote:
Tue Aug 27, 2019 7:05 pm
Do you have some news about this issue ? Because even if I set correctly my keyboard (FR) I have a problem with the accentuated caracters...
What's in /etc/default/keyboard?

You can edit that to set the right options (because dpkg-reconfigure keyboard-configuration is still 100%, totally and completely broken for everybody).

Code: Select all

XKBMODEL="pc105"
XKBLAYOUT="fr"
XKBVARIANT="nodeadkeys"
XKBOPTIONS="grp:ctrl_shift_toggle,compose:rwin,lv3:ralt_switch"
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

bls
Posts: 264
Joined: Mon Oct 22, 2018 11:25 pm
Location: Seattle, WA

Re: Issues changing keyboard in raspi-config

Tue Aug 27, 2019 8:55 pm

In a fit of lazy and impatient-ness, one day after reconfiguring my keyboard and language for the 3rd time in one day, I ripped some code out of raspi-config and built this little script that solves at least one of my 2 fits (impatient-ness):

Code: Select all

#!/bin/bash

KEYMAP="us"
LOCALE="en_US.UTF-8"
TIMEZONE="America/Los_Angeles"
#
# Change keyboard
#
echo ""
echo "Setting keyboard..."
sed -i /etc/default/keyboard -e "s/^XKBLAYOUT.*/XKBLAYOUT=\"$KEYMAP\"/"
dpkg-reconfigure -f noninteractive keyboard-configuration
invoke-rc.d keyboard-setup start
setsid sh -c 'exec setupcon -k --force <> /dev/tty1 >&0 2>&1'
udevadm trigger --subsystem-match=input --action=change

#
# Change locale
#
echo "Setting locale..."
LOCALE_LINE="$(grep "^$LOCALE " /usr/share/i18n/SUPPORTED)"
ENCODING="$(echo $LOCALE_LINE | cut -f2 -d " ")"
echo "$LOCALE $ENCODING" > /etc/locale.gen
sed -i "s/^\s*LANG=\S*/LANG=$LOCALE/" /etc/default/locale
dpkg-reconfigure -f noninteractive locales
declare -x LANG="$LOCALE"

#
# Change timezone
#
echo "Setting timezone..."
rm /etc/localtime
echo "$TIMEZONE" > /etc/timezone
dpkg-reconfigure -f noninteractive tzdata
Of course, change the keymap, locale, and timezone as appropriate for your location. And...no guarantees about it working on the release after Buster.

weado
Posts: 5
Joined: Tue Aug 06, 2019 9:27 pm

Re: Issues changing keyboard in raspi-config

Wed Aug 28, 2019 12:53 pm

Thank you for you replies.

I changed my configuration file, but I thought my issue come from my keyboard configuration but no :(

In fact, when I do an "apt xxxx" to install a package or upgrade my raspbian, I have a "special" caracter in my size ( as you can see on my screenshot), and I don't understand where is my problem, because I set my locales configuration correctly (UTF8 and it's the same in my Putty).
Capture.PNG
Capture.PNG (13.86 KiB) Viewed 614 times

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

Re: Issues changing keyboard in raspi-config

Wed Aug 28, 2019 1:59 pm

/usr/share/i18n/locales/fr_FR has:

Code: Select all

thousands_sep             "<U202F>"
That is Unicode NARROW NO-BREAK SPACE. This has changed since stretch, where it was just a regular ASCII space. Apparently your PuTTY font does not have a glyph for the character and is not smart enough to substitute a fixed space.

You could try using a different font, or override the numeric category in ~/.bashrc to one that uses a dot:

Code: Select all

export LC_NUMERIC=fr_BE.UTF-8

Return to “Raspbian”