{"id":22678316,"url":"https://github.com/evilc/titanwrapper","last_synced_at":"2025-03-29T13:12:19.388Z","repository":{"id":71118473,"uuid":"96628037","full_name":"evilC/TitanWrapper","owner":"evilC","description":"A C# wrapper for the Titan One API, with sample AutoHotkey scripts","archived":false,"fork":false,"pushed_at":"2017-07-08T23:03:22.000Z","size":40,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-04T13:44:37.270Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/evilC.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-07-08T15:41:19.000Z","updated_at":"2019-07-07T01:44:43.000Z","dependencies_parsed_at":"2023-07-15T11:02:17.844Z","dependency_job_id":null,"html_url":"https://github.com/evilC/TitanWrapper","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evilC%2FTitanWrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evilC%2FTitanWrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evilC%2FTitanWrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evilC%2FTitanWrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/evilC","download_url":"https://codeload.github.com/evilC/TitanWrapper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246187242,"owners_count":20737462,"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":[],"created_at":"2024-12-09T18:14:45.785Z","updated_at":"2025-03-29T13:12:19.383Z","avatar_url":"https://github.com/evilC.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TitanWrapper\nA C# wrapper for the Titan One API, with sample AutoHotkey scripts\n\n## Usage\n\n### Button and Axis Numbers:\nButtons and axes are assigned numbers, in a manner that tries to remain consistent across devices, and similar to what index the appropriate Windows APIs would identify them as.\n\n| Button Number |    PS3   |   PS4    | XB360 |  XB1  |\n|---------------|----------|----------|-------|-------|\n| 1             | Cross    | Cross    | A     | A     |\n| 2             | Circle   | Circle   | B     | B     |\n| 3             | Square   | Square   | X     | X     |\n| 4             | Triangle | Triangle | Y     | Y     |\n| 5             |  L1      | L1       | LB    | LB    |\n| 6             |  R1      | R1       | RB    | RB    |\n| 7             |  L2      | L2       | LS    | LS    |\n| 8             |  R2      | R2       | RS    | RS    |\n| 9             |  L3      | L3       | Back  | Back  |\n| 10            |  R3      | R3       | Start | Start |\n| 11            | Select   | Share    | Xbox  | Xbox  |\n| 12            |  Start   | Options  |       |       |\n| 13            |   PS     |  PS      |       |       |\n| 14            |          | Touch    |       |       |\n\n| Axis Number | PS3 |  PS4   | XB360 | XB1 |\n|-------------|-----|--------|-------|-----|\n| 1           | LSX | LSX    | LSX   | LSX |\n| 2           | LSY | LSY    | LSY   | LSX |\n| 3           | RSX | RSX    | RSX   | RSX |\n| 4           | RSY | RSY    | RSY   | RSY |\n| 5           | L2  | L2     | LT    | LT  |\n| 6           | R2  | R2     | RT    | RT  |\n| 7           | L2  | L2     | LS    | LS  |\n| 8           | R2  | R2     | RS    | RS  |\n| 9           |     | AccX   |       |     |\n| 10          |     | AccY   |       |     |\n| 11          |     | AccZ   |       |     |\n| 12          |     | TouchX |       |     |\n| 13          |     | TouchY |       |     |\n\n### Setup\n#### C#\nReference the DLL in your project, then:  \n```\n// Instantiate the class\nvar titan = new TitanWrapper.Wrapper();\n```\n#### Autohotkey\nLoad the DLL using the include CLR library by Lexikos:\n```\n; Load CLR library that allows us to load C# DLLs\n#include CLR.ahk\n; Instantiate class from C# DLL\nasm := CLR_LoadLibrary(\"TitanWrapper.dll\")\nglobal titan := asm.CreateInstance(\"TitanWrapper.Wrapper\")\n```\n\n### Setting the state of outputs\n#### C# and Autohotkey\n```\ntitan.SetButton(1, value);\ntitan.SetAxis(1, value);\n```\n\n### Subscribing to inputs\n#### C#\n```\ntitan.SubscribeButton(1, new Action\u003cint\u003e((value) =\u003e {\n    Console.WriteLine(\"Button 1 Value: \" + value);\n}));\n\ntitan.SubscribeAxis(1, new Action\u003cint\u003e((value) =\u003e {\n    Console.WriteLine(\"Axis 1 Value: \" + value);\n}));\n```\n\n#### Autohotkey\n```\ntitan.SubscribeButton(1, Func(\"ButtonEvent\"))\ntitan.SubscribeAxis(1, Func(\"AxisEvent\"))\n\nButtonEvent(state){\n\tTooltip % \"Button 1 Value: \" state\n}\n\nAxisEvent(state){\n\tTooltip % \"Axis 1 Value: \" state\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevilc%2Ftitanwrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevilc%2Ftitanwrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevilc%2Ftitanwrapper/lists"}