2009/11/23 Devin Heitmueller <dheitmueller@kernellabs.com>:> Just bear in mind that with the current in-kernel code, users do *not> * have to manually select the RC code to use if they are using the> default remote that shipped with the product.This could still happen, if LIRC checks the identifiers of thereciving device, and has a database that tells it mappings betweenthose devices and the remote controls that shipped with them.However, it occours to me that the IR circumstances map pretty well towhat happens with ps/2 and serial devices now:

1: There are a variety of drivers for serio computer-side hardware,each of which speaks the serio interface to the next-higher level.These corrospond to the drivers for IR recievers.2: There's a raw serio interface, for those wishing to do strange things.3: There's also a variety of things that take data, using the kernelserio API, and decode it into input events -- the ps2 keyboard driver,the basic mouse driver, the advanced mice drivers. This is where theinterface falls down a little bit -- the ps2 keyboard driver is theclosest analogue to what I'm suggesting. The ps2 keyboard drivercreates scancode events, which map nicely to what the keyboard issending -- these are, for ex, rc5 codes. It will also producekey-up/key-down events, if it has a keymap loaded. (This is thedifference with a ps2 keyboard -- a ps2 keyboard gets a map assignedto it at boottime, so it works out-of-box. This isn't really possiblewith an IR remote -- though perhaps rc5 is standarized enough, I don'tthink other protocols neccessarly are.)

Userspace would have to load a keymap; those don't really belong inkernel code. Of course, userspace could look at the deviceidentifiers to pick a reasonable default keymap if it's not configuredto load another, solving the out-of-box experince.