Holger Waechtler wrote:
Oliver Endriss wrote:
[cut]
Additionally, I'd like to implement multiple keymaps per device.
A user might want to use different remote control units, which use the
same protocol but different device addresses. In this case we need
a keymap per device address.
Since some remote controls transmit on multiple device adresses I'd
prefer a struct { addr, code }, the keycode table would contain the list
of all keycodes on all addresses. This should be more flexible and
easier to code, not?
Example: the infamous ALDI 4688 remote control where 2 devices with
different addresses have to be combined to give unambiguous key codes
for all keys. The { addr, code } approach would be a clean solution for
this problem.
Maybe even simpler: Just use the 12bit RC5 code (or 16/20/24/32bit -
whatever the length of keycode in the used protocol is) directly in the
table. The device address is then just part of the keycode, the toggle
bit will get masked out for protocols that have one.