IR Remotes under 2.6

From: Darren Hart
Date: Sat Jun 19 2004 - 10:20:17 EST


I had some thoughts regarding the >=2.6.6 approach to handling remotes
as keyboards (specifically the ir-kbd-i2c driver).

1) First, I believe the kernel can really only recognize the receiver,
not the remote. This means that one receiver could be used for several
different remotes (like with the Hauppauge PVR-[23]50 for example which
has at least 3 different remotes that I am aware of). Unfortunately,
the keytabs are hardcoded into the kernel (ir-common.c). IMO, the
system would be much more useful if a keytab could be loaded in much the
same way some USB devices load firmware.

2) The current hardcoded keytabs use KEY_* event codes. IMO people
don't think of remotes as keyboards, the closest parallel would be more
like a joystick. My remote has keys that are bound to keyboard keys
that I don't like, but unless I recompile the kernel I can't really
change that. It seems to me that remotes should use BTN_* event codes
rather than KEY_* codes. That way all the buttons on the remote can be
configured. As KEY_* codes, I find that X grabs the ones it recognizes
before I can assign them a function. The '0' button for instance always
sends a 0 to the focused window. There are many situations where a user
would want 0 on the remote to behave differently than 0 on their
keyboard. The use of BTN_0 would make it configurable through userspace
applications such as the gnome media keys or lirc (although once more
apps have input event support, lirc wouldn't be necessary at all).

Thoughts?

Thanks,

Darren Hart
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/