NevadaDave
Posts: 8
Joined: Sat Jul 14, 2012 1:40 am

Keyboard codes switched

Tue Jul 17, 2012 10:52 pm

I am using a Logitech K120 keyboard, which works well with one curious exception:
The " (quote) key and @ (ampersand) key are swapped - i.e. to generate a quote, I have to type a shift-2; to generate an @ character, I have to type a shift-' (apostrophe). This does NOT happen when using the keyboard on a standard Windows PC. I am wondering if there is some kind of keyboard mapping file in the Debian distro that has a bug? What else might cause this?

andylh
Posts: 6
Joined: Thu Apr 26, 2012 5:32 pm

Re: Keyboard codes switched

Wed Jul 18, 2012 12:03 am

You may want to use from the command line:-

sudo dpkg-reconfigure keyboard-configuration

So that the language / keyboard layout matches what the OS thinks you are using.

Follow the prompts on the screen and use the tab key to navigate, space to select and enter to apply.

Andy

itimpi
Posts: 1090
Joined: Sun Sep 25, 2011 11:44 am
Location: Potters Bar, United Kingdom
Contact: Website

Re: Keyboard codes switched

Wed Jul 18, 2012 1:59 am

NevadaDave wrote:I am using a Logitech K120 keyboard, which works well with one curious exception:
The " (quote) key and @ (ampersand) key are swapped - i.e. to generate a quote, I have to type a shift-2; to generate an @ character, I have to type a shift-' (apostrophe). This does NOT happen when using the keyboard on a standard Windows PC. I am wondering if there is some kind of keyboard mapping file in the Debian distro that has a bug? What else might cause this?
It DOES happen on Windows if you are set for a UK keyboard (which is the default for the Pi distributions). It sounds as if you want to reconfigure your Pi setup to specify a US keyboard?

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 12400
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Keyboard codes switched

Wed Jul 18, 2012 2:07 am

NevadaDave wrote:I am using a Logitech K120 keyboard, which works well with one curious exception:
The " (quote) key and @ (ampersand) key are swapped - i.e. to generate a quote, I have to type a shift-2; to generate an @ character, I have to type a shift-' (apostrophe). This does NOT happen when using the keyboard on a standard Windows PC. I am wondering if there is some kind of keyboard mapping file in the Debian distro that has a bug? What else might cause this?
Not "curious" at all, the keyboard driver is simply set to accept the codes generated by the keyboard as if the keyboard was a keyboard for the UK market, and those do have the ampersand and quote keys swapped from what you would call "normal". The only reason it doesn't happen on a Windows PC is that the Windows PC is set to interpret the key-codes so that it matches the key-tops of a keyboard used in your particular region of the world, instead of those used in Britain.
For example the keyboards form germany do not have a top row of keys reading "QWERTY", but instead one reading "QWERTZ", not to even mention a French keyboard.
Its all solvable in software!

NevadaDave
Posts: 8
Joined: Sat Jul 14, 2012 1:40 am

Re: Keyboard codes switched

Wed Jul 18, 2012 2:43 am

I figured it was something like that! Thanks for the help!

picubed
Posts: 70
Joined: Fri Aug 24, 2012 7:02 am

Qwerty vs Qwertz

Sun Sep 02, 2012 6:41 pm

I am using a QWERTZ keyboard. How can I instruct the pi to translate my QWERTZ instructions into QWERTY. This becomes essential when trying to use the special characters required in the Linux command line instructions and any programming. In fact thinking about it need the translation for anything really even "normal" use.
@mahjongg you mention that software can solve it - can you elaborate please?

itimpi
Posts: 1090
Joined: Sun Sep 25, 2011 11:44 am
Location: Potters Bar, United Kingdom
Contact: Website

Re: Keyboard codes switched

Sun Sep 02, 2012 7:52 pm

If you are using the recommended Raspbian distribution then you can run

Code: Select all

sudo raspi-config
and one of the options it gives is to change the keyboard type.

picubed
Posts: 70
Joined: Fri Aug 24, 2012 7:02 am

Re: Keyboard codes switched

Sun Sep 02, 2012 8:38 pm

Thanks I think I have got a Debian version . if this makes sense - if it doesn't I need some education on the various distribution "packs"? So will your command work for me?

Return to “Beginners”