input

Wires keyboard, mouse, gamepad, and touch input into ignifx game actions and bindings.

Updated Sep 5, 2026
One-click install
npx skills add https://github.com/astrum-forge/ignifx --skill input-astrum-forge
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: input
Source: https://github.com/astrum-forge/ignifx/tree/main/packages/input/skills/input
Command: npx skills add https://github.com/astrum-forge/ignifx --skill input-astrum-forge

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Game code should ask for semantic actions like "move" and "jump" instead of raw key codes, and input state must be consistent across every read within a frame. This Skill guides wiring player input in an ignifx game through @ignifx/input, covering action maps, bindings, devices, and rebinding without manual event handling. ## Core Features & Use Cases - Action Maps and Bindings: Define actions of type button, axis, or vector2 with binding paths, composites like 2DVector, and processors like deadzone, loaded from .input.json assets or defined in code. - Devices and Control Schemes: Work with keyboard, mouse, pointer, touch, gamepad slots, and a virtual device, with automatic control scheme switching based on the last active device. - Pointer Lock and Rebinding: Request pointer lock for first-person look, run interactive rebinding with performInteractiveRebind, and persist overrides with saveOverrides. - Use Case: Build a local multiplayer game by giving each player entity a PlayerInput component pinned to its own gamepad slot, then test the whole pipeline headless with app.input.simulate. ## Quick Start Ask the AI to add a move action bound to WASD and gamepad left stick plus a jump action in your ignifx project using @ignifx/input.

Frequently Asked Questions about input

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add input actions and bindings in an ignifx game?

Define actions with defineInputActions or a .input.json asset, binding paths like <Keyboard>/w or <Gamepad>/leftStick to typed actions. Register the input extension in createApp and read actions with app.input.actions.get(name) inside update.

How do I implement a rebinding screen for game controls?

Call app.input.performInteractiveRebind(action, options) to listen for the next control and write an override, then persist it with app.input.saveOverrides(). Overrides are addressed by binding index, so reordering bindings invalidates saved overrides with error IGX-0808.

Does @ignifx/input work in headless or test environments?

Yes, input is DOM-only with no Babylon Lite dependency, so it runs identically under the null engine with createApp({ headless: true }). Tests drive the game through the same pipeline using app.input.simulate(values) or simulateEvent.

Why does actions.get throw IGX-0801 for an action I defined?

actions.get searches only enabled maps, so an action in a disabled map throws IGX-0801 instead of reading as released. Reach it through actions.map(name).get(name) or actions.find(name), or set action.enabled = false to keep a live handle working.

How do I set up first-person mouse look with pointer lock?

Bind <Mouse>/delta to a look action and call app.input.pointerLock.request() from a click handler, since browsers require a user gesture. Scale deltas by about 0.08-0.15 degrees per pixel, and read action.activeDevice to handle gamepad sticks differently.

Why is my gamepad not detected at startup?

Browsers hide gamepads from navigator.getGamepads() until a button is pressed, so gamepads[0].isConnected starts false. Listen to app.input.onDeviceConnected to react when a pad slot fills.