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

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Apr 10, 2009 at 6:10 AM, Boris Samorodov <bsam@ipt.ru> wrote:
> Hello List,
>
>
> 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"
> =A0 =A0 =A0 =A0Identifier =A0"Keyboard0"
> =A0 =A0 =A0 =A0Driver =A0 =A0 =A0"kbd"
> =A0 =A0 =A0 =A0Option =A0 =A0 =A0"XkbModel" "pc105"
> =A0 =A0 =A0 =A0Option =A0 =A0 =A0"XkbLayout" "us,ru(winkeys)"
> =A0 =A0 =A0 =A0Option =A0 =A0 =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 =A0 =A0 =A0"XkbLayout" "us,ru"
> Option =A0 =A0 =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 =A0 =A0 =A0 2009-04-10 10:35:51.000000000 +0400
> +++ 10-x11-input.fdi =A0 =A02009-04-10 13:06:49.000000000 +0400
> @@ -2,12 +2,13 @@
> =A0<deviceinfo version=3D"0.2">
> =A0 <device>
> =A0 =A0 <match key=3D"info.capabilities" contains=3D"input.keyboard">
> - =A0 =A0 =A0<!-- If we're using Linux, we use evdev by default (falling =
back to
> - =A0 =A0 =A0 =A0 =A0 keyboard otherwise). -->
> + =A0 =A0 =A0<!-- If we're using FreeBSD, we use kbd by default -->
> =A0 =A0 =A0 <merge key=3D"input.x11_driver" type=3D"string">kbd</merge>
> =A0 =A0 =A0 <match key=3D"/org/freedesktop/Hal/devices/computer:system.ke=
rnel.name"
> - =A0 =A0 =A0 =A0 =A0 =A0 string=3D"Linux">
> - =A0 =A0 =A0 =A0<merge key=3D"input.x11_driver" type=3D"string">evdev</m=
erge>
> + =A0 =A0 =A0 =A0 =A0 =A0 string=3D"FreeBSD">
> + =A0 =A0 =A0<merge key=3D"input.xkb.layout" type=3D"string">us,ru</merge=
>
> + =A0 =A0 =A0<merge key=3D"input.xkb.variant" type=3D"string">,winkeys</m=
erge>
> + =A0 =A0 =A0<merge key=3D"input.xkb.options" type=3D"string">grp:ctrl_sh=
ift_toggle,grp_led:scroll,altwin:menu</merge>
> =A0 =A0 =A0 </match>
> =A0 =A0 </match>
> =A0 </device>
> -----
>
> If nothing helps you may wish to restart hald. ;-)
>
>
> HTH & WBR
> --
> Boris Samorodov (bsam)
> Research Engineer, http://www.ipt.ru Telephone & Internet SP
> FreeBSD Committer, http://www.FreeBSD.org The Power To Serve
> _______________________________________________
> freebsd-x11@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-x11
> To unsubscribe, send any mail to "freebsd-x11-unsubscribe@freebsd.org"
>

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.keyboard=
">
                <match key=3D"info.product" contains=3D"Type 7 USB keyboard=
">
                        <merge key=3D"input.x11_driver" type=3D"string">kbd=
</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>

--=20
Renato Botelho



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