* Trying to remap a wrongly labelled key
@ 2009-01-22 16:08 Bastien Nocera
2009-02-02 12:32 ` Jiri Kosina
0 siblings, 1 reply; 3+ messages in thread
From: Bastien Nocera @ 2009-01-22 16:08 UTC (permalink / raw)
To: linux-input
Heya,
This Dell keyboard has a "media" key, with a music note on it. The
problem is that it's KEY_CONFIG I get instead of KEY_MEDIA.
So I'm trying to fix the problem in user-space. This is one of the
snippets I've tried to use:
int codes[2];
codes[0] = 0x183;
codes[1] = KEY_MEDIA;
if (ioctl (fd, EVIOCSKEYCODE, codes) < 0)
perror ("Set keycode failed");
I inserted that into evtest.
# ./evtest /dev/input/event6
Input driver version is 1.0.0
Input device ID: bus 0x3 vendor 0x413c product 0x2010 version 0x110
Input device name: "Dell Dell USB Keyboard Hub"
Supported events:
Event type 0 (Sync)
Event type 1 (Key)
<snip>
Event code 171 (Config)
<snip>
Set keycode failed: Invalid argument
So there's a key for which the scancode corresponds to KEY_CONFIG. It
should be 0x183 according to the HUT. but it doesn't want to work for
me...
I'm using 2.6.27.9
Cheers
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Trying to remap a wrongly labelled key
2009-01-22 16:08 Trying to remap a wrongly labelled key Bastien Nocera
@ 2009-02-02 12:32 ` Jiri Kosina
2009-02-04 12:52 ` Bastien Nocera
0 siblings, 1 reply; 3+ messages in thread
From: Jiri Kosina @ 2009-02-02 12:32 UTC (permalink / raw)
To: Bastien Nocera; +Cc: linux-input
On Thu, 22 Jan 2009, Bastien Nocera wrote:
> This Dell keyboard has a "media" key, with a music note on it. The
> problem is that it's KEY_CONFIG I get instead of KEY_MEDIA.
>
> So I'm trying to fix the problem in user-space. This is one of the
> snippets I've tried to use:
>
> int codes[2];
> codes[0] = 0x183;
> codes[1] = KEY_MEDIA;
> if (ioctl (fd, EVIOCSKEYCODE, codes) < 0)
> perror ("Set keycode failed");
>
> I inserted that into evtest.
>
> # ./evtest /dev/input/event6
> Input driver version is 1.0.0
> Input device ID: bus 0x3 vendor 0x413c product 0x2010 version 0x110
> Input device name: "Dell Dell USB Keyboard Hub"
> Supported events:
> Event type 0 (Sync)
> Event type 1 (Key)
> <snip>
> Event code 171 (Config)
> <snip>
> Set keycode failed: Invalid argument
>
> So there's a key for which the scancode corresponds to KEY_CONFIG. It
> should be 0x183 according to the HUT. but it doesn't want to work for
> me...
Hi Bastien,
for HID devices, the 'scancode' is in fact the full usage as reported by
the device (i.e. including the HID usage page), not only the usage code
itself. I.e. in your case this should be 0xc0183.
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Trying to remap a wrongly labelled key
2009-02-02 12:32 ` Jiri Kosina
@ 2009-02-04 12:52 ` Bastien Nocera
0 siblings, 0 replies; 3+ messages in thread
From: Bastien Nocera @ 2009-02-04 12:52 UTC (permalink / raw)
To: Jiri Kosina; +Cc: linux-input
On Mon, 2009-02-02 at 13:32 +0100, Jiri Kosina wrote:
<snip>
> Hi Bastien,
Hey Jiri,
> for HID devices, the 'scancode' is in fact the full usage as reported by
> the device (i.e. including the HID usage page), not only the usage code
> itself. I.e. in your case this should be 0xc0183.
Good catch, thanks. FYI, hal-info patch is now done:
http://thread.gmane.org/gmane.comp.freedesktop.hal/12792
Just need to move onto the next keyboard now :)
Cheers
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-02-04 12:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-22 16:08 Trying to remap a wrongly labelled key Bastien Nocera
2009-02-02 12:32 ` Jiri Kosina
2009-02-04 12:52 ` Bastien Nocera
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).