roblox-input
Installation
SKILL.md
Roblox Input
When to Load
Touch, gamepad, keyboard, mouse or motion input, on-screen action buttons, cross-platform binding. Client-only; Server Authority simulation input uses the Input Action System.
Quick Reference
- Events:
InputBegan/Changed/Endedgive(input, gameProcessedEvent); filter it for gameplay. Wheel fires onlyInputChanged. - Bindings: new work uses the Input Action System (
InputContext>InputAction>InputBinding); CAS binding is planned for deprecation. Server Authority:BindToSimulation()(needsUseFixedSimulation). - Hybrid aware: show controls from
UserInputService.PreferredInput, observed live, notTouchEnabledcached once. - Touch buttons: fire only for touches that began on the button. Place from the measured jump button in
PlayerGui.TouchGui. - Gate gameplay: block attacks while a game window is open, a
TextBoxis focused,GuiService.MenuIsOpen, orGuiService.SelectedObjectis set. - Cancel is not release: holds cancel on window open,
Cancel, unequip, focus loss, input switch or pad disconnect. - Gamepad tools: R2 activates tools via
BindActivate;Tool.ManualActivationOnly = truedisables it. Aim from screen center, notGetMouseLocation(). - Hints:
InputActionLabel,GetStringForKeyCode(key, Abbreviated),GetImageForKeyCode; never hardcode Xbox names. - TV remote: D-pad, centre (
ButtonA), back (ButtonB);PreferredInput.MicroGamepadisn't set yet, so detect a pad without thumbsticks. - Locked mouse: popups need a key; click windows show
Modal+MouseIconEnabled;ClickablePrompt = false. - Test: Device Simulator + Controller Emulator.