Jos’s posterous

« Back to blog

Mixing azerty & querty keyboards

Hi,

At work we recently got new laptops. Unfortunately for me, my employer has standardized on "Querty" keyboards. Even more unfortunately for me, in our country people are tought to type on "Azerty" keyboards.

No problem, on my desk i have a nice "Azerty" incarnation of a keyboard which plugs nicely with USB on my laptop. However, on the road i am still stuck with the Querty keyboard.

So, i just basically need the "querty" layout on the laptop keyboard and an "azerty" layout on the USB keyboard. ( windows guys, watch and drool :) )

To do this you will need to fiddle with "HAL", so that it passes the right configuration into xorg. ( i just leave my text console into querty )

First, find out about the properties of you keyboard.
Do this by looking at the output of the "hal-device" command and look for the "input.product" keys of the USB keyboard.
Then create a file named "/etc/hal/fdi/policy/10-keymap.fdi" and put this into it:

<?xml version="1.0" encoding="ISO-8859-1"?>
<match key="input.product" contains="Darfon USB Combo Keyboard">
<merge key="input.x11_driver" type="string">evdev</merge>
<merge key="input.xkb.layout" type="string">be</merge>
<merge key="input.xkb.model" type="string">pc105</merge>
<merge key="input.xkb.rules" type="string">xorg</merge>
</match>

Finally i had to disable the script that automagically configures the properties for my keyboards so i put an "exit" somewhere in the beginning of "/usr/lib/hal/debian-setup-keyboard". Sooner or later, an update will probably break this configuration, but for now it works :)

Jos

Comments (0)

Leave a comment...

 
To leave a comment on this posterous, please login by clicking one of the following.
Posterous-login     Connect     twitter