drivers/lirc_imon/lirc_imon.c | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-) diff --git a/drivers/lirc_imon/lirc_imon.c b/drivers/lirc_imon/lirc_imon.c index bd545f1..92388a9 100644 --- a/drivers/lirc_imon/lirc_imon.c +++ b/drivers/lirc_imon/lirc_imon.c @@ -1369,6 +1369,10 @@ static void imon_incoming_packet(struct imon_context *context, rel_y |= ~0x0f; rel_y = rel_y + rel_y / 2; right_shift = 2; + /* some ffdc devices decode mouse buttons differently... */ + } else if (context->ffdc_dev && (buf[0] == 0x68)) { + mouse_input = 1; + right_shift = 2; /* ch+/- buttons, which we use for an emulated scroll wheel */ } else if (!memcmp(buf, ch_up, 4)) { mouse_input = 1; @@ -1385,7 +1389,7 @@ static void imon_incoming_packet(struct imon_context *context, "is NULL!\n", __func__); return; } - dprintk("sending mouse data via input subsystem\n"); + //dprintk("sending mouse data via input subsystem\n"); if (dir) { input_report_rel(mouse, REL_WHEEL, dir); @@ -1396,6 +1400,13 @@ static void imon_incoming_packet(struct imon_context *context, input_report_key(mouse, BTN_LEFT, buf[1] & 0x1); input_report_key(mouse, BTN_RIGHT, buf[1] >> right_shift & 0x1); + if (debug) { + printk("sending mouse buttons: "); + for (i = 0; i < len; ++i) + printk("%02x ", buf[i]); + printk("\n"); + } + } input_sync(mouse); return;