tabooharmony/roblox-brain

roblox-input

Use when handling Roblox touch, gamepad, keyboard, mouse or motion input, on-screen action buttons, or cross-platform action binding.

ソースを見る

使い方

  1. インストールコマンドをコピーし、自分の環境へ導入する前にソースを確認します。
  2. 必要なツール、認証情報、対応環境を原文で確認します。
  3. 入力と成果物を指定し、出力を資料と照合します。
npx skills add https://github.com/tabooharmony/roblox-brain --skill roblox-input

開始前の確認

  • 導入にはモデル契約、API枠、ファイルへのアクセス許可は含まれません。
  • スター数や導入数は活動の指標であり、独立した品質・安全性試験ではありません。
リポジトリの原文

見出し、例、コード、表、リンク、参照画像を含む原文を表示しています。

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/Ended give (input, gameProcessedEvent); filter it for gameplay. Wheel fires only InputChanged.
  • Bindings: prefer ContextActionService:BindAction(name, handler, touchButton, ...keys); gate on state (touch is KeyCode.Unknown); stack order, so BindActionAtPriority. Server Authority: InputAction/InputContext + RunService:BindToSimulation() (needs Workspace.UseFixedSimulation).
  • Mobile first, hybrid aware: show controls from UserInputService.PreferredInput (Enum.PreferredInput), observed with GetPropertyChangedSignal, not from TouchEnabled cached once.
  • Touch action buttons: fire only for touches that began on the button; camera drags across it never fire. Place from the measured jump button under PlayerGui.TouchGui; clear the thumbstick zone.
  • Gate gameplay: block attacks while a game window is open, a TextBox is focused, GuiService.MenuIsOpen, or GuiService.SelectedObject is set.
  • Cancel is not release: holds cancel on window open, Cancel, unequip, focus loss, input switch or pad disconnect.
  • Gamepad tools: default controls bind ButtonR2 through BindActivate; Tool.ManualActivationOnly = true disables it. Aim from the screen center on gamepad, not GetMouseLocation().
  • Hints: GetStringForKeyCode(key, Enum.KeyCodeStringFormat.Abbreviated), GetImageForKeyCode, or InputActionLabel; never hardcode Xbox names.
  • Test: Device Simulator + Controller Emulator; menu focus is in roblox-gui.
Details: references/full.md

タスクに関連する項目

同じリポジトリから

関連する Skills

すべての Skills