{"id":20770383,"url":"https://github.com/jonas-hack/unity-thrustmaster-t16km-hosas-inputsystem","last_synced_at":"2026-04-19T03:06:09.686Z","repository":{"id":189741769,"uuid":"681212651","full_name":"Jonas-Hack/Unity-Thrustmaster-T16KM-HOSAS-InputSystem","owner":"Jonas-Hack","description":"Automatically Differentiate Between Left- \u0026 Right Stick Inputs for HOSAS Use","archived":false,"fork":false,"pushed_at":"2023-11-10T13:46:39.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-11-10T15:09:13.841Z","etag":null,"topics":["flight-simulator","hosas","input-system","joystick-control","t16000m","thrustmaster","unity","unity3d"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Jonas-Hack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-08-21T14:12:14.000Z","updated_at":"2023-12-20T16:37:33.299Z","dependencies_parsed_at":"2023-11-10T14:44:05.041Z","dependency_job_id":"baf06c26-13c9-4b38-b460-9c1550b906c3","html_url":"https://github.com/Jonas-Hack/Unity-Thrustmaster-T16KM-HOSAS-InputSystem","commit_stats":null,"previous_names":["jonas-hack/unity-thrustmaster-t16km-hosas-inputsystem"],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/Jonas-Hack/Unity-Thrustmaster-T16KM-HOSAS-InputSystem","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jonas-Hack%2FUnity-Thrustmaster-T16KM-HOSAS-InputSystem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jonas-Hack%2FUnity-Thrustmaster-T16KM-HOSAS-InputSystem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jonas-Hack%2FUnity-Thrustmaster-T16KM-HOSAS-InputSystem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jonas-Hack%2FUnity-Thrustmaster-T16KM-HOSAS-InputSystem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Jonas-Hack","download_url":"https://codeload.github.com/Jonas-Hack/Unity-Thrustmaster-T16KM-HOSAS-InputSystem/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jonas-Hack%2FUnity-Thrustmaster-T16KM-HOSAS-InputSystem/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264029709,"owners_count":23546523,"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":["flight-simulator","hosas","input-system","joystick-control","t16000m","thrustmaster","unity","unity3d"],"created_at":"2024-11-17T12:09:09.212Z","updated_at":"2026-04-19T03:06:09.645Z","avatar_url":"https://github.com/Jonas-Hack.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Unity-Thrustmaster-T16KM-HOSAS-InputSystem\n Automatically Differentiate Between Left- \u0026 Right Stick Inputs for HOSAS Use\n\n## Purpose\nBy default Unity does not recognize the difference between left- and right handed fight sticks.\nThere is however a suitable system for *XR-Controllers* in the form of `Configuration Usage Tags`.\n\nThese scripts automatically assign a side to *Thrustmaster T16000M* sticks by reading the value of the little switch on the bottom.\n\nAdditionally the sides get updated automatically at runtime, should the switch be flipped again - or another device be plugged in.\n\n# Usage\n\nJust place the scripts somewhere in your project.\n\n## Usage in Input Action UI\n\nIn the *Input Actions* Window, for each binding - the side can be chosen:\n\n```\u003cHID::Thrustmaster T.16000M\u003e{leftHand}/stick```\n\n\n```\u003cHID::Thrustmaster T.16000M\u003e{rightHand}/hat```\n\n\n## Usage in Code\n\nAdditionally the value of ```leftRightSwitch```can be read directly:\n````\n        // https://docs.unity3d.com/Packages/com.unity.inputsystem@1.0/api/UnityEngine.InputSystem.InputAction.html\n        InputAction changeHandAction = new InputAction(binding: \"\u003cHID::Thrustmaster T.16000M\u003e/leftRightSwitch\");\n        changeHandAction.performed += (_ =\u003e foo()); // Right Side\n        changeHandAction.canceled += (_ =\u003e bar());  // Left Side\n        changeHandAction.Enable();\n````\nThough I see no reason to do so.\n\n**NOTE:** To get notified of *ANY* change in stick side, use `InputActionType.PassThrough`.\n\n## Support for other Joysticks\n\nFor now this *ONLY* works for *Thrustmaster T16000M* joysticks. However, support for other sticks can be added:\n\nAnalogous to ``SidedTM16KM.cs``:  \n1. Create an Input **Layout Override**\n2. Add a **binding** using the `SidedStickInitialize` Attribute\n3. Create a **registerStick** method\n4. Add the method using the `SidedStickRegistrate` Attribute\n\nIf you do so, please create a pull request, so we can all benefit.\n\n## Acknowledgements\n\nThis was originally based on two Unity Forum posts: [1](https://forum.unity.com/threads/two-identical-joysticks.639691/), [2](https://forum.unity.com/threads/t-16000m-read-left-hand-right-hand-switch.873124/), though some quality of life features, as well as some bug-fixes, are entirely my own.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonas-hack%2Funity-thrustmaster-t16km-hosas-inputsystem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonas-hack%2Funity-thrustmaster-t16km-hosas-inputsystem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonas-hack%2Funity-thrustmaster-t16km-hosas-inputsystem/lists"}