From: Aivils S. <Aiv...@un...> - 2004-01-05 11:12:05
|
> I've recently acquired a Belkin Nostromo n52 "SpeedPad" [1] - a USB gaming >device with a number of keys and a form factor handy for various games. >It's ostensibly a successor to the Nostromo n50 [2] for which I've helped >cook up some userland utilities [3] to configure the n50 and convert button >hits to user-configurable keystrokes. I could not understand how You can Share The Pain with this. > Despite the external similarities the devices are completely different >internally. The older n50 doesn't even present itself as any specific type >of HID, and so is automatically handled through the generic event interface. > This is what my userland tools use, and it's worked well enough so far. > > The newer n52 however presents two interfaces: a USB keyboard and USB >mouse (it has a wheel similar to a mouse wheel, so is a sharply limited >'mouse' device.) Upon connection, the USB HID subsystem identifies the >n52 properly and sets up its mouse and keyboard interfaces, redirecting >button presses on the device into keystrokes indistinguishable from other >keyboard activity. This prevents (I think?) remapping these keys without >torching the entire system keyboard setup. > > My question is how to approach this? I'd like to identify this device >specifically and prevent the association with keyboard/mouse drivers, >probably just pumping everything out through evdev for simplicity. I'm >RTFMing like a madman, but don't want to have to write up yet-another-driver >if I can avoid it (but am willing if it's deemed necessary.) The absolute >ideal would be to be able to use the same userland tools with both the n50 >and n52, so homogenizing the interfaces would be advantageous. Under 2.6.XX You must change kbd_connect() drivers/char/keyboard.c and mousedev_connect() drivers/input/mousedev.c - in all conscience kbd_connect,() because redundant /dev/input/mouseXX do not distrub any. Please add if(!strcmp(dev->phys,"usb-foo-bar/input0") return NULL; or if(!strcmp(dev->name,"belkin n52") return NULL; n52 device physicaly description "usb-foo-bar/input0" You should grab from /proc/bus/input/devices P: Phys=usb-foo-bar/input0 For better solution search Vojtech Pavlik and contact direct. Aivils Stoss |