{"id":20604076,"url":"https://github.com/ardean/jsgamepad","last_synced_at":"2026-06-09T14:31:16.743Z","repository":{"id":57284374,"uuid":"81135235","full_name":"ardean/jsGamepad","owner":"ardean","description":":video_game: W3C Gamepad API Simplified \u0026 Implementation fixes","archived":false,"fork":false,"pushed_at":"2017-05-18T10:28:36.000Z","size":176,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-18T13:05:07.258Z","etag":null,"topics":["fixes","gamepad","gamepad-api","gamepad-library","jsgamepad","w3c","w3c-gamepad","w3c-gamepad-api"],"latest_commit_sha":null,"homepage":"https://ardean.github.io/jsGamepad/","language":"JavaScript","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/ardean.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}},"created_at":"2017-02-06T21:26:13.000Z","updated_at":"2023-09-08T17:20:33.000Z","dependencies_parsed_at":"2022-09-16T22:40:36.140Z","dependency_job_id":null,"html_url":"https://github.com/ardean/jsGamepad","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/ardean%2FjsGamepad","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ardean%2FjsGamepad/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ardean%2FjsGamepad/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ardean%2FjsGamepad/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ardean","download_url":"https://codeload.github.com/ardean/jsGamepad/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242250336,"owners_count":20096891,"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":["fixes","gamepad","gamepad-api","gamepad-library","jsgamepad","w3c","w3c-gamepad","w3c-gamepad-api"],"created_at":"2024-11-16T09:20:33.318Z","updated_at":"2026-06-09T14:31:16.713Z","avatar_url":"https://github.com/ardean.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jsGamepad\n[![NPM Version][npm-image]][npm-url]\n[![NPM Downloads][downloads-image]][downloads-url]\n[![License][license-image]][license-url]\n\n**W3C Gamepad API Simplified \u0026 Implementation fixes**\n\n[Demo](https://ardean.github.io/jsGamepad/)\n\n## Specification\n[Gamepad API, W3C](https://w3c.github.io/gamepad/)\n\n## Fixes\n\nThis lib fixes a bug in Chrome, where the `connected` event will be emitted instead of the `disconnected` event.\n\n## Usage\n\nI suggest you to use [jspm](http://jspm.io/) as your package manager.\n\n```js\nimport gamepad from \"jsgamepad\";\n\ngamepad.on(\"connected\", (gamepad) =\u003e {\n  console.log(\"connected \" + gamepad.index);\n}).on(\"disconnected\", (gamepad) =\u003e {\n  console.log(\"disconnected \" + gamepad.index);\n}).on(\"buttonPressed\", ({ button, buttonIndex, gamepad }) =\u003e {\n  console.log(\"pressed \" + buttonIndex);\n}).on(\"buttonReleased\", ({ button, buttonIndex, gamepad }) =\u003e {\n  console.log(\"released \" + buttonIndex);\n});\n\n// start loop for buttons and axes detection\ngamepad.watch();\n```\n\n### Directly in a browser\n\nPlease checkout the [index-dist.html](https://ardean.github.io/jsGamepad/index-dist.html) file for direct usage in a browser.\n\n## TODO\n\n- API\n\n## License\n\n[MIT](LICENSE)\n\n[npm-image]: https://img.shields.io/npm/v/jsgamepad.svg\n[npm-url]: https://npmjs.org/package/jsgamepad\n[downloads-image]: https://img.shields.io/npm/dm/jsgamepad.svg\n[downloads-url]: https://npmjs.org/package/jsgamepad\n[license-image]: https://img.shields.io/npm/l/jsgamepad.svg\n[license-url]: LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fardean%2Fjsgamepad","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fardean%2Fjsgamepad","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fardean%2Fjsgamepad/lists"}