[haiku-development] Re: usb_joy

  • From: "Michael Lotz" <mmlr@xxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Fri, 30 May 2008 22:03:29 +0200

> If we do this what do we have? what can the usb_hid be used for? Do I
> still need to do a Input Device add-on if I would like to use the 
> joystick
> as a mouse?

Well, usb_hid does not correspond to one kind of device. In case of 
KeyboardDevice it is a keyboard, in case of MouseDevice it is a mouse 
and gets published and used as such. The ioctls received by the 
input_server are device type specific. In case of mice there is MS_READ 
in case of keyboards it is KB_READ and in case of joysticks it seems to 
be B_JOYSTICK_* stuff. I suppose this isn't really setup to be handled 
by input_server but a specialized add-on and BJoystick? I really don't 
know as I don't know the input_server side. In any case the joystick 
shouldn't be a used as a mouse IMHO and should not publish itself as 
such to the system. If we implement joystick support through 
input_server then as you mentioned a corresponding add-on could however 
convert that joystick data to mouse movement. Input from someone having 
a more detailed picture of how we're going to implement joystick 
support in general would be helpful here.

Regards
Michael

Other related posts: