input-systems-sh-nkvt6m
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "input-systems-sh-nkvt6m" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-6881782ac8730cb03ac4507eeb12ab5f2ef3d1c49600bfd3b0c5ff63f722b5f3. Verify the upstream source and version against https://skillhub.cn/skills/user_3c6cb52e/input-systems-sh-nkvt6m before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
skillhub.cn
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Input-systems skill: A skill description intended to help AI Agents perform related tasks more efficiently within input-systems contexts.
Introduction source: third_party · user_3c6cb52e · 1.0.0 Reference
SkillPi interpretation
- Tasks
- Never wire gameplay to raw keys. Map physical inputs (a key, a button, a touch) to named **actions** (`jump`, `interact`, `move`), and let gameplay read actions. That one indirection gives you rebinding, multi-device support, and accessibility almost for free. This skill is the engine-neutral architecture; bind it to `unity-input-system`, `unreal-enhanced-input`, or Godot's `InputMap`.
- Audience
- Use to design an input layer: actions, bindings, multiple devices, and a rebinding UI with conflict detection and saved bindings. Use to add analog handling (deadzones, sensitivity) and game-feel features (input buffering, coyote time). Use to make controls accessible (full remapping, hold-vs-toggle, sensitivity, no required simultaneous presses). When *not* to use:** for an engine's concrete input package/API, use `unity-input-system`, `unreal-enhanced-input`, or Godot's InputMap. For the movement/jump *physics* the buffer feeds, see `physics-tuning` and the engine movement skill. Persisting bindings to disk is `save-systems`.
- Inputs and outputs
- Never wire gameplay to raw keys. Map physical inputs (a key, a button, a touch) to named **actions** (`jump`, `interact`, `move`), and let gameplay read actions. That one indirection gives you rebinding, multi-device support, and accessibility almost for free. This skill is the engine-neutral architecture; bind it to `unity-input-system`, `unreal-enhanced-input`, or Godot's `InputMap`.
- Software, accounts and paid services
- Not specified in the source documentation.
- Limits and differences
- Not specified in the source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: 输入框Systems
slug: input-systems
version: 1.0.0
displayName: 输入框Systems
description: >
输入框Systems专用技能,帮助AI Agent高效完成相关任务。
summary: "输入框Systems专用技能,帮助AI Agent高效完成相关任务。"
license: Apache-2.0
category: 游戏开发
framework:
- Claude Code
- Codex
- Hermes Agent
- OpenClaw
- QClaw
- WorkBuddy
platform: multi-platform
homepage: "https://github.com/1991513ccie-png"
repository: "https://github.com/1991513ccie-png"Input systems
Never wire gameplay to raw keys. Map physical inputs (a key, a button, a touch)
to named actions (jump, interact, move), and let gameplay read actions.
That one indirection gives you rebinding, multi-device support, and accessibility
almost for free. This skill is the engine-neutral architecture; bind it to
unity-input-system, unreal-enhanced-input, or Godot's InputMap.
When to use
- Use to design an input layer: actions, bindings, multiple devices, and a rebinding UI with conflict detection and saved bindings.
- Use to add analog handling (deadzones, sensitivity) and game-feel features (input buffering, coyote time).
- Use to make controls accessible (full remapping, hold-vs-toggle, sensitivity, no required simultaneous presses).
When not to use: for an engine's concrete input package/API, use
unity-input-system, unreal-enhanced-input, or Godot's InputMap. For the
movement/jump physics the buffer feeds, see physics-tuning and the engine
movement skill. Persisting bindings to disk is save-systems.
Core workflow
- Define actions, not keys. Gameplay asks "is
jumppressed?", never "is Space pressed?". Actions are the stable contract; bindings are data. - Bind per device. Each action holds bindings for keyboard, gamepad, and touch. The active device is whichever last sent input; swap UI prompts to match.
- Read the right edge. Use pressed-this-frame (edge) for discrete actions (jump, interact) and held (level) for continuous ones (move, aim). Confusing the two causes double-fires or missed presses.
- Filter analog input. Apply a deadzone to sticks/triggers so resting drift reads as zero, and scale sensitivity/curve to taste.
- Buffer for feel. Remember a pressed action for a short window so a slightly early press still fires (input buffering); allow a jump shortly after leaving a ledge (coyote time).
- Make rebinding first-class. A UI that captures the next input, detects
conflicts, and persists bindings — and a reset-to-default. Save via
save-systems. - Verify on every device and with rebinds: keyboard, gamepad, touch; rebind an action mid-game and confirm gameplay and prompts follow.
Patterns
1. Actions over raw keys; edge vs held
# Gameplay reads ACTIONS. The mapping from key/button to action lives in data.
# Discrete (edge): fire once on the press frame.
if Input.is_action_just_pressed("jump"):
try_jump()
# Continuous (held): read every frame as an axis.
var move := Input.get_axis("move_left", "move_right") # -1..1
player.velocity.x = move * RUN_SPEED
# RIGHT: name actions ("jump"); rebinding/devices just change the binding data.
# WRONG: `if Input.is_key_pressed(KEY_SPACE)` — unrebindable, keyboard-only,
# and `is_key_pressed` is a held check that would re-fire jump every frame.
Engine equivalents: Godot InputMap + Input.is_action_just_pressed; Unity
Input System InputAction / action maps; Unreal Enhanced Input Input Actions +
Input Mapping Contexts.
2. Analog deadzone and sensitivity
# Raw sticks never rest at exactly zero. Apply a RADIAL deadzone (on the vector
# length), not per-axis, so diagonals aren't clipped into the axes.
func apply_deadzone(stick: Vector2, dead := 0.2, sens := 1.0) -> Vector2:
var mag := stick.length()
if mag < dead:
return Vector2.ZERO # inside deadzone -> no movement
# Rescale so motion ramps from 0 at the edge of the deadzone, not from `dead`.
var scaled := (mag - dead) / (1.0 - dead)
return stick.normalized() * pow(scaled, sens) # sens>1 = finer near center
# WRONG: clamping each axis separately — it carves a square hole and snaps to axes.
3. Input buffering + coyote time (forgiving, responsive feel)
# Buffer: a jump pressed slightly BEFORE landing still triggers on touchdown.
# Coyote: a jump pressed slightly AFTER walking off a ledge still works.
const BUFFER := 0.12 # seconds an early press stays "remembered"
const COYOTE := 0.10 # seconds after leaving ground you can still jump
var _buffer_timer := 0.0
var _coyote_timer := 0.0
func _physics_process(dt):
_buffer_timer -= dt
_coyote_timer = COYOTE if is_on_floor() else _coyote_timer - dt
if Input.is_action_just_pressed("jump"):
_buffer_timer = BUFFER # remember the press
if _buffer_timer > 0.0 and _coyote_timer > 0.0:
velocity.y = JUMP_VELOCITY
_buffer_timer = 0.0; _coyote_timer = 0.0 # consume both so it fires once
4. Rebinding with conflict detection
# Capture the next physical input, reject duplicates, then persist.
func rebind(action: String, event: InputEvent) -> bool:
for other in actions: # conflict check across actions
if other != action and binding_of(other) == event:
return false # already used -> let UI warn/swap
set_binding(action, event) # engine: erase old + add new event
save_bindings() # persist (see save-systems)
return true
# Always provide "reset to defaults", and never let the player unbind a key they
# need to reach the menu without an alternative.
Pitfalls
- Hardcoding keys in gameplay blocks rebinding, locks out gamepad/touch, and scatters input logic. Read named actions only.
- Edge vs held confusion: using a held check for jump re-fires every frame; using an edge check for movement drops held input. Match the check to the action.
- Per-axis deadzones clip diagonal stick input and snap movement to the axes. Use a radial deadzone on the vector magnitude.
- No buffering/coyote time makes tight platformers feel unfair even when the physics are correct — players "clearly pressed jump". Add small windows.
- Rebinding without conflict handling lets two actions share a key, or strands the player by unbinding menu access. Detect conflicts; guarantee a way back.
- Not swapping prompts on device change shows "Press Space" to a gamepad player. Track the last-used device and switch glyphs.
- Ignoring accessibility: required simultaneous presses, no remap, fixed sensitivity, hold-only actions. Offer remap, toggle-vs-hold, and sensitivity.
- Reading input in the wrong loop: poll held state in the physics step for consistent movement; capture discrete presses so none are missed between frames.
References
references/buffering-and-accessibility.md— buffering/coyote tuning, jump feel (variable height, apex), device detection and prompt swapping, touch controls, and an accessibility checklist (remap, toggle/hold, sensitivity, latency).
Related skills
unity-input-system,unreal-enhanced-input— concrete engine input APIs (Godot usesInputMap+ theInputsingleton).save-systems— persist custom key bindings and input settings.physics-tuning— the movement the buffer/coyote windows feed into.platformer,fps-shooter— genres whose feel depends on input handling.
Current listing version
1.0.0
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 提供游戏输入系统完整架构设计,涵盖动作映射、多设备支持、模拟输入处理等核心功能
- 面向游戏开发者解决输入系统设计的实际痛点,具有明确的实用价值
Highlights
- 触发描述清晰明确,区分了适用与不适用场景,边界定义良好
- description 与 skill_body 内容一致,无歧义
Highlights
- 文档结构完整,包含完整的工作流程、代码示例、常见陷阱和相关技能指引
- frontmatter 信息完整,符合规范要求
Areas to improve
-
缺少 When to Use 章节标题规范 Reported severity: Minor
文档中使用了 'When to use' 小写标题,建议统一为首字母大写的 'When to Use' 以符合常见文档规范
Recommendation: 将 'When to use' 标题修改为 'When to Use' 以保持命名一致性
Highlights
- 提供 Godot 引擎的具体代码实现示例,工具来源明确
- 覆盖了输入系统的主要异常场景,如冲突检测、设备切换等
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Domains or addresses referenced in the document
These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.
- github.com
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Not specified in the source documentation.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.