roblox-input
БесплатноБез исполняемых скриптовНе проверенPlayer input and cameras across keyboard/mouse, touch, gamepad, VR - Input Action System (InputContext, InputAction, InputBinding), UserInputService…
от EL4CTEO★ 169 звёзд на GitHubОб этом скилле
Roblox input and camera
Choose an approach
| Approach | Use when |
|---|---|
Input Action System (InputContext → InputAction → InputBinding) |
New gameplay controls. Cross-device bindings configured as instances, contexts you enable/disable, built-in on-screen button binding, prompt display. Recommended. |
UserInputService events |
Raw input, text-free hotkeys, mouse position/delta, touch gestures, device detection. |
ContextActionService:BindAction |
Legacy/simple bind-with-mobile-button; existing code. |
All input handling is client-side. Send intent to the server via remotes; the server validates.
Input Action System
Build and audit it visually in the Input Action Manager (Window → Input → Input Action Manager; fully
released): a table of contexts/actions/bindings per device that flags missing bindings and duplicate keys,
and shows live action state in Play Solo. With Workspace.PlayerScriptsUseInputActionSystem enabled, the converted
built-in player scripts (such as the default mobile thumbsticks) also show up there, at edit time and at run time.
Structure (typically in ReplicatedStorage.Inputs, or created from a client script):
Inputs (Folder)
PlayContext (InputContext, Priority 1000) -- gameplay controls
Sprint (InputAction, Type = Bool)
Keyboard (InputBinding, KeyCode = LeftShift)
Gamepad (InputBinding, KeyCode = ButtonL3)
Touch (InputBinding, UIButton = <on-screen TextButton>)
MenuContext (InputContext, Priority 2000, Sink = true, Enabled = false)
InputAction.Type:Bool(press/release),Direction1D(triggers, zoom),Direction2D(move, camera),Direction3D(flying),ViewportPosition(pointer position).- Events:
Pressed,Released(Bool only),StateChanged(value)for every type.action:GetState()reads the current value. InputBindingfields:KeyCode; composite directionsUp/Down/Left/Right/Forward/Backward;Scale(e.g.0.01forMouseDelta/TouchDelta);PressedThreshold/ReleasedThresholdfor analog triggers;PrimaryModifier/SecondaryModifierfor chords (Ctrl+S);UIButtonto drive the action from a GUI button;DisplayName/DisplayImagefor prompts.InputContext.Enabledswitches whole control schemes (gameplay ↔ menu ↔ vehicle);Priority+Sinklets a higher context consume keys so lower contexts don't also fire.- Set
Workspace.PlayerScriptsUseInputActionSystem = Enabledto have Roblox's default player/camera scripts use the system too (required for server authority).
--!strict
-- Client: build a Sprint action in code and react to it.
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local context = Instance.new("InputContext")
context.Name = "PlayContext"
context.Priority = 1000
local sprint = Instance.new("InputAction")
sprint.Name = "Sprint"
sprint.Type = Enum.InputActionType.Bool
sprint.Parent = context
local keyboard = Instance.new("InputBinding")
keyboard.KeyCode = Enum.KeyCode.LeftShift
keyboard.Parent = sprint
local gamepad = Instance.new("InputBinding")
gamepad.KeyCode = Enum.KeyCode.ButtonL3
gamepad.Parent = sprint
context.Parent = player:WaitForChild("PlayerScripts")
local function setSprinting(on: boolean)
local character = player.Character
local humanoid = character and character:FindFirstChildOfClass("Humanoid")
if humanoid then
humanoid.WalkSpeed = if on then 24 else 16 -- server should validate/own real speed limits
end
end
sprint.Pressed:Connect(function()
setSprinting(true)
end)
sprint.Released:Connect(function()
setSprinting(false)
end)
Show the right key/button: an InputActionLabel (beta) auto-renders the binding for the current device,
or read action.PreferredBinding (+ its DisplayName/KeyCode) and UserInputService:GetStringForKeyCode
/ GetImageForKeyCode, updating on GetPropertyChangedSignal("PreferredBinding").
UserInputService essentials
--!strict
local UserInputService = game:GetService("UserInputService")
UserInputService.InputBegan:Connect(function(input: InputObject, gameProcessedEvent: boolean)
if gameProcessedEvent then
return -- typing in a TextBox, clicking UI, or a core-script action consumed it
end
if input.KeyCode == Enum.KeyCode.E then
print("interact")
elseif input.UserInputType == Enum.UserInputType.MouseButton1 then
print("click at", input.Position)
end
end)
local function onPreferredInputChanged()
local preferred = UserInputService.PreferredInput -- KeyboardAndMouse | Touch | Gamepad
print("show prompts for", preferred)
end
UserInputService:GetPropertyChangedSignal("PreferredInput"):Connect(onPreferredInputChanged)
onPreferredInputChanged()
- Always honor
gameProcessedEventor players trigger abilities while typing in chat. PreferredInputreflects what the player is actually using (phone + Bluetooth gamepad →Gamepad); don't branch onTouchEnabled/KeyboardEnabledalone.- Mo
Установить roblox-input в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл roblox-input?
Player input and cameras across keyboard/mouse, touch, gamepad, VR - Input Action System (InputContext, InputAction, InputBinding), UserInputService (PreferredInput, gameProcessedEvent, mouse lock), ContextActionService, reserved keys, custom cameras with BindToRenderStep. Use when adding controls, keybinds, abilities, vehicles, on-screen buttons, or custom cameras.
Как установить скилл roblox-input?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл roblox-input запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic