User avatar
monkeyhonkey
Posts: 4
Joined: Wed Apr 01, 2015 1:51 am

'^/°' and '</>/|' keys are swapped

Wed Apr 01, 2015 1:08 pm

Hi,

So I am currently in the process of configuring my Raspberry Pi Model B and I have some trouble with two keys on my keyboard.
I used a ISO keyboard with a German, Windows layout and connected it via USB and everything works fine with it, after changing the locate to 'de', but the main keyboard I want to use is a Logitech K811 bluetooth keyboard and I have some difficulties setting it up correctly.
The K811 is also a ISO keyboard albeit with a German, Macintosh layout, I connected it via bluetooth and everything works fine, except that when I press the ^ and ° key on the bluetooth keyboard it acts as if I hit the <; > and | key and vice versa, now this does not happen with the wired keyboard, although the keys are at the same position on the keyboard.
I thought maybe there might be a way to manually map certain keys on certain keyboards? I already tried the keyboard setup with

Code: Select all

sudo dpkg-reconfigure keyboard-configuration
with no luck, but maybe I just selected the wrong settings. I hope somebody can help me out here.
A picture of the keyboards:
Image
And here is my current state of my /etc/default/keyboard file:

Code: Select all

# KEYBOARD CONFIGURATION FILE
# Consult the keyboard(5) manual page.
XKBMODEL="apple"
XKBLAYOUT="de"
XKBVARIANT="mac"
XKBOPTIONS=""
BACKSPACE="guess" 

piman2000
Posts: 22
Joined: Mon Oct 20, 2014 3:48 am

Re: '^/°' and '</>/|' keys are swapped

Wed Apr 01, 2015 8:39 pm

mine did a similar thing. I had to change the layout of the keyboard in raspi-config. Have you done this yet or checked at least? :D

User avatar
monkeyhonkey
Posts: 4
Joined: Wed Apr 01, 2015 1:51 am

Re: '^/°' and '</>/|' keys are swapped

Wed Apr 01, 2015 8:59 pm

piman2000 wrote:mine did a similar thing. I had to change the layout of the keyboard in raspi-config. Have you done this yet or checked at least? :D
Yes, this:

Code: Select all

sudo dpkg-reconfigure keyboard-configuration
Is the same as configuring with raspi-config. I have the locate and keyboard layout set correctly, because it all works on the wired keyboard, only with the wireless I have this key swap problem.

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

Re: '^/°' and '</>/|' keys are swapped

Wed Apr 01, 2015 10:13 pm

Try setting this in /etc/default/keyboard

Code: Select all

XKBMODEL="pc105"
XKBLAYOUT="de"
XKBVARIANT=""
XKBOPTIONS=""

BACKSPACE="guess"
then run sudo dpkg-reconfigure keyboard-configuration
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

2012-18: 1B*5, 2B*2, B+, A+, Z, ZW, 3Bs*3, 3B+

Any DMs sent on Twitter will be answered next month.

User avatar
monkeyhonkey
Posts: 4
Joined: Wed Apr 01, 2015 1:51 am

Re: '^/°' and '</>/|' keys are swapped

Wed Apr 01, 2015 10:23 pm

DougieLawson wrote:Try setting this in /etc/default/keyboard

Code: Select all

XKBMODEL="pc105"
XKBLAYOUT="de"
XKBVARIANT=""
XKBOPTIONS=""

BACKSPACE="guess"
then run sudo dpkg-reconfigure keyboard-configuration
Just tried it, didn't help...

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

Re: '^/°' and '</>/|' keys are swapped

Wed Apr 01, 2015 11:07 pm

You're going to have to write your own keyboard map for that one.
Take a look at the dumpkeys, loadkeys and commands and keymaps files.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

2012-18: 1B*5, 2B*2, B+, A+, Z, ZW, 3Bs*3, 3B+

Any DMs sent on Twitter will be answered next month.

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

Re: '^/°' and '</>/|' keys are swapped

Wed Apr 01, 2015 11:11 pm

Linux should see ^° as keycode 41, and <> as keycode 86. Check this with "showkey" ("sudo showkey" if running X11). Is the bluetooth keyboard really the opposite way round from the wired one? If so, does it work correctly, with the same receiver, on any other system?

You certainly can manually remap specific keys. The simplest method is to run xmodmap command(s) in a user's GUI startup. This does not require privilege. Keeping the layout the same in both text and graphical modes, and before and after login, would be more complex.

User avatar
monkeyhonkey
Posts: 4
Joined: Wed Apr 01, 2015 1:51 am

Re: '^/°' and '</>/|' keys are swapped

Thu Apr 02, 2015 12:00 am

Thanks for the replies. I just tested the keyboard while connected to my Android phone and as it turns out, this is not a problem that is caused by the Raspberry Pi, but rather the keyboard itself has the keys mapped incorrectly, because I have the same problem when using it with my phone. I didn't test this before, because I thought this would surely not be the problem. I just got this keyboard so I never used it before I used it with the Raspberry Pi. I guess I'm going to contact Logitech support now. Thanks again!

Return to “Troubleshooting”

Who is online

Users browsing this forum: No registered users and 9 guests