Having read appropriate documentation such as

http://people.freedesktop.org/~hughsient/quirk/quirk-keymap-index.html

I could fix my problem.

As I understand, it seems that the HAL database needs to be
completed/corrected, at least for some devices. The workaround in my
case is described below.

1) Find the keycode corresponding to the wrong-mapped key. Output of xev
in my case :

KeyPress event, serial 31, synthetic NO, window 0x3000001,
    root 0x1a6, subw 0x0, time 1784852, (133,72), root:(136,913),
    state 0x0, keycode 116 (keysym 0xff54, Multi_Key), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

2) Create a file /etc/hal/fdi/policy/ultrax.fdi with the following
content :

<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">
        <device>
                <match key="info.capabilities" contains="input.keyboard">
                <match key="info.product" contains="Logitech">
                        <append key="input.keymap.data" 
type="strlist">116:down</append> <!-- Down key is Down key !-->
                        <append key="info.capabilities" 
type="strlist">input.keymap</append>
                </match>
                </match>
        </device>
</deviceinfo>

3) Restart hal :

 sudo /etc/init.d/hal  restart

4) Unplug and replug the keyboard

5) The output of xev is now :

KeyRelease event, serial 34, synthetic NO, window 0x3000001,
    root 0x1a6, subw 0x0, time 1785004, (133,72), root:(136,913),
    state 0x0, keycode 116 (keysym 0xff54, Down), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

6) Smile :)

Of course, the fdi file above is just a quick and dirty attempt to have
things done. There is certainly a cleaner way to do things (one should
be more precise on the device criterions : here the mapping will apply
to any logitech keyboard).

best,
yvon

-- 
wrong mapping for down key (logitech ultrax)
https://bugs.launchpad.net/bugs/288935
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to