Christian Lyra wrote:
>
> Hi,
>
> I'm trying to configure a Compaq Internet keyboard (USB of course :-) ), and
> I got it working but without the multimedia keys. How can I configure the
> Multimedia keys? When I do a showkey -s or a xev I got no response when I
> pressed those keys.
In linux/drivers/usb/hid.h, look for the definition of IS_INPUT_APPLICATION.
Try changing it to:
#define IS_INPUT_APPLICATION(a) (((a >= 0x00010000) && (a <= 0x00010008)) || (
a == 0x00010080) || ( a == 0x000c0001))>
If that doesn't work (or you don't want to try it), you can get more
information on the device using the attached code (compile with -I [path to
current kernel]/include ). You should be able to see the applications in the
first few lines (example from my keyboard):
[root@leon hiddev]# ./dump-events /dev/usb/hiddev0
hiddev driver version is 1.0.2
vendor 0x046d product 0xffffc503 version 0x10b7 has 2 applications and is on
bus: 1 devnum: 3 ifnum: 1
Application 0 is 0xc0001 (Consumer Product Page)
Application 1 is 0x10080 (Needs to be added)
<lots of stuff snipped>
You needs to add whatever whatever the second Application is, for your device,
to the IS_INPUT_APPLICATION definition.
Background
It seems that some manufacturers have wierd interpretations of what the HID
usage Tables are saying.
I did some investigation with this before (with a user of a HP keyboard), and
sent the patch to Vojtech. It is in the linuxconsole CVS - I don't know why
it isn't merged yet.
Brad
dump-events.c