{"id":18584370,"url":"https://github.com/mattrasband/ps4","last_synced_at":"2025-04-10T12:30:35.135Z","repository":{"id":68092245,"uuid":"242417624","full_name":"mattrasband/ps4","owner":"mattrasband","description":"Golang library to read evdev events for the Playstation 4 controller","archived":false,"fork":false,"pushed_at":"2020-02-22T22:22:32.000Z","size":6,"stargazers_count":7,"open_issues_count":0,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T21:21:59.592Z","etag":null,"topics":["evdev","golang","linux","playstation-4","raspberry-pi"],"latest_commit_sha":null,"homepage":null,"language":"Go","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/mattrasband.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":"2020-02-22T21:59:41.000Z","updated_at":"2023-01-07T05:19:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"211e04ae-31d9-4bfa-ba1b-3622bd491871","html_url":"https://github.com/mattrasband/ps4","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattrasband%2Fps4","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattrasband%2Fps4/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattrasband%2Fps4/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattrasband%2Fps4/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mattrasband","download_url":"https://codeload.github.com/mattrasband/ps4/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248217123,"owners_count":21066633,"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":["evdev","golang","linux","playstation-4","raspberry-pi"],"created_at":"2024-11-07T00:27:18.936Z","updated_at":"2025-04-10T12:30:35.097Z","avatar_url":"https://github.com/mattrasband.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ps4\n\nA golang library to read from a Playstation 4 controller. This uses evdev, so it is **Linux Only**.\n\n# Usage\n\n```golang\npacakge main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/mrasband/ps4\"\n)\n\nfunc main() {\n\tinputs, err := ps4.Discover()\n\tif err != nil {\n\t\tfmt.Printf(\"Error discovering controller: %s\\n\", err)\n\t\tos.Exit(1)\n\t}\n\n\tvar device *ps4.Input\n\tfor _, input := range inputs {\n\t\tif input.Type == ps4.Controller {\n\t\t\tdevice = input\n\t\t\tbreak\n\t\t}\n\t}\n\n\tctx, cancel := context.WithCancel(context.Background())\n\tdefer cancel()\n\n\tevents, _ := ps4.Watch(ctx, device)\n\tfor e := range events {\n\t\tfmt.Printf(\"%+v\\n\", e)\n\t}\n}\n```\n\n# Development\n\nAny of the `_string.go` files are generated by `go generate`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattrasband%2Fps4","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmattrasband%2Fps4","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattrasband%2Fps4/lists"}