Download the PHP package venusian-surface/human-input without Composer
On this page you can find all versions of the php package venusian-surface/human-input. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download venusian-surface/human-input
More information about venusian-surface/human-input
Files in venusian-surface/human-input
Package human-input
Short Description Surface human input: keyboards, mice, game pads and game controllers from every toolkit session, the OS pad source and attached circuits, polled on the loop.
License MIT
Homepage https://venusian.projectsaturnstudios.com/ecosystem/venusian/surface/0.11.x/human-input
Informations about the package human-input
venusian-surface/human-input
Keyboards, mice, game pads, game controllers. One vocabulary. Read state each frame.
Where input comes from
| Source | Starts | Registered by |
|---|---|---|
| Toolkit engine (keyboard, mouse) | when that toolkit's bridge session connects | the toolkit package: app('human-input')->extend('<toolkit>', …) |
| Pad source (every pad, window or not) | first poll, the one human-input.pads.<os> names |
the pad package: extendPads('<name>', …) |
| Circuit | HumanInput::attach($ic, 'p1') |
the sketch |
One pad source per process lists every pad once; engines list none. Defaults:
mac → gamecontroller, linux → evdev; sdl3 works on both. null = circuits only.
Errors land on the reads that need them. Session without an engine: keyboard() and
mouse() reads throw. Pad source not registered, or its connect failed: gamePads()
and gameControllers() throw; the next poll retries the connect.
Players are the game's. $pad->hardwareId() is the same physical pad across a
reconnect (null where the source has no identity); $pad->setPlayerIndex(0) lights
its player LEDs where it has them.
Several toolkit sessions (Linux): one merged keyboard, one merged mouse. Mouse position, window and buttons follow the engine that reported last; motion and wheel sum.
Circuit faulted (bus gone): released, mailed disconnected, never polled again.
detach() + attach() recovers.
Frames
Loop turns outnumber frames. Edges (isPressed, wasReleased, text, motion, wheel)
stay until a frame reads input, so a tap between two frames reads both edges in the
next. Input unread for two frame lengths (sketches.refresh_rate) drops its edges.
First read of a frame applies what the toolkit dispatched since the last poll.
input.gamepad.connected.<id> (GamepadConnected) and
input.gamepad.disconnected.<id> (GamepadDisconnected), once per change.
No loop
All versions of human-input with dependencies
venusian-surface/bridge Version ^0.11.0
venusian-surface/contracts Version ^0.11.0
venusian-voyager/contracts Version ^0.11.0
venusian-voyager/io-pools Version ^0.11.0
venusian-voyager/nuts-and-bolts Version ^0.11.0