{"id":20147338,"url":"https://github.com/gdsports/xac-mouse2joy","last_synced_at":"2025-06-25T18:10:42.817Z","repository":{"id":130716440,"uuid":"160107082","full_name":"gdsports/xac-mouse2joy","owner":"gdsports","description":"Xbox Adaptive Controller Mouse to Joystick Converter","archived":false,"fork":false,"pushed_at":"2018-12-12T19:21:10.000Z","size":396,"stargazers_count":12,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-09T19:46:46.610Z","etag":null,"topics":["arduino","gamepad","joystick","mouse","teensy","touchpad","trackball","xac","xbox","xbox-adaptive-controller"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gdsports.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-12-02T23:34:31.000Z","updated_at":"2024-09-19T23:10:48.000Z","dependencies_parsed_at":"2023-06-01T13:15:52.050Z","dependency_job_id":null,"html_url":"https://github.com/gdsports/xac-mouse2joy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gdsports/xac-mouse2joy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gdsports%2Fxac-mouse2joy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gdsports%2Fxac-mouse2joy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gdsports%2Fxac-mouse2joy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gdsports%2Fxac-mouse2joy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gdsports","download_url":"https://codeload.github.com/gdsports/xac-mouse2joy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gdsports%2Fxac-mouse2joy/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261927623,"owners_count":23231380,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arduino","gamepad","joystick","mouse","teensy","touchpad","trackball","xac","xbox","xbox-adaptive-controller"],"created_at":"2024-11-13T22:28:39.623Z","updated_at":"2025-06-25T18:10:42.746Z","avatar_url":"https://github.com/gdsports.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mouse to Joystick for Xbox Adaptive Controller\n\nThe Microsoft Xbox Adaptive Controller (XAC) ignores all USB HID devices except\nfor joysticks. This project converts USB HID mouse messages into USB HID\njoystick messages. This allows the use of USB mice, track balls, and some\ntouchpads. For example,\n[this](https://perixx.com/perixx-peripad-501ii-wired-usb-touchpad-black-86x75x11mm-dimension-fit-with-industrial-professional-use.html)\nsmall touchpad works. Large touchpads usually require custom device drivers\nso are not USB HID mouse compatible so will not work with this project.\n\nNOTE: Using joysticks, keyboards, mice, track balls, etc. with consoles is not\nnew. If you do not need the XAC for button and switch inputs, consider the\nfollowing alternatives. Or use one of the following with an XAC if you do not\nwant to bother with building this project. I have not used any of them so you\nwill have to investigate on your own.\n\n* The [GIMX](https://gimx.fr) open source project.\n* [CronusMax](https://cronusmax.com/)\n* [Titan Two](https://www.consoletuner.com/)\n* [Xim APEX](https://xim.tech/)\n\n![XAC with touchpad](./images/mouse2joy_overview.jpg)\n\n## Features\n\n* Mouse/track ball/touch pad movement maps to the right thumbstick.\n* Primary/Left mouse button maps to gamepad X button.\n* Secondary/Right mouse button maps to gamepad Y button.\n* If present, third button maps to gamepad Right Bumper.\n* If present, fourth button maps to gamepad Right Stick.\n* The button mapping can be change by a configuration file stored on a micro SD card.\n\n## Configuration file on micro SD card\n\nCreate a file on a micro SD card at the top level with the name MSE2JOY.JSN\nand put the following three lines in the file.\n\nDefault button mapping.\n```\n{\n \"mapMouseButtons\": [ 4, 5, 3, 2, 6, 7, 0, 1 ]\n}\n```\n\nXbox Button Name| Xbox Button Number\n----------------|-------------------\nView            | 0\nMenu            | 1\nright stick     | 2\nright bumper    | 3\nX               | 4\nY               | 5\nX1              | 6\nX2              | 7\n\nThe default mapping means the first mouse button (usually the primary/left\nbutton) maps to the Xbox button 4 which is the X button. The second mouse\nbutton (usually the secondary/right button) maps to the Xbox button 5 which is\nthe Y button.\n\n## Hardware components\n\n* 1 x PJRC Teensy 3.6 board (t36)\n* 1 x PJRC USB host cable\n* 1 x USB mouse, track ball, touch pad, etc. of your choice\n* Breadboard, headers, wire, etc.\n\nThe only soldering required is to attach the 5 pin header for the USB host\ncable. The other pins are not used.\n\n## Software\n\n* mouse2joy -- Mouse to joystick converter\n\n## Software build enviroment\n\n### Arduino IDE 1.8.7 and Teensyduino 1.44\n\n* Install Arduino IDE 1.8.7. Follow the instructions at arduino.cc.\n* Install TeensyDuino 1.44. Follow the instructions at pjrc.com.\n* Install the ArduinoJson library using library manager. Use the latest 5.x\n  version which is 5.13.3 as of this writing. Do not use the 6.x beta version.\n* Unzip the patches for the joystick (joystick_teensy_20181201.zip) over the\n  TeensyDuino files.\n* Set the board type to Teensy 3.6 and the USB Type to Joystick + Serial. The\n  joystick options with keyboard and mouse do not work with the XAC.\n* Upload mouse2joy.ino to the t36.\n\n### Arduino IDE 1.8.8 and Teensyduino 1.45\n\n* Install Arduino IDE 1.8.8. Follow the instructions at arduino.cc.\n* Install TeensyDuino 1.45. Follow the instructions at pjrc.com.\n* Install the ArduinoJson library using library manager. Use the latest 5.x\n  version which is 5.13.3 as of this writing. Do not use the 6.x beta version.\n* Unzip the patches for the joystick (joystick_teensy_1.45_20181212.zip) over\n  the TeensyDuino files.\n* Set the board type to Teensy 3.6 and the USB Type to Joystick + Serial. The\n  joystick options with keyboard and mouse do not work with the XAC.\n* Upload mouse2joy.ino to the t36.\n\n\n## How to use it\n\nPlug the mouse, track ball, touchpad, etc. into the t36 USB host cable. Plug\nthe t36 into the XAC right USB port using a micro USB cable. Moving the mouse\nshould now be equivalent to moving the right thumb stick. If the device\nrequires more power than the XAC can provide, unplug the mouse and plug a\npowered USB hub into the t36 USB host port. Plug the mouse into the powered\nhub. This is necessary for a Kensington Expert track ball. Other large devices\nor devices with LEDs may also require extra power. Another possible solution is\nto use the optional XAC power supply.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgdsports%2Fxac-mouse2joy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgdsports%2Fxac-mouse2joy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgdsports%2Fxac-mouse2joy/lists"}