{"id":19128757,"url":"https://github.com/lebogoo/linux-joystick","last_synced_at":"2025-11-12T18:01:32.975Z","repository":{"id":65525281,"uuid":"510444832","full_name":"LeBogoo/linux-joystick","owner":"LeBogoo","description":"A simple package to get joystick/gamepad information via linux device files, without any dependencies and prebuilt binaries.","archived":false,"fork":false,"pushed_at":"2022-07-04T19:24:57.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-14T08:35:55.422Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/linux-joystick","language":"JavaScript","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/LeBogoo.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}},"created_at":"2022-07-04T17:18:08.000Z","updated_at":"2022-07-04T17:20:52.000Z","dependencies_parsed_at":"2023-01-27T08:05:13.535Z","dependency_job_id":null,"html_url":"https://github.com/LeBogoo/linux-joystick","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/LeBogoo%2Flinux-joystick","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeBogoo%2Flinux-joystick/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeBogoo%2Flinux-joystick/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeBogoo%2Flinux-joystick/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LeBogoo","download_url":"https://codeload.github.com/LeBogoo/linux-joystick/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240199243,"owners_count":19763825,"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-11-09T06:05:28.569Z","updated_at":"2025-11-12T18:01:27.955Z","avatar_url":"https://github.com/LeBogoo.png","language":"JavaScript","readme":"# linux-joystick\n\nA simple package to get joystick/gamepad information via linux device files, without any dependencies and prebuilt binaries.\n\n## Installation\n\n```\nnpm install linux-joystick\n```\n\n## Usage\n\n```js\nconst { JoystickDevice, listDevices } = require(\"linux-joystick\");\n\nconst devicePath = listDevices()[0];\nconst joystick = new JoystickDevice(devicePath);\n\njoystick.on(\"button_pressed\", (event) =\u003e {\n  console.log(\"Pressed button:\", event);\n});\n```\n\n### Methods:\n\n- getButton(number)\n- getAxis(number)\n\n### Events:\n\n- button_changed\n- axis_changed\n- button_pressed\n- button_released\n- button_init\n- axis_init\n\n### Helper functions\n\n- listDevices() -\u003e Returns an array with all joystick/gamepad devices.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flebogoo%2Flinux-joystick","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flebogoo%2Flinux-joystick","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flebogoo%2Flinux-joystick/lists"}