Логотип 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

    Навички ШІ — це звичайний Markdown, а не код для певного постачальника, тому вони працюють із GPT, Claude, Gemini, Grok або локальною моделлю.

  • Файлів у комплекті: 1

    Скрипти, шаблони й довідкові матеріали, які модель може читати під час роботи. Файли доступні лише для читання й ніколи не виконуються.

  • Відкритий вихідний код

    Видавець на GitHub: hatayama. Перед установленням перегляньте вихідні файли навички.

Встановлення

Установіть навичку ШІ Uloop Simulate Keyboard у TypingMind, щоб використовувати її з будь-якою LLM, або додайте її до іншого агента, що читає SKILL.md.

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. Увімкніть навичку в кожному чаті, де хочете її використовувати.
Плагіни → Навички → Додати навичку → За URL GitHub, потім вставте URL папки й натисніть «Продовжити».
2

Встановити в іншому агенті

Будь-який агент, що підтримує формат Agent Skills, може використовувати цю навичку — скопіюйте папку до каталогу навичок цього агента.

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

Увімкніть навичку Uloop Simulate Keyboard в будь-якому чаті TypingMind, і далі модель усе зробить сама. Назва й опис навички містяться в системному промпті, а щойно надходить відповідний запит, модель самостійно завантажує повні інструкції — вам не потрібно викликати навичку вручну, і до фактичного використання вона не витрачає токенів.

Модель самостійно завантажує навичку Uloop Simulate Keyboard, щойно надходить відповідний запит.

Працює з будь-якою моделлю ШІ

Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для певного постачальника, тому навичка Uloop Simulate Keyboard не прив’язана до моделі, для якої її створено. Установіть її один раз у TypingMind і використовуйте з GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama або локальною моделлю, яку ви запускаєте самостійно, — усе з вашими власними ключами API.

  • Завантажується лише за потреби

    Системний промпт містить лише назву й опис. Інструкції завантажуються за першого відповідного запиту, тож поки навичка не потрібна, токени на її інструкції не витрачаються.

  • Змінюйте моделі під час чату

    Оскільки навичка — це інструкції, а не код, зміна моделі не порушує її роботу: наступна модель читає той самий файл 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()

Файли в пакеті

Модель читає ці файли за потреби, поки навичку завантажено. Вони доступні для читання й ніколи не виконуються.

Поширені запитання

Що робить навичка ШІ 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).

Навіщо використовувати Uloop Simulate Keyboard у TypingMind?

Тому що ви встановлюєте її один раз і використовуєте з будь-якою моделлю. Uloop Simulate Keyboard — це звичайний Markdown, а не код для конкретного постачальника, тому та сама навичка працює з GPT-5, Claude, Gemini, Grok або локальною моделлю. Ви можете змінити модель навіть посеред чату, і навичка продовжить працювати. TypingMind використовує ваші власні ключі API, тож ви платите безпосередньо постачальникам замість передплати за кожне місце користувача, а ваші навички й чати залишаються у вашому сховищі.

Як встановити Uloop Simulate Keyboard у TypingMind?

Відкрийте в TypingMind Плагіни → Навички → Встановити з GitHub і вставте https://github.com/hatayama/unity-cli-loop/tree/main/.agents/skills/uloop-simulate-keyboard. TypingMind прочитає файл SKILL.md, додасть супровідні файли та встановить навичку, яку можна вмикати окремо для кожного чату.

Які моделі ШІ можуть використовувати Uloop Simulate Keyboard?

Будь-яка модель, яку ви підключите в TypingMind. Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для конкретного постачальника, тому GPT, Claude, Gemini, Grok і локальні моделі можуть завантажувати цю навичку, коли запит їй відповідає.

Зі скількома моделями ШІ можна використовувати Uloop Simulate Keyboard?

Зі скількома забажаєте. У TypingMind ви можете використовувати Uloop Simulate Keyboard із будь-якою моделлю, яка підтримує навички, зокрема з GPT, Claude, Gemini, Grok, DeepSeek, Mistral чи Llama. Для цього ви використовуєте власні ключі API.

Чи безкоштовна навичка ШІ Uloop Simulate Keyboard?

Так. На GitHub цю навичку публікує hatayama за ліцензією MIT. Ви платите лише своєму постачальнику ШІ за використані токени.

Що таке навички ШІ?

Навичка ШІ — це набір інструкцій для повторного використання, який навчає модель ШІ виконувати одне конкретне завдання. Він відповідає відкритому формату Agent Skills: файл SKILL.md із назвою та описом, а також скрипти, шаблони чи довідкові файли, які можуть знадобитися моделі. Модель читає інструкції лише тоді, коли ваш запит відповідає навичці, тому встановлена навичка нічого не коштує, доки її не використано.

Чим навички ШІ відрізняються від плагінів або серверів MCP?

Плагін або сервер MCP надає моделі нові інструменти, які вона може викликати, — код, який десь виконується й повертає результат. Натомість навичка ШІ дає моделі знання й пояснює порядок дій: як підійти до завдання, яких кроків дотримуватися та яким має бути якісний результат. Навички — це звичайний Markdown, тож їм не потрібні ні сервер, ні ключ API, ні середовище виконання, і вони працюють із будь-якою моделлю.

Усі

Створіть власний робочий простір зі ШІ вже зараз

Підпишіться на нашу розсилку, щоб дізнаватися про нові функції та майбутні розіграші 👇