Re: USB remote control missing keycodes

Jiri Kosina
2007-06-13T14:58:34Z

On Wed, 13 Jun 2007, Islam Amer wrote:

> back ( not working )
> [ 829.897373] drivers/hid/hid-core.c: report (size 5) (numbered)
> [ 829.897380] drivers/hid/hid-core.c: report 4 (size 4) = fa 00 00 00
> [ 829.897389] hid-debug: input Consumer.0000 = 0
[...]
> txt ( not working )
> [ 900.156751] drivers/hid/hid-core.c: report (size 5) (numbered)
> [ 900.156762] drivers/hid/hid-core.c: report 5 (size 4) = 5a 00 00 00
> [ 900.156771] hid-debug: input ffbc.0000 = 0
> [ 900.156781] hid-debug: input ffbc.005a = 1

Oh my, another 'creative' vendor :( We really desperately need the
hidbus, so that we could handle those misbehaving vendors in cleaner
way, I am constantly moving that up in my todo :)

Does the patch below fix the behavior for you? (against 2.6.21)

Also, how about the three remaining buttons you stated previously to be
not working?

diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index c843402..9fb8845 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -474,6 +474,11 @@ static void hidinput_configure_usage(str
case 0x0e5: map_key_clear(KEY_BASSBOOST); break;
case 0x0e9: map_key_clear(KEY_VOLUMEUP); break;
case 0x0ea: map_key_clear(KEY_VOLUMEDOWN); break;
+
+ /* reserved in HUT 1.12. Reported on Elmak MAXTER
+ * 0x18b1/0x0037 remote control */
+ case 0x0fa: map_key_clear(KEY_BACK); break;
+
case 0x183: map_key_clear(KEY_CONFIG); break;
case 0x184: map_key_clear(KEY_WORDPROCESSOR); break;
case 0x185: map_key_clear(KEY_EDITOR); break;
@@ -592,7 +597,8 @@ static void hidinput_configure_usage(str
}
break;

- case HID_UP_LOGIVENDOR: /* Reported on Logitech Ultra X Media Remote */
+ case HID_UP_LOGIVENDOR: /* Reported on Logitech Ultra X Media Remote
+ * and Elmak MAXTER Remote */

set_bit(EV_REP, input->evbit);
switch(usage->hid & HID_USAGE) {
@@ -613,6 +619,10 @@ static void hidinput_configure_usage(str
case 0x04d: map_key_clear(KEY_SUBTITLE); break;
case 0x051: map_key_clear(KEY_RED); break;
case 0x052: map_key_clear(KEY_CLOSE); break;
+
+ /* Reported on Elmak 0x18b1/0x0037 remote control */
+ case 0x05a: map_key_clear(KEY_TEXT); break;
+
default: goto ignore;
}
break;