Re: [PATCH] Support for Snapstream Firefly remote added to ati_remote.c

From: Vojtech Pavlik
Date: Wed Sep 22 2004 - 00:09:51 EST


On Tue, Sep 21, 2004 at 12:35:35PM -0700, dylan@xxxxxxxxxxxxxx wrote:

> >> @@ -460,6 +479,7 @@ static void ati_remote_input_report(stru
> >> struct input_dev *dev = &ati_remote->idev;
> >> int index, acc;
> >> int remote_num;
> >> + int ev_type;
> >>
> >> /* Deal with strange looking inputs */
> >> if ( (urb->actual_length != 4) || (data[0] != 0x14) ||
> >> @@ -492,7 +512,9 @@ static void ati_remote_input_report(stru
> >>
> >> if (ati_remote_tbl[index].kind == KIND_LITERAL) {
> >> input_regs(dev, regs);
> >> - input_event(dev, ati_remote_tbl[index].type,
> >> +
> >> + ev_type = ((disable_keyboard) ? 0 : >
> >> ati_remote_tbl[index].type);
> >> + input_event(dev, ev_type,
> >> ati_remote_tbl[index].code,
> >> ati_remote_tbl[index].value);
> >> input_sync(dev);
> >
> > I won't let you abuse the input API this way. Event type 0 is EV_SYN and
> > is reserved for synchronization and configuration change notifications.
> > Definitely not for sending events that look like keystrokes but aren't.
> >
> > There is a nice ioctl, called EVIOCGRAB which will give you what you
> > want (the console won't be receiving the events anymore) without any
> > ugly hacks.
> >
>
> Sorry for the hacks, I'm still learning about how this all works. I was
> just excited that I was able to get it "work" at all, even if it was
> really ugly. ;) I'll look into EVIOCGRAB and touch up the patch before
> thinking about resubmitting again. Thanks for the input!

Ok, I'll be looking forward to your patch. :)

--
Vojtech Pavlik
SuSE Labs, SuSE CR
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/