On Thu, Nov 26, 2009 at 01:16:01AM -0500, Jarod Wilson wrote: > On Nov 26, 2009, at 12:31 AM, Dmitry Torokhov wrote: > > > On Mon, Nov 23, 2009 at 11:37:53PM -0500, Jarod Wilson wrote: > >> On 11/23/2009 12:37 PM, Dmitry Torokhov wrote: > >>> On Mon, Nov 23, 2009 at 03:14:56PM +0100, Krzysztof Halasa wrote: > >>>> Mauro Carvalho Chehab<mchehab@xxxxxxxxxx> writes: > >>>> > >>>>> Event input has the advantage that the keystrokes will provide an unique > >>>>> representation that is independent of the device. > >>>> > >>>> This can hardly work as the only means, the remotes have different keys, > >>>> the user almost always has to provide customized key<>function mapping. > >>>> > >>> > >>> Is it true? I would expect the remotes to have most of the keys to have > >>> well-defined meanings (unless it is one of the programmable remotes)... > >> > >> Its the cases like programmable universal remotes that really throw > >> things for a loop. That, and people wanting to use random remote X that > >> came with the amp or tv or set top box, with IR receiver Y. > > > > Right, but still the keys usually do have the well-defined meaning, > > Except when they don't. I have two very similar remotes, one that was bundled with a system from CaptiveWorks, and one that was bundled with an Antec Veris IR/LCD (SoundGraph iMON rebrand). Outside of the Antec remote having a mouse pad instead of up/down/left/right/enter, they have an identical layout, and the keys in the same locations on the remotes send the same IR signal. But the button names vary a LOT between the two. So on the DVD key on the Antec and the MUTE key on the CW send the same signal. Same with Audio vs. Eject, TV vs. History, etc. Moral of the story is that not all IR protocols spell things out particularly well for what a given code should actually mean. I guess we are talking about different things. While the 2 remotes may use different protocols to communicate and may use the same codes to mean different things they buttons have well-defined meaning and we could map that to input keycodes. Then what is left is to load the proper mapping for particular device into the kernel. This can be done either automatically (when we know the mapping) or with the help of the user (owner of the system). > > > teh > > issue is in mapping raw code to the appropriate keycode. This can be > > done either by lirc config file (when lirc is used) or by some other > > means. > > The desire to map a button press to multiple keystrokes isn't uncommon either, though I presume that's doable within the input layer context too. No, at present we expect 1:1 button->event mapping leaving macro expansion (i.e. KEY_PROG1 -> "do some multi-step sequence" to userspace). -- Dmitry -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html