amyren
Posts: 91
Joined: Tue Jun 12, 2012 10:49 am

keyboard layout

Fri Sep 14, 2012 5:19 pm

I have set in raspi-config to use norwegian keyboard layout, and also norwegian as default system layout.
I now get norwegian letters and the correct layout from the commandline, before launching x.
But when starting the x-environment the keyboard layout is back to standard UK layout.
I have checked the /etc/default/keyboard file and it does show "no"

Is there another setting for the keyboard layout in the lxde environment, or is something messed up in my setup?

Sleep Mode zZ
Posts: 319
Joined: Sun Aug 19, 2012 5:56 am
Location: Finland

Re: keyboard layout

Fri Sep 14, 2012 6:23 pm

I had the same problem. A solution that seems to be working:

Create a file called .xsessionrc in your home directory. In it you can use the command setxkbmap to set the layout you need.
My line:

Code: Select all

setxkbmap fi,us -option grp:ctrl_shift_toggle
Maybe setxkbmap <layout_name> would be enough. (Sorry, I don't know the Norwegian layout name.)

amyren
Posts: 91
Joined: Tue Jun 12, 2012 10:49 am

Re: keyboard layout

Fri Sep 14, 2012 6:36 pm

Thanks, I will try that

btw, I noticed in your line you have fi,us
I guess the fi is to get the keymap for Finland, but why the ",us". Can you have two keymaps active?

Sleep Mode zZ
Posts: 319
Joined: Sun Aug 19, 2012 5:56 am
Location: Finland

Re: keyboard layout

Fri Sep 14, 2012 6:52 pm

amyren wrote:Thanks, I will try that

btw, I noticed in your line you have fi,us
I guess the fi is to get the keymap for Finland, but why the ",us". Can you have two keymaps active?
I can change between them from an applet in the lxde-panel.

(Actually I don't think I need the us layout. I will probably remove it and also the option that presumably gives a way to toggle between the layouts. I found the xsetkbmap command just today and copied someone elses settings, so I'm not an expert...)

amyren
Posts: 91
Joined: Tue Jun 12, 2012 10:49 am

Re: keyboard layout

Sat Sep 15, 2012 2:27 pm

It worked fine, I just tried with "setxkbmap no" and everything like it should be.

MeeM
Posts: 1
Joined: Sat Nov 22, 2014 6:22 am

Re: keyboard layout

Sat Nov 22, 2014 7:20 am

I've tried various options with this command and have had no luck. My hash key still shows as a UK pound symbol on screen, making it hard for me to write C code. Any ideas?

I'm using a Microsoft Arc keyboard which otherwise works fine with my Pi in command line and GUI mode. I've tried "setxkbmap us" but to no avail.

Any help appreciated.

diederik
Posts: 389
Joined: Wed Mar 26, 2014 11:17 pm

Re: keyboard layout

Sat Nov 22, 2014 1:53 pm

Code: Select all

# dpkg-reconfigure keyboard-configuration
as root or prepend it with sudo.
https://wiki.debian.org/Keyboard

klricks
Posts: 4704
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: keyboard layout

Sat Nov 22, 2014 2:43 pm

MeeM wrote:I've tried various options with this command and have had no luck. My hash key still shows as a UK pound symbol on screen, making it hard for me to write C code. Any ideas?

I'm using a Microsoft Arc keyboard which otherwise works fine with my Pi in command line and GUI mode. I've tried "setxkbmap us" but to no avail.

Any help appreciated.
(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.
Go here for my RPi writeup. Basic config, Serial Port add-on etc:
http://blackeagle12.net/Comp/RPi/Rpi.html Click contact icon then world icon --->

Return to “Raspbian”

Who is online

Users browsing this forum: No registered users and 16 guests