LXPanel xkb applet (keyboard switcher) calls for help

Discussion on LXDE releases and Development. This forum is not the best way to contact the developers, please use the Development mailing list and Sourceforge to interact with them.
Locked
PCMan
Posts: 85
Joined: Mon Oct 06, 2008 9:52 am

LXPanel xkb applet (keyboard switcher) calls for help

Post by PCMan »

Hi all,
I add a new branch named lxpanel-xkb in our svn repo.

svn co https://lxde.svn.sourceforge.net/svnroo ... xpanel-xkb

It's a new applet for lxpanel which will be a keyboard layout switcher.
The original one in lxpanel is broken, and will be removed.
The new one will be based on libxlavier, a good library handling xkb.
However, we're from Taiwan, and we don't know how keyboard layouts work.
So help is needed.
If you're a developer living in Europe or some other places requiring switching
between different keyboard layouts, please help.

Thanks.
knedlyk
Posts: 18
Joined: Thu Dec 11, 2008 11:37 am
Location: L'viv, Ukraine

Re: LXPanel xkb applet (keyboard switcher) calls for help

Post by knedlyk »

But what is wrong with xkb plugin embedded in lxpanel?
I'm using it for more then 5 months and it works great.
Below is my configuration. I need only keyboard switcher with two languages. Namely, it is pl/ua switcher. I defined keyboard layout in xorg.conf

Code: Select all

Section "InputDevice"
	Identifier     "Keyboard0"
	Driver         "evdev"
#	Driver         "xkb"
	Option "Device" "/dev/input/event1"
        Option         "XkbRules" "xorg"
	Option         "XkbModel" "pc105"
	Option         "XkbLayout" "pl,ua"
	Option         "XkbVariant" ",unicode"
        Option         "XkbOptions" "grp:alt_shift_toggle,lv3:ralt_switch,grp_led:scroll"
EndSection
There is another option if you are using new Xorg with hal device definitions. In this case it is enough to define hal policy for keyboard layouts in /etc/hal/fdi/policy/10-keymap.fdi :

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<deviceinfo version="0.2">
<device>
  <match key="info.capabilities" contains="input.keypad">
    <merge key="input.xkb.rules" type="string">base</merge>
    <merge key="input.xkb.model" type="string">pc105</merge>
    <merge key="input.x11_driver" type="string">evdev</merge>
    <merge key="input.xkb.layout" type="string">pl,ua</merge>
    <merge key="input.xkb.variant" type="string">,unicode</merge>
    <merge key="input.xkb.options" type="string">grp:alt_shift_toggle,lv3:ralt_switch,grp_led:scroll</merge>
  </match>
</device>
</deviceinfo>
So, after that I can switch keyboard layout in two different ways: by Ctrl+Shift, as it was defined in xorg.conf or in hal policy file, and second way to change layout is to use xkb plugin, simply through clicking on a flag in my lxmenu panel.
This is quite enough for me, because I'm using pl layout for English and Polish, and ua(unicode) layout for Ukrainian and Russian. Using just only two layouts, I have 4 different languages.

I think, that before doing something with new lxpanel-xkb-svn it is good to know what is bad with old xkb plugin...
Jabber: echo zdstsz@xwdjf.enw | tr zuenstfxjwd ymcorplgima
mamphp
Posts: 2
Joined: Sat Nov 21, 2009 6:40 pm

Re: LXPanel xkb applet (keyboard switcher) calls for help

Post by mamphp »

i use debian squeeze and sid on another machine, but doesn't work for me!!
any one use her debian with 2 keyboard layout or variant?

thnx
carolina
Posts: 1
Joined: Tue Jan 18, 2011 6:49 am

Re: LXPanel xkb applet (keyboard switcher) calls for help

Post by carolina »

It was not so easy to find that the languages are listed /usr/share/lxdm/lang.txt file, and options for lxdm greater are in /usr/share/lxdm/lxdm.glade. I'm just wondering, how the lxdm set the default X session and the default system language?

In lang.c I see that the default locale is "" (cb(arg,"","Default");), in the most linux distributions it means that the default is en_US.UTF-8. But probably it is not OK in case when somebody use different locale, and don't want every time to choose it from lxdm language menu, and just want to setup up it once for all sessions.

Perhaps it logically to use something like "env | grep LANG" to get the default system locale...
Locked