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"
>        Identifier  "Keyboard0"
>        Driver      "kbd"
>        Option      "XkbModel" "pc105"
>        Option      "XkbLayout" "us,ru(winkeys)"
>        Option      "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      "XkbLayout" "us,ru"
> Option      "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       2009-04-10 10:35:51.000000000 +0400
> +++ 10-x11-input.fdi    2009-04-10 13:06:49.000000000 +0400
> @@ -2,12 +2,13 @@
>  <deviceinfo version="0.2">
>   <device>
>     <match key="info.capabilities" contains="input.keyboard">
> -      <!-- If we're using Linux, we use evdev by default (falling back to
> -           keyboard otherwise). -->
> +      <!-- If we're using FreeBSD, we use kbd by default -->
>       <merge key="input.x11_driver" type="string">kbd</merge>
>       <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
> -             string="Linux">
> -        <merge key="input.x11_driver" type="string">evdev</merge>
> +             string="FreeBSD">
> +      <merge key="input.xkb.layout" type="string">us,ru</merge>
> +      <merge key="input.xkb.variant" type="string">,winkeys</merge>
> +      <merge key="input.xkb.options" type="string">grp:ctrl_shift_toggle,grp_led:scroll,altwin:menu</merge>
>       </match>
>     </match>
>   </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="1.0" encoding="UTF-8"?>
<deviceinfo version="0.2">
        <device>
                <match key="info.capabilities" contains="input.keyboard">
                <match key="info.product" contains="Type 7 USB keyboard">
                        <merge key="input.x11_driver" type="string">kbd</merge>
                        <merge key="input.x11_options.XkbLayout"
type="string">pc(pc105)+sun_vndr/usb(sun_usb)+pc(pc105)+us(intl)</merge>
                </match>
                </match>
        </device>
</deviceinfo>

-- 
Renato Botelho



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