PHPackages                             dept-of-scrapyard-robotics/sdl3-input - 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. dept-of-scrapyard-robotics/sdl3-input

ActiveLibrary

dept-of-scrapyard-robotics/sdl3-input
=====================================

SDL3 keyboard, mouse, touch, and game controller inputs for ScrapyardIO

0.6.0(today)00MITPHPPHP ^8.4|^8.5|^8.6

Since Jul 30Pushed todayCompare

[ Source](https://github.com/DeptOfScrapyardRobotics/sdl3-input)[ Packagist](https://packagist.org/packages/dept-of-scrapyard-robotics/sdl3-input)[ Docs](https://dosr.projectsaturnstudios.com)[ RSS](/packages/dept-of-scrapyard-robotics-sdl3-input/feed)WikiDiscussions 0.6.x Synced today

READMEChangelogDependencies (8)Versions (3)Used By (0)

SDL3 Input
==========

[](#sdl3-input)

Poll-based SDL3 keyboard, mouse, touch, and game-controller circuits for ScrapyardIO.

`SDLInputEventHub` is the sole owner of SDL's global event queue. Poll the hub (or any of its circuit-backed inputs) once per frame. It fans each event out to the relevant stateful input and to optional listeners before freeing it.

Circuit aliases:

- `sdl3-input`
- `sdl3-keyboard`
- `sdl3-mouse`
- `sdl3-touch`
- `sdl3-game-controller`

Display gating
--------------

[](#display-gating)

Sketches and the shared display event-pump bridge activate **only** when `dept-of-scrapyard-robotics/sdl3-display` is installed. Alone, this package registers circuits/actuators but does not open windows or steal the SDL queue from a display.

When both packages are present, display presentation pumps through the shared owner and cannot steal keyboard, pointer, touch, or controller events.

Controller notes (ext-sdl3 0.5)
-------------------------------

[](#controller-notes-ext-sdl3-05)

`sdl3-display` only boots `SDL_INIT_VIDEO`. The hub calls `Init::initSubSystem(SDL_INIT_GAMEPAD)` on poll, syncs already-connected pads, and samples sticks/buttons via `Gamepad::getGamepadAxis` / `Gamepad::getGamepadButton`.

ext-sdl3's `SDLReadEvent` does **not** implement `jdevice` / `gdevice` / `gaxis`/ `gbutton` (unsupported keys free the event and throw). Joystick/gamepad queue events are decoded from `getEventDescription()` instead.

Visual demos
------------

[](#visual-demos)

```
php workshop sketch sdl3-keyboard-input
php workshop sketch sdl3-mouse-input
php workshop sketch sdl3-controller-input
```

Each demo opens an SDL3 windowed UI via `Visual::display('windowed', 'sdl3')`and renders live device state plus a recent-event log. Close the window or press Ctrl+C to stop.

Run the package suite from this directory with:

```
../../vendor/bin/pest --configuration phpunit.xml
```

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance100

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity42

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.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

0d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/10563160?v=4)[Angel Gonzalez](/maintainers/projectsaturnstudios)[@projectsaturnstudios](https://github.com/projectsaturnstudios)

---

Top Contributors

[![projectsaturnstudios](https://avatars.githubusercontent.com/u/10563160?v=4)](https://github.com/projectsaturnstudios "projectsaturnstudios (2 commits)")

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/dept-of-scrapyard-robotics-sdl3-input/health.svg)

```
[![Health](https://phpackages.com/badges/dept-of-scrapyard-robotics-sdl3-input/health.svg)](https://phpackages.com/packages/dept-of-scrapyard-robotics-sdl3-input)
```

PHPackages © 2026

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