On 17 Jul 2009, at 23:49, Kassen wrote:
I'm looking on http://en.wikipedia.org/wiki/USB_human_interface_device_class The HID protocols are evidently only for USB connections.
Well, yes, strictly speaking. However I have been using PS/2 keyboards with ChucK for quite a while (because my favourite keyboards pre-date the USB standard) and have never had a issue with those under ChucK. I'd also like to point out that if this device were completely unlike a HID device the ChucK HID abstraction should be unable to open it. Instead it dutifully reports it's a PS/2 device. My issue is that it does get opened as a mouse but that it doesn't give any data. If ChucK would say "Hey, I see no USB mouse so you can't have a HID abstraction of any mouse at all." it'd have to admit that that would be inconvenient yet fair.
I checked in a program the HID variables for the mouse and trackpad are the same X-Axis Y-Axis. But 'chuck' probably just calls some interface that is available on the OS. That is how it works on Mac OS X. So if the OS admits PS/2 devices, then should feed some information into that interface, which is what 'chuck' then reports.
I'm not familiar with the Mac situation, having never owned one, but this is a bog-standard setup for non-Mac laptops. I believe it even makes sense as supposedly PS/2 has some advantages over USB for mice in how it uses system bus bandwith. We'd need to consult a hardware expert to verify that; I certainly don't know that much about motherboard architecture or OS design.
Though some older protocols like SCSI have advantages over more modern, consumer friendly ones like USB, I don't there are any system bus issues for these, as one has some intermediate hardware that provides the communication. In the 1970s I assembled a computer, that wrote the keyboard characters directly into memory, which the CPU checked in a loop. This is highly inefficient way to handle it.
This might also be limited by factors like maximum poll-rate and resolution;
For the USB keyboards I have checked, this seems to be limitation of the keyboard, that is, even before the data is sent to the computer. This is because it differs with the keyboard. The computer is so fast that it easily can handle any human typed key roll-over. The slow USB 1 bus is on about 12 Mb/s, which should admit for tens of thousands of key stroke in a tenth of a second. When experimenting with the diatonic key map, the problem is mostly due to other process running. One notorious one is looking for RSS feeds.
I'm not sure but I don't think trackpad makers are very concerned with those factors; these are hardly expensive high-performance interface devices.
Interestingly; according to ChucK there is a second mouse device here that can be opened which looks like a emulation layer for macintosh mice. I have no idea what that's doing there and why but it's not giving me any useful signals either. I could look up the exact name if that would be relevant but I would suspect it's simply there in case Ubuntu would be installed on a Macbook. Maybe Apple instead uses a internal USB bus or something else altogether.
I think I tried a Mac keyboard once on a Windows, finding it not working. One needs to have a driver installed. Each device may require its own. The USB HID interface unifies those, so that only one driver is needed, which then can be supplied by the OS. The latest version of this USB HID interface or standard was issued this year. So perhaps it was not available when 'chuck' was written. Hans