Git Product home page Git Product logo

magictrackpad2forwindows's Introduction

This is the Precision Touchpad driver for the Magic Trackpad 2 that I personally use on my PCs. It is based entirely on the excellent imbushuo driver and solves a number of problems explained in the "Context" section below. This is an image of the Control Panel: (each option is an additional feature built on top of the "vanilla" imbushuo driver)

Control Panel

Context

In terms of hardware, the Magic Trackpad 2 is the best external touchpad you can buy (not just for macOS), by far. In terms of software, specifically for Windows, AFAIK there are 4 options to use it: Trackpad++, Magic Utilities, the excellent open source driver by imbushuo and the official 2021 Apple driver. In my opinion the two options that offer the best feeling, experience and stability (using the MT2 via USB at least) are the last two (imbushuo and Apple drivers) which coincidentally are extremely similar according to my tests (in terms of "feeling", and they are the only 2 that present the MT2 as a Precision Touchpad to Windows). Unfortunately these two solutions present different pointer precision problems. One problem is that of "near field fingers", i.e. the trackpad registers movements and clicks even without physically touching the trackpad surface, at a distance of even one millimeter from the surface. Another issue (determined by the first) is the accuracy of the pointer when you lift your finger from the trackpad. Furthermore, AFAIK, with both the imbushuo driver and the Apple one, it is not possible to adjust the behavior of the haptic feedback.

A few months ago, I discovered this excellent PR of 1Revenger1 to the imbushuo repo (which unfortunately hasn't been updated for 3 years). This PR solves the "near field fingers" problem. It also removes the QueryPerformanceCounter call in the interrupt function, instead setting the timestamp of the reports to the value returned by the Magic Trackpad itself (this may seem secondary but it is important, since using the MT2 in conditions of heavy PC load can determine returning inaccurate timestamps due to delayed thread scheduling). This PR convinced me that it might be worth investing some time in trying to solve all the other problems that made using MT2 more uncomfortable on PC than on macOS: I added the Control Panel, the ability to control the MT2's haptic feedback and other pointer precision options which I personally found useful.

I'm really happy with the result: the feeling of the MT2 is identical to that of the touchpad of my laptop and very similar to that of the MT2 when used in macOS (pointer acceleration is different, but this is not determined by the driver).

Additional Credits: The haptic feedback control messages sent by the driver to the MT2 in this project are based on the excellent reverse engineering work of dos1 (here).

License: This project has the same license as the imbushuo project, on which it is entirely based.

Installation

NOTE: Only for the MT2 when connected via USB! Bluetooth not supported. ARM64 not supported (at the moment).

  1. Connect the MT2 to the PC via USB and first install the imbushuo driver: download this file, unzip it, right-click on the INF file and click "Install".

  2. Download the two files of this project from the Releases of this repo (save them in the same directory), start the Control Panel and click on "Install Driver".

How the Installation Works

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.

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).

magictrackpad2forwindows's People

Contributors

vitoplantamura avatar

Stargazers

 avatar Paul Klauser avatar  avatar  avatar Xiaonan Fu avatar  avatar  avatar Go Kudo avatar  avatar  avatar  avatar Brian Bautista avatar  avatar  avatar Mohamed Saher avatar y-natani avatar Danny Huynh avatar Ken Hutchinson avatar  avatar Alexander Dahl avatar Nicolas Lacombe avatar Luke Walker avatar fzawa5 avatar Igor avatar Valentin avatar

Watchers

Nicolas Lacombe avatar  avatar  avatar Igor avatar

magictrackpad2forwindows's Issues

Haptic feedback click on simple tap

Hi vito,
It's great that you've been able to take up and improve on the work that's already been done to create this version, I installed it yesterday and I still don't have enough hindsight to give relevant feedback, but it's much appreciated and much more usable, I had tried to build the project under VS some time ago but without too much success.

Do you know if it's possible with existing hardware to get haptic feedback with a simple tap, for a possible next version, or if the “physical” click is required?

Thanks !!!

[Feature Request] Disable the two finger back/forward gesture

Would it be possible to add controls in the control panel to disable the two finger gesture for swipe back and forward. I am regularly, accidentally, going back on the browser. Usually after completing some long winded form...

Generally though this is fantastic. Thank you for the work!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.