Forest Logo
search
package_2

input

By @danieluntask

Roblox

Mirrored from Wally

InputSystem

A modular input management system for Roblox, designed to provide a unified way to handle player input across different devices.

InputSystem separates client-side and server-side responsibilities, allowing developers to manage input contexts, actions, and bindings while supporting multiple input methods.

Features

  • Multi-device support — Handles mouse, keyboard, touch, and gamepad input.
  • Context management — Organizes input actions into independent contexts.
  • Action management — Enables, disables, and reads the state of individual actions.
  • Event-driven API — Provides signals and callbacks for responding to input events.
  • Player-specific input — Each player receives an independent input configuration.
  • Resource management — Uses an internal Scope system to manage connections and resources.
  • Type safety — Built with Luau strict type checking.

Documentation

Explore the documentation for each module:

Main Modules

ModuleDescription
InputClientClient-side input management, including contexts, actions, bindings, and input events.
InputServerServer-side input initialization and management for individual players.

Input Components

ComponentDescription
MouseMouse input handling, including buttons, movement, position, and raycasting.
TouchTouch input handling, including taps, gestures, swipes, and touch events.
KeyboardKeyboard input handling and key state detection.
GamepadGamepad input handling and controller events.

Usage

InputSystem provides separate entry points for client and server environments.

Server

Register the player input template before starting the server module.

const InputServer = require(path.To.InputServer)

InputServer:registerPlayerInput(
    game.ServerStorage.PlayerInputs
)

InputServer:start()

Client

Start the client module to load the local player's input contexts and actions.

const InputClient = require(path.To.InputClient)

InputClient:start()

Once initialized, you can retrieve contexts and actions, read their states, and connect to their events.

const jumpAction = InputClient:getActionAsync(
    "Gameplay",
    "Jump"
)

InputClient:onPress("Gameplay", "Jump", function()
    print("Jump pressed")
end)

For more information, see the InputClient documentation and InputServer documentation.

Package Details

Install command (Click to copy)


Version

0.0.1

License

MIT

check_circle

Safe for commercial use

infoThe package archive does not include its license text; the license is declared in its manifest metadata.

Automated license review — not legal advice.