Re: USB remote control missing keycodes

Islam Amer
2007-06-13T15:59:07Z

On Wed, 2007-06-13 at 17:44 +0200, Jiri Kosina wrote:
> On Wed, 13 Jun 2007, Dmitry Torokhov wrote:
>
> > Actually this one does not need hidbus and can be easily handled from
> > userspace now that we have setkeycodes support for HID.
>
> Sure, thanks for reminding.
>
> Islam, if you'd like to write an userspace 'driver' (really trivial
> few-liner) for the missing keys, you can use a new functionality in recent
> kernels, which allows you to use EVIOCSKEYCODE ioctl() on evdev to create
> a proper mapping between the usage codes that are not handled by
> hid-input, and keycodes.
>

Interesting.. I assumed since evbug was not producing usable codes for
these keys then the evdev layer would not get any codes at all.

Starting from what version did this ioctl get added and is it documented
anywhere ?

Nevertheless the patch you sent got the "TXT" key to work but not the
"BACK" key. Here are the codes for all of the non-functioning keys
( TXT , BACK , 4 COLOR keys ):

RED button

[ 1076.800000] drivers/hid/hid-core.c: report (size 5) (numbered)
[ 1076.800000] drivers/hid/hid-core.c: report 5 (size 4) = 5b 00 00 00
[ 1076.800000] hid-debug: input ffbc.0000 = 0
[ 1076.800000] hid-debug: input ffbc.005b = 1
[ 1076.808000] drivers/hid/hid-core.c: report (size 5) (numbered)
[ 1076.808000] drivers/hid/hid-core.c: report 6 (size 4) = 01 2b 00 00
[ 1076.808000] hid-debug: input ff80.0001 = 1
[ 1076.808000] hid-debug: input ff80.0001 = 43
[ 1076.808000] hid-debug: input ff80.0001 = 0
[ 1076.808000] hid-debug: input ff80.0001 = 0
[ 1076.904000] drivers/hid/hid-core.c: report (size 5) (numbered)
[ 1076.904000] drivers/hid/hid-core.c: report 6 (size 4) = 01 2b 00 00
[ 1076.904000] hid-debug: input ff80.0001 = 1
[ 1076.904000] hid-debug: input ff80.0001 = 43
[ 1076.904000] hid-debug: input ff80.0001 = 0
[ 1076.904000] hid-debug: input ff80.0001 = 0
[ 1077.024000] drivers/hid/hid-core.c: report (size 5) (numbered)
[ 1077.024000] drivers/hid/hid-core.c: report 5 (size 4) = 00 00 00 00
[ 1077.024000] hid-debug: input ffbc.005b = 0
[ 1077.024000] hid-debug: input ffbc.0000 = 1

GREEN button

[ 1196.060000] drivers/hid/hid-core.c: report (size 5) (numbered)
[ 1196.060000] drivers/hid/hid-core.c: report 5 (size 4) = 5c 00 00 00
[ 1196.060000] hid-debug: input ffbc.0000 = 0
[ 1196.060000] hid-debug: input ffbc.005c = 1
[ 1196.068000] drivers/hid/hid-core.c: report (size 5) (numbered)
[ 1196.068000] drivers/hid/hid-core.c: report 6 (size 4) = 01 2c 00 00
[ 1196.068000] hid-debug: input ff80.0001 = 1
[ 1196.068000] hid-debug: input ff80.0001 = 44
[ 1196.068000] hid-debug: input ff80.0001 = 0
[ 1196.068000] hid-debug: input ff80.0001 = 0
[ 1196.164000] drivers/hid/hid-core.c: report (size 5) (numbered)
[ 1196.164000] drivers/hid/hid-core.c: report 6 (size 4) = 01 2c 00 00
[ 1196.164000] hid-debug: input ff80.0001 = 1
[ 1196.164000] hid-debug: input ff80.0001 = 44
[ 1196.164000] hid-debug: input ff80.0001 = 0
[ 1196.164000] hid-debug: input ff80.0001 = 0
[ 1196.292000] drivers/hid/hid-core.c: report (size 5) (numbered)
[ 1196.292000] drivers/hid/hid-core.c: report 5 (size 4) = 00 00 00 00
[ 1196.292000] hid-debug: input ffbc.005c = 0
[ 1196.292000] hid-debug: input ffbc.0000 = 1

YELLOW button

[ 1222.552000] drivers/hid/hid-core.c: report (size 5) (numbered)
[ 1222.552000] drivers/hid/hid-core.c: report 5 (size 4) = 5d 00 00 00
[ 1222.552000] hid-debug: input ffbc.0000 = 0
[ 1222.552000] hid-debug: input ffbc.005d = 1
[ 1222.560000] drivers/hid/hid-core.c: report (size 5) (numbered)
[ 1222.560000] drivers/hid/hid-core.c: report 6 (size 4) = 01 ad 00 00
[ 1222.560000] hid-debug: input ff80.0001 = 1
[ 1222.560000] hid-debug: input ff80.0001 = 173
[ 1222.560000] hid-debug: input ff80.0001 = 0
[ 1222.560000] hid-debug: input ff80.0001 = 0
[ 1222.656000] drivers/hid/hid-core.c: report (size 5) (numbered)
[ 1222.656000] drivers/hid/hid-core.c: report 6 (size 4) = 01 ad 00 00
[ 1222.656000] hid-debug: input ff80.0001 = 1
[ 1222.656000] hid-debug: input ff80.0001 = 173
[ 1222.656000] hid-debug: input ff80.0001 = 0
[ 1222.656000] hid-debug: input ff80.0001 = 0
[ 1222.776000] drivers/hid/hid-core.c: report (size 5) (numbered)
[ 1222.776000] drivers/hid/hid-core.c: report 5 (size 4) = 00 00 00 00
[ 1222.776000] hid-debug: input ffbc.005d = 0
[ 1222.776000] hid-debug: input ffbc.0000 = 1

BLUE button

[ 1472.908000] drivers/hid/hid-core.c: report 5 (size 4) = 5e 00 00 00
[ 1472.908000] hid-debug: input ffbc.0000 = 0
[ 1472.908000] hid-debug: input ffbc.005e = 1
[ 1472.916000] drivers/hid/hid-core.c: report (size 5) (numbered)
[ 1472.916000] drivers/hid/hid-core.c: report 6 (size 4) = 01 ae 00 00
[ 1472.916000] hid-debug: input ff80.0001 = 1
[ 1472.916000] hid-debug: input ff80.0001 = 174
[ 1472.916000] hid-debug: input ff80.0001 = 0
[ 1472.916000] hid-debug: input ff80.0001 = 0
[ 1473.036000] drivers/hid/hid-core.c: report (size 5) (numbered)
[ 1473.036000] drivers/hid/hid-core.c: report 5 (size 4) = 00 00 00 00
[ 1473.036000] hid-debug: input ffbc.005e = 0
[ 1473.036000] hid-debug: input ffbc.0000 = 1

BACK key

[ 1573.316000] drivers/hid/hid-core.c: report (size 5) (numbered)
[ 1573.316000] drivers/hid/hid-core.c: report 4 (size 4) = fa 00 00 00
[ 1573.316000] hid-debug: input Consumer.0000 = 0
[ 1573.324000] drivers/hid/hid-core.c: report (size 5) (numbered)
[ 1573.324000] drivers/hid/hid-core.c: report 6 (size 4) = 01 23 00 00
[ 1573.324000] hid-debug: input ff80.0001 = 1
[ 1573.324000] hid-debug: input ff80.0001 = 35
[ 1573.324000] hid-debug: input ff80.0001 = 0
[ 1573.324000] hid-debug: input ff80.0001 = 0
[ 1573.436000] drivers/hid/hid-core.c: report (size 5) (numbered)
[ 1573.436000] drivers/hid/hid-core.c: report 4 (size 4) = 00 00 00 00
[ 1573.436000] hid-debug: input Consumer.0000 = 1

TXT key

[ 1635.116000] drivers/hid/hid-core.c: report (size 5) (numbered)
[ 1635.116000] drivers/hid/hid-core.c: report 5 (size 4) = 5a 00 00 00
[ 1635.116000] hid-debug: input ffbc.0000 = 0
[ 1635.116000] hid-debug: input ffbc.005a = 1
[ 1635.124000] drivers/hid/hid-core.c: report (size 5) (numbered)
[ 1635.124000] drivers/hid/hid-core.c: report 6 (size 4) = 01 aa 00 00
[ 1635.124000] hid-debug: input ff80.0001 = 1
[ 1635.124000] hid-debug: input ff80.0001 = 170
[ 1635.124000] hid-debug: input ff80.0001 = 0
[ 1635.124000] hid-debug: input ff80.0001 = 0
[ 1635.236000] drivers/hid/hid-core.c: report (size 5) (numbered)
[ 1635.236000] drivers/hid/hid-core.c: report 5 (size 4) = 00 00 00 00
[ 1635.236000] hid-debug: input ffbc.005a = 0
[ 1635.236000] hid-debug: input ffbc.0000 = 1

Thanks a million. :)