Uloop Simulate Keyboardのロゴ

Uloop Simulate Keyboard

コミュニティ
hatayama
uloop-simulate-keyboard

Simulate keyboard input in PlayMode through Unity Input System. Use for key presses, holds (via Press --duration or KeyDown/KeyUp), releases, and game controls such as WASD or Space. Requires the Input System package (com.unity.inputsystem).

概要

公開者hatayama
リポジトリunity-cli-loop
スキル名uloop-simulate-keyboard
スター
578
フォーク
49
同梱ファイル
1
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 1個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    hatayamaがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Uloop Simulate Keyboard」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/hatayama/unity-cli-loop/tree/main/.agents/skills/uloop-simulate-keyboard
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/hatayama/unity-cli-loop.git /tmp/unity-cli-loop
mkdir -p .claude/skills
cp -r /tmp/unity-cli-loop/.agents/skills/uloop-simulate-keyboard .claude/skills/uloop-simulate-keyboard
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでUloop Simulate Keyboardを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にUloop Simulate Keyboardを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Uloop Simulate Keyboardは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Task

Simulate keyboard input on Unity PlayMode.

Workflow

  1. Ensure Unity is in PlayMode (use uloop control-play-mode --action Play if not)
  2. Execute the needed uloop simulate-keyboard commands
  3. Inspect the result with the lightest useful evidence: runtime state, logs, or a screenshot
  4. If exact-frame proof would reduce uncertainty, treat Pause Point inspection as an optional follow-up using the section below
  5. Report what happened and which evidence was used

Tool Reference

bash
uloop simulate-keyboard --action <Press|KeyDown|KeyUp> --key <key> [options]
uloop simulate-keyboard --action ReleaseAll

Parameters

ParameterTypeDefaultDescription
--actionenumPressPress - one-shot key tap (Down then Up), KeyDown - hold key down, KeyUp - release held key, ReleaseAll - force-release every tracked and device-pressed key (allowed while PlayMode is paused; use after a pause-point interruption leaves key state inconsistent)
--keystring(required except ReleaseAll)Key name matching Input System Key enum (e.g. W, Space, LeftShift, A, Enter). Case-insensitive. Digit keys use Digit0-Digit9 or Numpad0-Numpad9, not bare 0-9. Not used by ReleaseAll.
--durationnumber0Hold duration in seconds for Press action (0 = one-shot tap, max 30). Ignored by KeyDown/KeyUp/ReleaseAll.

Actions

ActionBehaviorUse Case
PressKeyDown → wait → KeyUpOne-shot tap (jump, use item)
KeyDownKeyDown only (held until KeyUp)Start continuous movement, hold sprint
KeyUpKeyUp only (release held key)Stop movement, release sprint
ReleaseAllInjects a release for every tracked and device-pressed key and resets the hold tracker; confirm the device via ReleasedKeyStatesRecover a clean keyboard state after a pause-point interruption

There is no separate hold action: to hold a key, use Press --duration <seconds> (fixed-time hold) or KeyDown followed later by KeyUp (open-ended hold).

Use Press for edge-triggered keyboard code such as Keyboard.current.spaceKey.wasPressedThisFrame. KeyDown emits one initial press edge, then only keeps the key held. It does not keep wasPressedThisFrame true while the key remains held. If a successful Press or KeyDown leaves Keyboard.current.<key>.isPressed true but runtime state does not change, do not immediately rewrite the user's runtime code to isPressed. First verify that the target component is active during the command, that it polls input in the configured Input System update phase, and that a missed KeyDown edge is followed by KeyUp before retrying.

ReleaseAll is a recovery action, not part of normal gameplay simulation: after a pause-point interruption, bookkeeping and the Input System device can disagree, or a stale press latch can keep isPressed true after resume. ReleaseAll resets the tracker and injects a release for every such key; it works while Unity is still paused and does not clear pause-point captures. Success: true alone is not proof the device is clean: read ReleasedKeyStates in the response, and for any entry with DeviceIsPressedAfterRelease: true resume PlayMode (the deferred latch sync runs on the next gameplay input update) and re-check with pause-point-status, a log, or Keyboard.current.<key>.isPressed via execute-dynamic-code before sending the next key. For ordinary releases during gameplay simulation, keep using KeyUp.

Pause Point Inspection (Standard for E2E)

For standard frame proof when this input drives a state transition, follow the uloop-pause-point skill — it covers line placement and interruption semantics. Tool-specific note: if InterruptedByPausePoint: true, Unity is paused; for Press/KeyDown read PressDeliveredToGame before retrying (null on KeyUp). PressDeliveredToGame means the press was applied to the Input System; PressEdgeObserved says whether a gameplay update saw the press edge and can still be false after apply. Interruption detection covers the whole press lifetime: a pause landing while Press is holding the key (during the duration wait) also returns promptly with InterruptedByPausePoint: true, and the pause takes precedence even when the requested duration had already elapsed — treat such a response as the pause reporting in, not as a delivery failure. Clear inspection-only pause points (uloop clear-pause-point --all) before final validation. If a later key action still reports inconsistent state after an interruption, recover with --action ReleaseAll instead of retrying KeyUp.

KeyDown/KeyUp Rules

  • KeyDown fails if the key is already held
  • KeyUp fails if the key is not currently held
  • Multiple keys can be held simultaneously (e.g. W + LeftShift for sprint)
  • All held keys are automatically released when PlayMode exits
  • To hold a key for a fixed duration, prefer --action Press --duration <seconds> (one-shot, blocks until release). For multi-key holds (e.g. Shift+W), issue separate KeyDown calls, then sleep <seconds> between them and the KeyUp calls.

Examples

bash
# One-shot key press
uloop simulate-keyboard --action Press --key W

# One-shot action key
uloop simulate-keyboard --action Press --key Space

# Hold a key for 2 seconds
uloop simulate-keyboard --action Press --key W --duration 2.0

# Hold two keys, then release them
uloop simulate-keyboard --action KeyDown --key LeftShift
uloop simulate-keyboard --action KeyDown --key W
uloop screenshot --capture-mode rendering
uloop simulate-keyboard --action KeyUp --key W
uloop simulate-keyboard --action KeyUp --key LeftShift

# Recover a clean keyboard state (works while paused; e.g. after a pause-point interruption)
uloop simulate-keyboard --action ReleaseAll

Output

The response reports Success, Message, Action, and KeyName, plus the fields that gate how to read a run: PressDeliveredToGame (on pause-point interruptions of Press / KeyDown — read it before retrying), PressEdgeObserved (false means gameplay polling most likely missed the edge — read the PressEdge* diagnostics before retrying, and check pause-point-status first when a single-shot marker is armed), Warning (set when the press edge was missed while the Unity Editor is unfocused — run uloop focus-window before retrying), InterruptedByPausePoint/PausePointHits, and the ReleaseAll / key-state readback fields. Field-by-field semantics and the PressEdge* diagnostics table are in references/output.md beside this skill — read it before retrying any input whose response looks inconsistent.

Prerequisites

  • Unity must be in PlayMode. Press/KeyDown/KeyUp additionally require PlayMode to be unpaused; ReleaseAll is allowed while paused.
  • Input System package (com.unity.inputsystem) must be installed; this tool only works with the New Input System.
  • Game code must read input via Input System API (e.g. Keyboard.current[Key.W].isPressed), not legacy Input.GetKey()

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Uloop Simulate Keyboard」では何ができますか?

Simulate keyboard input in PlayMode through Unity Input System. Use for key presses, holds (via Press --duration or KeyDown/KeyUp), releases, and game controls such as WASD or Space. Requires the Input System package (com.unity.inputsystem).

TypingMindでUloop Simulate Keyboardを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Uloop Simulate Keyboardはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにUloop Simulate Keyboardをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/hatayama/unity-cli-loop/tree/main/.agents/skills/uloop-simulate-keyboardを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Uloop Simulate Keyboardを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Uloop Simulate Keyboardで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもUloop Simulate Keyboardを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Uloop Simulate Keyboard」は無料ですか?

はい。hatayamaがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇