How to add layouts to keyboard preferences in LXDE?

Please post all general support questions for LXDE here.
Locked
Ex_Soft
Posts: 2
Joined: Wed Aug 19, 2009 4:38 am

How to add layouts to keyboard preferences in LXDE?

Post by Ex_Soft »

FC11. How to add layouts to keyboard preferences in LXDE similar as Gnome System->Preferences->Keyboard->Layout?
There isn't any applet such as Gnome's Keyboard Indicator in LXDE, is there?

archiebald
Posts: 5
Joined: Sun Aug 16, 2009 12:08 am

Re: How to add layouts to keyboard preferences in LXDE?

Post by archiebald »

As far as I know, there is no such utility currently available, you need to manually edit your keyboard layout. But there is keyboard indicator for LXPanel. Right click on LXPanel->Add/Remove Panel Items->Panel Applets->Add->Keyboard Layout Switcher. It is somewhat similar to Xfce's panel indicator and little to KDE's kicker, but it's not SVG format icon.

Ex_Soft
Posts: 2
Joined: Wed Aug 19, 2009 4:38 am

Re: How to add layouts to keyboard preferences in LXDE?

Post by Ex_Soft »

archiebald wrote:you need to manually edit your keyboard layout
:( How may I do this?
archiebald wrote:LXPanel->Add/Remove Panel Items->Panel Applets->Add->Keyboard Layout Switcher
There is no Keyboard Layout Switcher there. I found Keyboard Led in available plugins only.

archiebald
Posts: 5
Joined: Sun Aug 16, 2009 12:08 am

Re: How to add layouts to keyboard preferences in LXDE?

Post by archiebald »

Try this, but it's only temporary, until next reboot:

Code: Select all

setxkbmap -option grp:switch,grp:alt_shift_toggle,grp_led:scroll us,ar
This is from ArchWiki, about Xorg input hotplugging and it's permanent solution, if you boot your desktop from login managers:

Copy the file (10-keymap.fdi):

Code: Select all

/usr/share/hal/fdi/policy/10osvendor/10-keymap.fdi
to

Code: Select all

/etc/hal/fdi/policy/10-keymap.fdi
and edit this copy there as follows (substitute NEW_LAYOUT with your layout, for instance fr):

Code: Select all

<merge key="input.xkb.layout" type="string">NEW_LAYOUT</merge>

mamphp
Posts: 2
Joined: Sat Nov 21, 2009 6:40 pm

Re: How to add layouts to keyboard preferences in LXDE?

Post by mamphp »

itry this ways doesn't work under Debian testing and Sidux!
:roll:

bearny
Posts: 1
Joined: Wed Jan 20, 2010 11:58 am

Re: How to add layouts to keyboard preferences in LXDE?

Post by bearny »

The way with 10-keymap.fdi not working on Fedora12 LXDE distribution.
I've found 3 ways for this distribution:

1)include this line

Code: Select all

setxkbmap -option grp:ctrl_shift_toggle,grp_led:scroll us,ru
into /etc/X11/xinit/xinitrc script. (not recommended)

2)create for user, which need keyboard layouts switching, file ~/.Xkbmap with line

Code: Select all

-option grp:ctrl_shift_toggle,grp_led:scroll us,ru


3)create for all users file /etc/X11/Xkbmap with line from way 2):

Code: Select all

-option grp:ctrl_shift_toggle,grp_led:scroll us,ru


PS. In ways 2) and 3) /etc/X11/xinit/xinitrc-common script uses settings from ~/.Xkbmap or /etc/X11/Xkbmap and inserts lines from those files into script's body and runs command setxkbmap
PS.PS. sorry for my english

Locked