Uloop Simulate Keyboard logo

Uloop Simulate Keyboard

Community
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).

Overview

Publisherhatayama
Repositoryunity-cli-loop
Skill nameuloop-simulate-keyboard
Stars
578
Forks
49
Bundled files
1
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by hatayama on GitHub. Read the source before you install it.

Installation

Install the Uloop Simulate Keyboard AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/hatayama/unity-cli-loop/tree/main/.agents/skills/uloop-simulate-keyboard
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

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
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Uloop Simulate Keyboard in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Uloop Simulate Keyboard on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Uloop Simulate Keyboard is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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()

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Uloop Simulate Keyboard AI skill do?

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).

Why use Uloop Simulate Keyboard on TypingMind?

Because you install it once and use it with any model. Uloop Simulate Keyboard is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Uloop Simulate Keyboard in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/hatayama/unity-cli-loop/tree/main/.agents/skills/uloop-simulate-keyboard. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Uloop Simulate Keyboard?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Uloop Simulate Keyboard?

As many as you like. As long as a model supports skills, you can use Uloop Simulate Keyboard with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Uloop Simulate Keyboard AI skill free?

Yes. It is published on GitHub by hatayama under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇