PHPackages                             noccylabs/joystick - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. noccylabs/joystick

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

noccylabs/joystick
==================

Joystick access via /dev/input (linux only)

2311PHP

Since Nov 4Pushed 11y ago1 watchersCompare

[ Source](https://github.com/noccy80/php-joystick)[ Packagist](https://packagist.org/packages/noccylabs/joystick)[ RSS](/packages/noccylabs-joystick/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

noccylabs/joystick: Joystick access via /dev/input
==================================================

[](#noccylabsjoystick-joystick-access-via-devinput)

This is a small library to read connected gamepads via `/dev/input/js0` etc. As it uses `/dev/input` it only supports Linux. It can be used to create configs with keybindings for games, xboxdrv etc.

Install
-------

[](#install)

For development version:

```
$ composer require noccylabs/joystick:dev-master

```

Examples
--------

[](#examples)

Example 1: Using raw events

```
$js = new \NoccyLabs\Joystick\Joystick(0);
echo "Press a button on joystick 0 ... ";
while (true) {
    $raw = $js->getRawEvent();
    if ($raw['type'] & JS_EVENT_BUTTON) {
        echo "Thank you!\n";
        break;
    }
}

```

Example 2: Using the JoystickState

```
$js = new \NoccyLabs\Joystick\Joystick(0);
echo "Press button 1 on joystick 0 ... ";
while ($state = $js->update()) {
    if ($state->getButton(1)) {
        echo "Thank you!\n";
        break;
    }
}

```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/8d64de61943112cad68fd83b1068d157d6c96890d23959855f6a1ea42bcdcce3?d=identicon)[noccy80](/maintainers/noccy80)

---

Top Contributors

[![noccy80](https://avatars.githubusercontent.com/u/1434055?v=4)](https://github.com/noccy80 "noccy80 (8 commits)")

### Embed Badge

![Health badge](/badges/noccylabs-joystick/health.svg)

```
[![Health](https://phpackages.com/badges/noccylabs-joystick/health.svg)](https://phpackages.com/packages/noccylabs-joystick)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
