GithubHelp home page GithubHelp logo

mm2's Introduction

Add Recognition of Apple Magic Mouse 2 to Ubuntu Trusty

  • The kernel module produced by these tools will not provide anything that the default Ubuntu mouse driver already provides.
  • The MM2 will still only function as a basic 2-button mouse! ... but it WILL be using the hid_magicmouse kernel module.
  • The install script is only tested on Ubuntu Trusty (14.04) LTS. It may work on other relases/distros with appropriate changes. YMMV
  • The script is provided as-is with no guarantee whatsoever.

These tools are intended for use by developers familiar with kernel module development and tinkerers who wish to experiment with the Linux hid_magicmouse kernel module on Ubuntu Trusty. If you are comfortable writing BASH scripts and are familiar with the process for compiling and debugging custom kernels and modules, please read on. Otherwise, STOP HERE, STOP NOW.

Files: 21-apple-magicmouse-vendor-model.hwdb - The hardware db for udev with new vendor and device ids hid-ids.diff - A patch to add the new vendor and device ids as HID devices hid-magicmouse.diff - A patch to allow the hid_magicmouse module to recognise the Magic Mouse 2 magicmouse2_build.sh - Script to build and install the updated module and config files magicmouse2.conf - The modprobe alias file for the Magic Mouse 2 README - This file

In order for the system to recognise the Apple Magic Mouse 2 as a Magic device, we need to ...

  1. Pair the Magic Mouse to the system using the usual Bluetooth methods.
  2. Add the new vendor_id and device_id to the modprobe config and the udev hwdb.
  3. Patch the current hid_magicmouse kernel module and hid-ids header to recognise the new vendor and device ids.
  4. Load (or reload) the hid_magicmouse module after the update.

After step 1, run "./magicmouse2_build.sh" to perform steps 2 through 4.

Uninstall: Read the "magicmouse2_build.sh" script and reverse the steps performed. TL&DR: Restore the contents of the /lib/modules/${KERNEL_VER}/kernel/drivers/hid" dir from the backup. Remove /etc/udev/hwdb.d/21-apple-magicmouse-vendor-model.hwdb

ToDo:

Figure out how to convince the mouse to enable touch features.

Notes:

Device aliases for original Magic Mouse and Trackpad:-

Magic Trackpad: alias hid:b0005g*v000005ACp0000030E hid_magicmouse

Magic Mouse: alias hid:b0005g*v000005ACp0000030D hid_magicmouse

Magic Mouse 2: alias hid:b0005g*v0000004Cp00000269 hid_magicmouse

Output of lsinput for MM2:- /dev/input/event3 bustype : BUS_BLUETOOTH vendor : 0x4c product : 0x269 version : 100 name : "Magic Mouse 2" phys : "xx:xx:xx:xx:xx:xx" uniq : "xx:xx:xx:xx:xx:xx" bits ev : EV_SYN EV_KEY EV_REL EV_ABS EV_MSC

mm2's People

Contributors

biggreenogre avatar

Watchers

James Cloos avatar

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.