Key remapping on uncooperative device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have a fun little USB device:

http://www.amazon.co.uk/Targus-Media-Remote-Control-Card/dp/B000N4JC2U	

First of all, 75% of it works wonderfully, right out of the box.  The
Volume and mute keys worked initially and the track, play and stop
buttons worked as soon as I configured them in the little gnome keyboard
config app.

The device shows up as two separate USB devices: one for the top 7
buttons and a separate device for the bottom two.  The bottom ones are
event9 below and the top ones are event10.  lsinput, input-kbd, and
input-events output are below.

The trouble is with the two keys on the bottom of the remote (event9):
fast forward and rewind.  They seem to come through as just plain KEY_F
and KEY_R.  The issue with it is that the keyboard map that comes out
only appears to have one entry, and it isn't for either KEY_F or KEY_R.

I've played with a few of the userspace event mapping tools, but I
haven't yet found one that keeps they 'f' or 'r' from coming out.  

My next idea was to write a little custom driver or hack up usbhid a
bit.  Any better ideas out there?

lsinput:
/dev/input/event9
   bustype : BUS_USB
   vendor  : 0x9999
   product : 0x200
   version : 256
   name    : "Raytac Corporation Wireless USB "
   phys    : "usb-0000:00:1d.0-2/input0"
   uniq    : ""
   bits ev : EV_SYN EV_KEY EV_MSC EV_LED EV_REP

/dev/input/event10
   bustype : BUS_USB
   vendor  : 0x9999
   product : 0x200
   version : 256
   name    : "Raytac Corporation Wireless USB "
   phys    : "usb-0000:00:1d.0-2/input1"
   uniq    : ""
   bits ev : EV_SYN EV_KEY EV_REL EV_ABS EV_MSC

root@nimitz:~# input-kbd 9
/dev/input/event9
   bustype : BUS_USB
   vendor  : 0x9999
   product : 0x200
   version : 256
   name    : "Raytac Corporation Wireless USB "
   phys    : "usb-0000:00:1d.0-2/input0"
   uniq    : ""
   bits ev : EV_SYN EV_KEY EV_MSC EV_LED EV_REP

map: 1 keys, size: 1/64
0x0000 =  29  # KEY_LEFTCTRL
root@nimitz:~# input-kbd 10
/dev/input/event10
   bustype : BUS_USB
   vendor  : 0x9999
   product : 0x200
   version : 256
   name    : "Raytac Corporation Wireless USB "
   phys    : "usb-0000:00:1d.0-2/input1"
   uniq    : ""
   bits ev : EV_SYN EV_KEY EV_REL EV_ABS EV_MSC

map: 1 keys, size: 1/64
0x0000 = 272  # BTN_LEFT

root@nimitz:~# input-events 9
/dev/input/event9
   bustype : BUS_USB
   vendor  : 0x9999
   product : 0x200
   version : 256
   name    : "Raytac Corporation Wireless USB "
   phys    : "usb-0000:00:1d.0-2/input0"
   uniq    : ""
   bits ev : EV_SYN EV_KEY EV_MSC EV_LED EV_REP

waiting for events
11:22:15.934415: EV_MSC code=4 value=458761
11:22:15.934433: EV_KEY KEY_F pressed
11:22:15.934441: EV_SYN code=0 value=0
11:22:15.966377: EV_MSC code=4 value=458761
11:22:15.966390: EV_KEY KEY_F released
11:22:15.966397: EV_SYN code=0 value=0
11:22:17.814404: EV_MSC code=4 value=458773
11:22:17.814422: EV_KEY KEY_R pressed
11:22:17.814429: EV_SYN code=0 value=0
11:22:17.854416: EV_MSC code=4 value=458773
11:22:17.854436: EV_KEY KEY_R released
11:22:17.854443: EV_SYN code=0 value=0


-- Dave



--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux