Index: [thread] [date] [subject] [author]
  From: Jason McMullan <jmcc@ontv.com>
  To  : Brad Midgley <brad@pht.com>
  Date: Tue, 29 Sep 1998 16:35:00 -0400 (EDT)

Re: multi adb keyboard

'Brad Midgley wrote with particular insight...'
> would it make sense for me to help with powermac input drivers in the
> meantime? would it be parallel to what you're doing?

  Yes - that would be wonderful! My latest kernel patch (which 
I'll try to get out tonight) has the beginnings of some work
on the Mac mouse and keyboard driver. This are much simplified
for input device writers now:

  a) On device init, call `ev_input_create("device-name")' and
    store the handle you get back for each device you want
    to manage (ie, all 16 ADB addresses, etc)

  b) When you need to send off a keystroke/mouse event/etc,
     call one of the functions (which ARE safe to call during
     an interrupt - they just stuff a buffer and tell the kernel
     to run a backhandler when it can - but you SHOULD implement
     your own backhandler!):

int ev_input_but_press(evi handle,int button); /* Aka keysym  */
int ev_input_but_release(evi handle,int button); /* Aka keysym  */

int ev_input_ptr_rel(evi handle,int dx,int dy);
int ev_input_ptr_abs(evi handle,int x,int y);

int ev_input_val_rel(evi handle,int id_start,int id_len,int *vals);
int ev_input_val_abs(evi handle,int id_start,int id_len,int *vals);

  c) When you're input handler is ready to `give up the ghost'
     (ie, rmmod), just make sure to call `ev_input_destroy(evi handle)'


  What this does is create a `pseudo filter' that handles transmission
of the input events and proper back-handling for after interrupts.

  Does this look good to ya'll?

> i noticed the latest adb drivers readdress conflicting devices but still
> merge all keyboards into one device, all mice into one device...

  Evil, isn't it? 
 
> i'm using the vger (cvs) kernel if that makes any difference.


-- 
Jason McMullan - Linux - GGI - http://pepsi.visus.com/~jmcc
  I can't wait until the point where free Linux CD's or other paraphenalia is 
included in cereal boxes.  That truly will be the cherry ontop of our madness!
  -- Mike A. Harris <mharris@ican.net> on linux-kernel@vger.rutgers.edu

Index: [thread] [date] [subject] [author]