-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ADB: Mouse Handler #725
Comments
Device handler and Data bytes
Apple Classic Mouse ProtocolData length is 2. Some mouses misuse
Note that Right button is ignored by default #724 Apple Desktop Bus Mouse II FCC:BCGM2706
NeXT MouseThis mouse sends 'optional second button' but will be ignored.
https://geekhack.org/index.php?topic=14290.msg3119857#msg3119857 Apple Extended Mouse ProtocolData length can be 2-5 bytes
Kensington Turobo Mouse 5 / Thinking MouseData length is 3. Compatible with Extended protocol.
XY range: -126 to 126?
Turbo Mouse 5:
Thinking Mouse:
https://geekhack.org/index.php?topic=14290.msg3117929#msg3117929 Macally 2-button mouseData length is 4. Byte 2 and 3 are unchanged and not compatible with Extended protocol.
Logitech TrackmanData length is 3. Register 1 Info : [9A 21 92 F1 3C 3B 81 38] is not compatible with Apple Extended protocol.
Note that 0x4C is pseudo handler ID for TrackMan in TMK, real ID is still 0x04. https://geekhack.org/index.php?topic=14290.msg3119277#msg3119277 Logitech MouseMan(Apple Extended)Data length is 3.
https://geekhack.org/index.php?topic=14290.msg3119597#msg3119597 Logitech MouseMan Cordless(Apple Extended)Data length is 3.
https://geekhack.org/index.php?topic=14290.msg3119857#msg3119857 Contour Mouse
This works well without driver. middle button works as 'click lock' and right button as 'speed change'.
https://geekhack.org/index.php?topic=14290.msg3119277#msg3119277 Now works well with driver code in TMK.
https://geekhack.org/index.php?topic=14290.msg3119597#msg3119597 Microspeed MacTRACNot confirmed. Data length is 4?(netbsd)
old version?
https://geekhack.org/index.php?topic=14290.msg3085381#msg3085381 Mouse Systems A3 Mouse/TrackballNot confirmed. Data length is 3?(netbsd)
CH Products Trackball ProNot confirmed.
|
Mouse button mapping
ADB Mouse Button mapping in TMK(USB HID)
Linux/NetBSD driverThe drivers seem to map like below.
Apple Classic MouseClassic Mouse driver(Handler ID: 1 and 2) supports only one button and 'optional sencond button' is ignored. Apple Extended MouseOSX Apple Extended Mouse(Handler ID: 4) diriver maps second button to right and third to middle in the result.
TODO
|
copied from wiki: https://github.com/tmk/tmk_keyboard/wiki/Apple-Desktop-Bus ADB Deivce Specific InfoMicrospeed MacTrac new firmwareTMK ADB-USB Converter supports this device. Trackball with 3 buttons, which sends data like below after proper setup apparently.
MacTrac 2.0 with old firmware doesn't seem to support Microspeed specific 3-button protocol above. MacTrac Deluxe and later version(after Dec 1995) of MacTrac 2.0 should support the protocol. Kensington Turbo MouseTMK ADB-USB Converter supports this trackball and its 4 buttons can be used. NetBSD driver:
Linux driver: Configuration Bytes
|
Microspeed TrackballMy goal is adding support for Mac TRAC, which has some variants. Manufacturing dateIt seems to be indicated in
https://web.archive.org/web/20030823173953/http://www.microspeed.com/pages/support/supfaq.html Mac TRAC variants
Mac TRAC 2.0 with old firmwareFCCID: FUUTB02 (1990-04) M/D: 9226 M/D: 9427 M/D: 9302 M/D: 9524 Mac TRAC 2.0 with new firmwareFCCID: FUUTB02 This is compatible with new Control Panel that programs buttons. M/D:9707-PD350 Mac TRAC DeluxeFCCID: FUUTB02 (1990-04) This is compatible with new Control Panel that programs buttons. M/D: 9937-PD370 M/D: 9705-PD370 "Includes Control Panel Software to allow you to program the three trackball buttons to perform application specific functions" Kid TRAC Mac PD-380KidTRAC PC FCC ID: FUU4TGMAP1 1996-03 MicroSpeed Releases the KidTRAC(TM) Trackball "Both left and right button act as primary button. Center button is Drag Lock." Kid Trac does not support programmable buttons probably. Micro TRACFCCID FUUMTRAC01 "The Macintosh version includes MicroSpeed's Control Panel Software new vs old firmwareNew firmware was available after Dec 1995. On Mac TRAC 2.0 with old firmware, left click on right button and drag lock on center button. On Mac TRAC 2.0 with new firmware and Deluxe, to make right button useful needs proprietary command sequence. With new firmware center button works as right click by default? Control PanelMicroSpeed Ships New Mac Control Panel Software
FCCIDFUU4TGQUAD1 (1989-03) https://fcc.report/FCC-ID/FUU4TGQUAD1/
FUUTB02 (1990-04) https://fccid.io/FUUTB02 ResourcesModel list: Download: |
I tested with MacTRAC 2.0(old firmware) labeled as: It does not recognize the command sequece, buttons work as two left click button and drag lock.
when there is no button and no move event(IDLE): when Left button is depressed: when right button is depressed: when center button is hold: when center button is hold and left button is depressed: when center button is hold and right button is depressed: when center button is hold and left and right button is depressed: when left and right button is depressed: right button can be discreminated from left button. There is no movement event while center button is depressed. On classic Mac(without tool/driver) this devices would have two left clicks on right and left button and 'drag lock' on center button. With TMK converter it can have right click on right button now. bd6e208 |
References
NetBSD
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/macppc/dev/ams.c?rev=1.31
Linux
https://elixir.bootlin.com/linux/v5.17/source/drivers/macintosh/adbhid.c
OpenBSD
https://github.com/openbsd/src/blob/94712de55c5b4bdbaec3eebf1d8a959bab2c2fe7/sys/dev/adb/ams.c
https://github.com/openbsd/src/blob/ac86860c81a0c162ea59c4454387b3f4c75999e1/sys/arch/macppc/dev/ams.c
Apple OSS
Classic Mouse protocol:
https://github.com/apple-oss-distributions/AppleADBMouse/blob/AppleADBMouse-212/AppleADBMouse.cpp#L146-L163
Note that 'optional second button' is ignored here.
Extended Mouse protocol:
https://github.com/apple-oss-distributions/AppleADBMouse/blob/AppleADBMouse-212/AppleADBMouse.cpp#L475-L525
ADB Pointing Devices
http://www.netbsd.org/ports/mac68k/info/netbsd-mac68k.html#adb-devices
The text was updated successfully, but these errors were encountered: