jblachparty
Posts: 1
Joined: Wed Apr 29, 2020 3:11 am

Incorrect key mappings on Raspberry Pi Official Keyboard (US)

Wed Apr 29, 2020 3:31 am

I just got a brand new Raspberry Pi 4B (2GB) along with the official US keyboard (https://www.pishop.us/product/raspberry ... red-white/)

During setup, I noticed that many of the keyboard keys resulted in incorrect characters or functions. Some weird happenings I remember are as follows:
  • The 'a' and ESC keys were switched,
  • Both 'f' and 'g' typed 'fg' when pressed individually
  • The 'r' key periodically deleted entire lines of text
  • The 's' key typed 's>'
I ensured that my locale was set to US (en_US.UTF-8), and I tried a few different models (the Generic 104-key PC was what I assumed it should be, but no luck) with the English layout and default variant.

Is there some specific setting in the keyboard model settings I should use to that this works?

I also tried another test on my Mac to see if the keyboard worked, and after the Mac keyboard setup assistant declared that the keyboard was recognized and ready to use, I still found weird key switchings and double letters/characters being typed for certain keys (although not the same ones I saw on the Raspberry Pi).

Any help would be appreciated!

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26716
Joined: Sat Jul 30, 2011 7:41 pm

Re: Incorrect key mappings on Raspberry Pi Official Keyboard (US)

Wed Apr 29, 2020 8:35 am

Weird. Will pass on to someone who might know.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

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

Re: Incorrect key mappings on Raspberry Pi Official Keyboard (US)

Wed Apr 29, 2020 8:46 am

It's probably a hardware error.

For a US layout keyboard where the @ is on [SHIFT]+[2]

/etc/default/keyboard looks like this (you can edit it with sudo nano).

Code: Select all

# KEYBOARD CONFIGURATION FILE

# Consult the keyboard(5) manual page.

XKBMODEL="chicony"
XKBLAYOUT="us"
XKBVARIANT="intl"
XKBOPTIONS="lv3:ralt_switch,terminate:ctrl_alt_bksp"

BACKSPACE="guess"
https://en.wikipedia.org/wiki/British_a ... _keyboards

With the keyboard plugged in run sudo dpkg-reconfigure keyboard-configuration.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

drgeoff
Posts: 10832
Joined: Wed Jan 25, 2012 6:39 pm

Re: Incorrect key mappings on Raspberry Pi Official Keyboard (US)

Wed Apr 29, 2020 9:37 am

There is no way that a config error by a user should cause either the f or g keys to produce fg. That is either:

1. most likely faulty keyboard, possibly a mechanical problem.

2. small possibility of low voltage to the keyboard.
Quis custodiet ipsos custodes?

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26716
Joined: Sat Jul 30, 2011 7:41 pm

Re: Incorrect key mappings on Raspberry Pi Official Keyboard (US)

Wed Apr 29, 2020 9:39 am

We agree at Pi that this is probably a hardware fault. I suggest returning to the supplier for a replacement.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

Return to “Troubleshooting”