Bug 5408 - Wrong keymapping for logitech cordless desktop lx500
Summary: Wrong keymapping for logitech cordless desktop lx500
Status: CLOSED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Input Devices (show other bugs)
Hardware: i386 Linux
: P2 normal
Assignee: Jiri Kosina
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-10 00:27 UTC by Ryo Dairiki
Modified: 2007-06-25 01:47 UTC (History)
5 users (show)

See Also:
Kernel Version: 2.6.13
Subsystem:
Regression: ---
Bisected commit-id:


Attachments
A patch to correct this mapping (2.97 KB, patch)
2005-10-10 00:35 UTC, Ryo Dairiki
Details | Diff
logitech.diff (2.83 KB, patch)
2005-11-05 15:47 UTC, Ryo Dairiki
Details | Diff
keymapping fix ported to current kernel version (4.18 KB, patch)
2007-06-25 01:46 UTC, Jiri Kosina
Details | Diff

Description Ryo Dairiki 2005-10-10 00:27:14 UTC
Most recent kernel where this bug did not occur: None
Distribution: Fedora Core 4
Hardware Environment: Dell precision 670 (Xeon 2.8GHz x 2, SMP, 64bit)
Software Environment: 
Problem Description:
Recent model of keyboards sold by logitech have many extra keys.
For example, "Homepage", "Eject CD", "Mute", "Mail", etc.
Most of thier key works properly with hid driver,
but I've found some of keys are wrongly mapped on mouse buttons and joystick
buttons.

This keyboard has wireless mouse which has left, middle, right buttons and
2-dimensional scrolling wheel.
Unfornetuly, this wheel reports side scrolling events and 11 or 12 button events
at the same time.
I mean side scrolling events are reported twice at the same time.

Steps to reproduce:
1. Turn on your computer with logitech lx500 connected to usb port.
2. Press "media" button or "library" button on your keyboard to find that they
are wrongly mapped on mouse buttons.
This is not the problem of X. This problem is occured even when you are on a
text console.
I've checked this by capturing output from /dev/event* devices.

Keyboard:
vender id = 0x046d, product id = 0xc512, version = 0x3007

Wrongly mapped keys: hid page = 0x00090000 (same as mouse buttons), application
field = 0xc0001, physical field = 0
Messenger: hid = 1
Music: hid = 3
Digital (with the icon of "movie"): hid = 4
Library: hid = 5
My Document: hid = 10
Web Camera: hid = 19
Status (with the icon of "logout chat"): hid = 20
Record: hid = 21
Burn CD: hid = 22
Eject: hid = 23
Unknown (with the icon of "remote controler"): hid = 24
Cycle Windows: hid = 28
Help (Fn + F1): hid = 65
Word (Fn + F2): hid = 66
Excel (Fn + F3): hid = 67
...
Macro D (Fn + F12): hid = 76
Comment 1 Ryo Dairiki 2005-10-10 00:35:35 UTC
Created attachment 6268 [details]
A patch to correct this mapping

I've wrote a patch to fix this mapping.
I'm not sure if this mapping is proper for buttons, because , for example,
there is no entry for "burn cd" in input.h.

I think most of recent logitech keyboards has the same problem, and almost the
same mapping.
So you can fix such a problem by using this, and by adding entry for your
logitech keyboard.
Comment 2 Ryo Dairiki 2005-10-10 00:39:24 UTC
I've forgot to mention that the previous patch also supress 11 and 12 button
events from mouse
when you scroll the wheel left and right.
With this patch, only side scrolling events are reported.
(This mouse has only 4 buttons and 2D wheel. There is no such buttons like 11
and 12.)
Comment 3 Ryo Dairiki 2005-11-05 15:47:43 UTC
Created attachment 6481 [details]
logitech.diff

A little change is needed for kernel-2.6.14.
Comment 4 Adrian Bunk 2005-12-29 07:08:59 UTC
Dmitry, can you comment on this patch?
Comment 5 Natalie Protasevich 2007-06-22 22:32:44 UTC
Can someone please take a look at the patch?
Thanks.
Comment 6 Jiri Kosina 2007-06-25 01:46:47 UTC
Created attachment 11864 [details]
keymapping fix ported to current kernel version

I have ported the patch to the current kernel (see attachment) and queued it in HID tree for upstream. Closing the bug, if anyone has any additional comments, please feel free to reopen it.

Note You need to log in before you can comment on or make changes to this bug.