Input actions
Gives the game named input actions that work on keyboard, gamepad and touch: movement axes, sprint, jump, interact and enter or exit, with per-project overrides of any kit's actions.
Input actions (input.actions) #
What it is for #
Gives the game named input actions that work on keyboard, gamepad and touch: movement axes, sprint, jump, interact and enter or exit, with per-project overrides of any kit's actions.
It needs game.engine; installing it brings them in.
Turn it on #
Install the kit in a project, then change a setting (the values shown are its defaults):
gripforge_gamekit_install { project_id: "gkp_…", id: "input.actions" }
gripforge_gamekit_configure { project_id: "gkp_…", id: "input.actions",
config: { "eventActions": null, "gamepad": true } }
First example #
The kit has no dedicated test yet; this installs it and sets two of its settings to their defaults.
gripforge_gamekit_install { project_id: "gkp_…", id: "input.actions" }
gripforge_gamekit_configure { project_id: "gkp_…", id: "input.actions",
config: { "eventActions": null, "gamepad": true } }
Settings and defaults #
Descriptions come from the kit manifest and stay in English.
| Setting | Type | Default | Range or values | Meaning |
|---|---|---|---|---|
eventActions | array | — | Rust KitHost only: additional existing enabled button actions whose press/release edges emit input.action. | |
gamepad | boolean | true | Read the first connected gamepad. | |
deadzone | number | 0.15 | 0–0.5 | Stick deadzone. |
overrides | array | [] | Replace the default keys of an action — the action of ANY installed kit (fire, moba.ability_q, vehicle.boost…), not only the ones… | |
scheme | string | "" | The control scheme the project started from (fps, third_person, moba_click, top_down, platformer, fighting, vehicle, rts,… |
Services, events, variables #
- Service
input.actions: pressed / justPressed / axis by action name, stick(action) for the 2D stick actions, capture per kit; labelFor(action) / promptFor(action, text): the on-screen key of an action from its effective binding (project, then player remapping) and the last device used — the only way a kit shows a key. - Events emitted:
input.action(action,name,phase,pressed) — Edge of a button action (axes are polled, not emitted).input.device(device) — The player switched between keyboard / mouse, gamepad and the on-screen controls (touch): on-screen prompts redraw their keys.
- Input actions:
move_x,move_y,sprint,jump,interact,enter_exit
The input of a character (1.11) #
<!-- test: kits/game_engine/host/tests/input_by_actor.rs::a_fed_press_is_seen_once_the_tick_after_whatever_the_mount_order --> A kit that drives several characters (a weapon, a guard, a moveset) asks what its character does: pressedBy(actor, action), justPressedBy(actor, action), releasedBy(actor, action) and aimBy(actor) ({ yaw, pitch }). The local player answers this machine's input, exactly as pressed(action); a remote player of a co-op session answers what coop.session fed for them (feed(actor, { held, presses, releases, aim }), clear(actor)); anyone else, such as an NPC holding a weapon, presses nothing. setLocal(actor) names the local player (coop.session does it on every machine); without it the local player is the player in scope, so a solo game reads what it read before. A fed press is seen for exactly one tick, by the next step, whatever the order the kits update in. fed() and local() read the state.
Hooks and modding #
- Moddable settings:
gamepad,deadzone
Engines #
Declared targets: web, godot, unity, unreal, rust. gripforge kit api input.actions lists the exact settings and services of your version.
Versions #
Kit version 1.11.0 (since 2026-10-30: the input of a character, pressedBy and its siblings).
<!-- kit-services:begin -->
Services this kit uses (and that you can provide) #
| Capability | Required | Methods |
|---|---|---|
i18n.text | optional | has, language, t, text |
input.virtualpad | optional | controlOf |
Any brick can serve them: a kit, or your engine (Godot provide_service, Unity Provide, Unreal ProvideService, Bevy provide_kit_service, C gfk_provide) — see the guide. <!-- kit-services:end -->