[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Reconfigurer un clavier anglais en français en environnement graphique.



Bonjour,

On Thu, Aug 13, 2009 at 10:42:55AM +0200, Adrien Bellanger wrote:
> 
> Bonjour,
> 
> J'ai pas le temps de chercher mais il me semble déjà avoir eu un truc
> similaire et la solution était à chercher du côté de hal.
> Courage...

...

C'est bien ça.
Je viens de pas mal chercher, pour finalement trouver une solution.

- installer les paquets xserver-xorg-input-synaptics (pour touchpad),
  xserver-xorg-input-evdev, hal, hal-info

- dans /etc/hal/fdi/policy, copier 3 fichiers :

10-keymap.fdi :

<?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- -->
<deviceinfo version="0.2">
  <device>
    <match key="info.capabilities" contains="input.keymap">
      <append key="info.callouts.add" type="strlist">hal-setup-keymap</append>
    </match>

    <match key="info.capabilities" contains="input.keys">
      <merge key="input.xkb.rules" type="string">base</merge>

      <!-- If we're using Linux, we use evdev by default (falling back to
           keyboard otherwise). -->
      <merge key="input.xkb.model" type="string">keyboard</merge>
      <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
             string="Linux">
        merge key="input.xkb.model" type="string">evdev</merge>
      </match>

      <merge key="input.xkb.layout" type="string">fr</merge>
      <merge key="input.xkb.variant" type="string" />
    </match>
  </device>
</deviceinfo>


10-x11-input.fdi :

<?xml version="1.0" encoding="ISO-8859-1"?>
 <deviceinfo version="0.2">
  <device>
    <match key="info.capabilities" contains="input.keyboard">
      <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>
      </match>
    <merge key="input.xkb.Layout" type="string">fr</merge>
    <merge key="input.xkb.Variant" type="string">latin9</merge>
    <merge key="input.xkb.Option" type="string">compose:rwin</merge>
    </match>
  </device>
</deviceinfo>


11-x11-synaptics.fdi

<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">
  <device>
    <match key="info.capabilities" contains="input.touchpad">
        <merge key="input.x11_driver" type="string">synaptics</merge>
	<merge key="input.x11_options.VertEdgeScroll" type="string">true</merge>
	<merge key="input.x11_options.TapButton1" type="string">1</merge>
        <merge key="input.x11_options.TapButton2" type="string">2</merge>
        <merge key="input.x11_options.TapButton3" type="string">3</merge>
        <!-- Arbitrary options can be passed to the driver using
             the input.x11_options property since xorg-server-1.5. -->
        <!-- EXAMPLES:
        Switch on shared memory, enables the driver to be configured at runtime
	<merge key="input.x11_options.SHMConfig" type="string">true</merge>

	Maximum movement of the finger for detecting a tap
	<merge key="input.x11_options.MaxTapMove" type="string">2000</merge>

	Enable vertical scrolling when dragging along the right edge
	<merge key="input.x11_options.VertEdgeScroll" type="string">true</merge>

	Enable vertical scrolling when dragging with two fingers anywhere on the touchpad
	<merge key="input.x11_options.VertTwoFingerScroll" type="string">true</merge>

	Enable horizontal scrolling when dragging with two fingers anywhere on the touchpad
	<merge key="input.x11_options.HorizTwoFingerScroll" type="string">true</merge>

	If on, circular scrolling is used
	<merge key="input.x11_options.CircularScrolling" type="string">true</merge>

	For other possible options, check CONFIGURATION DETAILS in synaptics man page
        -->
    </match>
  </device>
</deviceinfo>


- supprimer /etc/X11/xorg.conf, ou le renommer
- relancer hal
- on peut vérifier avec:
$ hal-device|grep input.x11
$ hal-device|grep xkb

- déconnecter et relancer se serveur graphique.


J'ai utilisé notamment :
http://bgoglin.livejournal.com/16734.html
http://who-t.blogspot.com/2008/07/input-configuration-in-nutshell.html

Hope this helps

-- 
Pierre Meurisse


Reply to: