javax.usb

I read this on a Mac java mailing list:

[quote]…Then there is the Javax USB project (JSR-080), which will eventually be a standard – but again, there is currently no OS X support.

  Just a quick follow-up to my own message, in the event anyone comes around here looking for something similar.

  I've been in contact with a team of engineers over at Sun, along with some other Open Source developers, and it looks like an imminent effort is going to be made to implement javax.usb using the libusb project.  As libusb is available for Mac OS X, this bodes very well for having full USB device access for Java-based applications in the near future.

[/quote]
Could this be a great way to write some JInput plugins?

I had a look at this recently, libusb is pretty low level, writing controllers access with it would be possible but would be a fair bit of work. I guess this is why each OS provider is putting an API on top of controller access…

Kev

For custom USB hardware, yes, for HID complient devices, then the HID support layer over the top of the USB stack would need to be implemented. I suspect that as/when/if javax.usb arrives, then someone (maybe someone here) will write it, then it might make a plugin. However, this assumes all hardware is HID complient and USB. Are all mac keyboards/mice USB devices, and HID complient?, because I know for sure that most PCs, even new ones, come with ps2 mice/keyboards (The new Dells at work for example are ps2 mice and keyboards, although I replaced the mouse with one of my own because it was awfull).

Endolf

All modern Mac keyboards seem to be USB based HID devices. Though it seems that there is some sort of hack to make an older Mac bus thing for keyboards fit into the HID support on a Mac… So scanning the USB bus might actually miss the keyboard on a powerbook for example.

It seems it is time for the PS/2 mouse and keyboard connectors to go away in any case. Though I was more interested in this for support of game-specific controllers. (USB gamepads, driving wheels & pedals, flight yokes, etc.)

USB support would be great… if you were writing HID device drivers in Java!

What you really want is javax.hid isn’t it?

Cas :slight_smile:

See my post above :slight_smile:

Endolf

Yeah, like Endolf says, you would need to add a HID layer on top… but hopefully that could be pure Java on top of javax.usb…