Soundgraph iMON PAD vs. Linux 2.6.36

I use a Soundgraph iMON PAD remote control to command my home-theater PC. The remote stopped working when I upgraded my kernel from 2.6.33 to 2.6.36, due to major infrastructure changes that started in 2.6.35. At first I simply reverted to the older kernel but this week I had a few spare hours to figure out what was going on. In short, the iMON driver has been cleaned up by Jarod Wilson and included in the main kernel code base (finally!). Its logic was also standardized to route its output to the Linux input layer rather than to the LIRC daemon. This obviously requires some re-configuration of the daemon, as Jarod explained on the LIRC mailing list.

On my HTPC I had to put the following settings into /etc/lirc/hardware.conf:

DRIVER="devinput"
DEVICE="/dev/input/by-id/usb-15c2_ffdc-event-mouse"

I also had to adjust key codes in /etc/lirc/lircd.conf (note that I only need only six keys for my remote-control software, Offhand; others should simply use Jarod's file):

begin codes
    KEY_BACKSPACE            0x000E
    KEY_COMPOSE              0x007F
    KEY_CONTEXT_MENU         0x01B6
    KEY_ENTER                0x001C
    KEY_KEYBOARD             0x0176
    KEY_SPACE                0x0039
end codes

Finally, I had to adjust the .lircrc file used by Offhand:

begin
      prog = offhand
      button = KEY_CONTEXT_MENU
      config = back
    end
begin
      prog = offhand
      button = KEY_COMPOSE
      config = forward
    end
begin
      prog = offhand
      button = KEY_KEYBOARD
      config = up
      repeat = 1
    end
begin
      prog = offhand
      button = KEY_ENTER
      config = down
      repeat = 1
    end
begin
      prog = offhand
      button = KEY_SPACE
      config = ok
    end
begin
      prog = offhand
      button = KEY_BACKSPACE
      config = cancel
    end

Separately, I also had to configure the iMON driver to forget about its mouse emulation mode. I did it by creating the file /etc/modprobe.d/imon.conf containing

options imon nomouse=1
Proudly powered by Pelican, which takes great advantage of Python.