Skip to content

Commit 312e1dd

Browse files
authored
driver: added support for USB-C Magic Trackpad (#12)
1 parent 025e9ad commit 312e1dd

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

AmtPtpDeviceUsbUm/Hid.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ AmtPtpGetHidDescriptor(
123123
break;
124124
}
125125
case USB_DEVICE_ID_APPLE_MAGICTRACKPAD2:
126+
case USB_DEVICE_ID_APPLE_MAGICTRACKPAD2_USBC:
126127
{
127128
TraceEvents(
128129
TRACE_LEVEL_INFORMATION,
@@ -331,6 +332,7 @@ AmtPtpGetReportDescriptor(
331332
break;
332333
}
333334
case USB_DEVICE_ID_APPLE_MAGICTRACKPAD2:
335+
case USB_DEVICE_ID_APPLE_MAGICTRACKPAD2_USBC:
334336
{
335337
szHidDescriptor = AmtPtpMt2DefaultHidDescriptor.DescriptorList[0].wReportLength;
336338
pSelectedHidDescriptor = AmtPtpMt2ReportDescriptor;

AmtPtpDeviceUsbUm/include/AppleDefinition.h

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,10 @@
5454
#define USB_DEVICE_ID_APPLE_WELLSPRING9_ANSI 0x0272
5555
#define USB_DEVICE_ID_APPLE_WELLSPRING9_ISO 0x0273
5656
#define USB_DEVICE_ID_APPLE_WELLSPRING9_JIS 0x0274
57-
/* MagicTrackpad2 (2015) */
57+
/* Magic Trackpad 2 (2015) */
5858
#define USB_DEVICE_ID_APPLE_MAGICTRACKPAD2 0x0265
59+
/* Magic Trackpad 2 USB C (2024) */
60+
#define USB_DEVICE_ID_APPLE_MAGICTRACKPAD2_USBC 0x0324
5961
/* Apple T2 USB trackpad */
6062
#define USB_DEVICE_ID_APPLE_T2 0x027d
6163

@@ -431,6 +433,19 @@ static const struct BCM5974_CONFIG Bcm5974ConfigTable[] = {
431433
{ SN_COORD, -2479, 2586 },
432434
{ SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION }
433435
},
436+
{
437+
USB_DEVICE_ID_APPLE_MAGICTRACKPAD2_USBC,
438+
USB_DEVICE_ID_APPLE_MAGICTRACKPAD2_USBC,
439+
USB_DEVICE_ID_APPLE_MAGICTRACKPAD2_USBC,
440+
HAS_INTEGRATED_BUTTON,
441+
0, sizeof(struct TRACKPAD_BUTTON_DATA),
442+
0x83, DATAFORMAT(TYPE5),
443+
{ SN_PRESSURE, 0, 300 },
444+
{ SN_WIDTH, 0, 2048 },
445+
{ SN_COORD, -3678, 3934 },
446+
{ SN_COORD, -2479, 2586 },
447+
{ SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION }
448+
},
434449
{
435450
USB_DEVICE_ID_APPLE_T2,
436451
USB_DEVICE_ID_APPLE_T2,

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,7 @@ I'm really happy with the result: the feeling of the MT2 is identical to that of
2727
The imbushuo MT2 USB driver is a UMDF driver. Windows Driver Signature Enforcement does not block the loading of self-signed UMDF drivers. This unfortunately does not apply to KMDF drivers such as the imbushuo bluetooth driver for the MT2 and this is the reason why this project only supports the USB version of the driver. On a personal note I prefer to use the MT2 via USB: the MT2 can be switched between different computers without problems, no worries about the battery, the driver cannot bluescreen the PC and the USB version of the imbushuo driver in particular has proven to be very stable over the years.
2828

2929
When you click on "Install Driver" in the Control Panel, all MT2s connected to the system are disabled and then the AmtPtpDeviceUsbUm.dll file is updated directly in the Windows Driver Store. The owner and ACL of the file are modified to allow copying, and are restored to their original state at the end of the procedure. At the end of the copy, the MT2 is re-enabled. This procedure is not supported by Microsoft, but is commonly used during driver development and does not put system security at risk (as long as the file you are copying is trusted).
30+
31+
**If your Magic Trackpad 2 is with Lightning Port (before Oct 2024), the installation is finished. If it is with USB-C (after Oct 2024) then this further step is necessary:**
32+
33+
Manually choose the drivers in Device Manager for the Human Interface Devices with the Instance Path that matches this: ```USB\VID_05AC&PID_0324&MI_00\***``` & ```USB\VID_05AC&PID_0324&MI_01\***``` to be the Apple USB Precision Touchpad Device (User-mode) by Bingxing Wang (imbushuo). This can be done by double-clicking the device item in Device Manager -> (Details Tab) Update Driver -> Browse my computer for drivers -> Pick from list of drivers -> Uncheck Show compatible hardware.

0 commit comments

Comments
 (0)