abstract-input-actions
Installation
SKILL.md
Abstract Input Actions
Design and implement hardware-agnostic input action layers that unify keyboard/mouse, gamepads, and touch controls with radial deadzone filtering, chorded bindings, runtime remapping, and seamless device hot-swapping.
Core Rules
- Strict Hardware Decoupling: Gameplay systems must query semantic action states (
Jump,MoveVector,PrimaryAttack,Interact) rather than polling raw hardware keycodes or button indices directly. - Scaled Radial Deadzones: Filter 2D analog thumbstick inputs using scaled radial deadzones rather than independent per-axis axial deadzones to eliminate cardinal axis snapping and preserve smooth $360^\circ$ directional control.
- Graceful Device Hot-Swapping: Detect controller connection, disconnection, and active device switching automatically. Pause active gameplay immediately when the primary controller disconnects during action sequences.
- Contract Adherence: Emit
contracts/schemas/implementation-result.jsonupon completing input abstraction implementations.
Suggested Process
1. Action Context & Semantic Map Definition
Group semantic actions into mutually exclusive or stackable Input Contexts (GameplayContext, UIContext, DialogueContext, VehicleContext). Enable or disable contexts via state changes so menu navigation never triggers character jumps or attacks.