Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 May 2009 19:04:07 +0400
From:      Boris Samorodov <bsam@ipt.ru>
To:        Renato Botelho <rbgarga@gmail.com>
Cc:        freebsd-x11@freebsd.org
Subject:   Re: SUCCESS: xorg, hal and international keyboard
Message-ID:  <12063144@ipt.ru>
In-Reply-To: <747dc8f30905231049t1f5047d9h966e5ebd31af5cf@mail.gmail.com> (Renato Botelho's message of "Sat\, 23 May 2009 14\:49\:57 -0300")
References:  <34088967@bb.ipt.ru> <747dc8f30905231049t1f5047d9h966e5ebd31af5cf@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Renato Botelho <rbgarga@gmail.com> writes:
> On Fri, Apr 10, 2009 at 6:10 AM, Boris Samorodov <bsam@ipt.ru> wrote:
>>
>> I didn't find any full information on how to configure hal to use
>> international keyboard with new xorg versions. That's my success
>> story.
>>
>> When hal is used (it's a default for new xorg) the keyboard is
>> configured according to
>> LOCALBASE/share/hal/fdi/policy/10osvendor/10-x11-input.fdi
>> My previous xorg.conf has defined keyboard as:
>> -----
>> Section "InputDevice"
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0Identifier =C2=A0"Keyboard0"
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0Driver =C2=A0 =C2=A0 =C2=A0"kbd"
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0Option =C2=A0 =C2=A0 =C2=A0"XkbModel" "pc105"
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0Option =C2=A0 =C2=A0 =C2=A0"XkbLayout" "us,ru=
(winkeys)"
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0Option =C2=A0 =C2=A0 =C2=A0"XkbOptions" "grp:=
ctrl_shift_toggle,grp_led:scroll,altwin:menu"
>> EndSection
>> -----
>>
>> The last two options should be moved to 10-x11-input.fdi. Beware
>> that Option "XkbLayout" "us,ru(winkeys)" is equal to
>> -----
>> Option =C2=A0 =C2=A0 =C2=A0"XkbLayout" "us,ru"
>> Option =C2=A0 =C2=A0 =C2=A0"XkbVariant" ",winkeys"
>> -----
>>
>> One more change should be done at 10-x11-input.fdi: a match key
>> for "linux" should be changed to "FreeBSD". ;-)
>>
>> So, for my keyboard the diff is (well, I've changed a comment
>> also):
>> -----
>> --- 10-x11-input.fdi.orig =C2=A0 =C2=A0 =C2=A0 2009-04-10 10:35:51.00000=
0000 +0400
>> +++ 10-x11-input.fdi =C2=A0 =C2=A02009-04-10 13:06:49.000000000 +0400
>> @@ -2,12 +2,13 @@
>> =C2=A0<deviceinfo version=3D"0.2">
>> =C2=A0 <device>
>> =C2=A0 =C2=A0 <match key=3D"info.capabilities" contains=3D"input.keyboar=
d">
>> - =C2=A0 =C2=A0 =C2=A0<!-- If we're using Linux, we use evdev by default=
 (falling back to
>> - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 keyboard otherwise). -->
>> + =C2=A0 =C2=A0 =C2=A0<!-- If we're using FreeBSD, we use kbd by default=
 -->
>> =C2=A0 =C2=A0 =C2=A0 <merge key=3D"input.x11_driver" type=3D"string">kbd=
</merge>
>> =C2=A0 =C2=A0 =C2=A0 <match key=3D"/org/freedesktop/Hal/devices/computer=
:system.kernel.name"
>> - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 string=3D"Linux">
>> - =C2=A0 =C2=A0 =C2=A0 =C2=A0<merge key=3D"input.x11_driver" type=3D"str=
ing">evdev</merge>
>> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 string=3D"FreeBSD">
>> + =C2=A0 =C2=A0 =C2=A0<merge key=3D"input.xkb.layout" type=3D"string">us=
,ru</merge>
>> + =C2=A0 =C2=A0 =C2=A0<merge key=3D"input.xkb.variant" type=3D"string">,=
winkeys</merge>
>> + =C2=A0 =C2=A0 =C2=A0<merge key=3D"input.xkb.options" type=3D"string">g=
rp:ctrl_shift_toggle,grp_led:scroll,altwin:menu</merge>
>> =C2=A0 =C2=A0 =C2=A0 </match>
>> =C2=A0 =C2=A0 </match>
>> =C2=A0 </device>
>> -----
>>
>> If nothing helps you may wish to restart hald. ;-)

> Hello Boris,
>
> You don't need to patch this file, just create your own one
> and save it as /usr/local/etc/hal/fdi/policy/keyboard.fdi and
> restar hal.
>
> Here is my example, not international, but a Sun Type 7
>
> garga@botelhor:~> cat /usr/local/etc/hal/fdi/policy/keyboard.fdi
> <?xml version=3D"1.0" encoding=3D"UTF-8"?>
> <deviceinfo version=3D"0.2">
>         <device>
>                 <match key=3D"info.capabilities" contains=3D"input.keyboa=
rd">
>                 <match key=3D"info.product" contains=3D"Type 7 USB keyboa=
rd">
>                         <merge key=3D"input.x11_driver" type=3D"string">k=
bd</merge>
>                         <merge key=3D"input.x11_options.XkbLayout"
> type=3D"string">pc(pc105)+sun_vndr/usb(sun_usb)+pc(pc105)+us(intl)</merge>
>                 </match>
>                 </match>
>         </device>
> </deviceinfo>

Yes, this works just fine and is a better solution. Thanks!


WBR
--=20
bsa



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?12063144>