[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CS1531B43GY2M18ZPD86QF":3,"skill-same:01M7CS1531B43GY2M18ZPD86QF":50},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":27,"commitSha":28,"skillDirectory":29,"forksCount":30,"repositoryHtmlUrl":31,"repositoryHomepageUrl":32,"ownerHtmlUrl":33,"ownerBlogUrl":6,"ownerDescription":34,"updatedAt":35,"install":36,"resources":49},"01M7CS1531B43GY2M18ZPD86QF","game-input-and-accessibility",null,"Use when adding controls, menus, HUD, subtitles or effects - input through named actions with rebinding and controller support per engine, input buffering, and the accessibility floor (remapping, colour-blind safe cues, subtitles, text scale, reduced motion and flashes).","makifbaysal\u002Ftasktrooper","makifbaysal","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F25031940?v=4","01M7CRG3ZCSYZSSEVDMW3DEYC8","Mehmet Akif Baysal","01M7CRG401FJ8YAXH5ER730XYV",122,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fmakifbaysal\u002Ftasktrooper\u002Fblob\u002Fmain\u002Fcatalog\u002Fagents\u002Fgame-developer\u002Fskills\u002Fgame-input-and-accessibility\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: game-input-and-accessibility\ncategory: gameplay\ndescription: Use when adding controls, menus, HUD, subtitles or effects - input through named actions with rebinding and controller support per engine, input buffering, and the accessibility floor (remapping, colour-blind safe cues, subtitles, text scale, reduced motion and flashes).\ntech_stack: Game core\nsource: informed by the Game Accessibility Guidelines (gameaccessibilityguidelines.com), the Xbox Accessibility Guidelines, and the Unity Input System, Godot InputMap and Unreal Enhanced Input docs; own wording\n---\n# Game Input and Accessibility\n\n## Overview\n\nPlayers use keyboards, mice, gamepads, touch screens and adaptive controllers, with different hands, eyes and ears. Code that reads `KeyCode.Space` directly cannot be rebound, cannot be driven by a gamepad without a second branch, and cannot be tested without a keyboard. Gameplay reads named actions; devices map to actions in one place.\n\n**Core principle:** Gameplay never sees a key code. Every action is rebindable, every essential cue reaches the player through more than one sense, and motion and flashing can be turned down.\n\n## Actions, per engine\n\n```csharp\n\u002F\u002F ❌ Unity legacy, device-bound, unrebindable\nif (Input.GetKeyDown(KeyCode.Space)) Jump();\n\n\u002F\u002F ✅ Unity Input System action (from the .inputactions asset or its generated class)\n[SerializeField] InputActionReference jump;\nvoid OnEnable()  { jump.action.performed += OnJump; jump.action.Enable(); }\nvoid OnDisable() { jump.action.performed -= OnJump; }\nvoid OnJump(InputAction.CallbackContext _) => _intents.Jump();\n```\n\n```gdscript\n# Godot: actions from the InputMap, never physical keys in gameplay\nfunc _unhandled_input(event: InputEvent) -> void:\n    if event.is_action_pressed(\"jump\"):\n        intents.jump()\n```\n\n```cpp\n\u002F\u002F Unreal Enhanced Input\nvoid AHeroCharacter::SetupPlayerInputComponent(UInputComponent* Input) {\n    auto* EIC = CastChecked\u003CUEnhancedInputComponent>(Input);\n    EIC->BindAction(JumpAction, ETriggerEvent::Started, this, &AHeroCharacter::OnJump);\n    EIC->BindAction(MoveAction, ETriggerEvent::Triggered, this, &AHeroCharacter::OnMove);\n}\n\u002F\u002F The mapping context is added through UEnhancedInputLocalPlayerSubsystem::AddMappingContext.\n```\n\n```ts\n\u002F\u002F Web: map KeyboardEvent.code (layout-independent position) to actions; poll gamepads each frame\nconst bindings: Record\u003Cstring, Action> = { Space: \"jump\", KeyW: \"up\", ArrowUp: \"up\" };\nwindow.addEventListener(\"keydown\", (e) => { const a = bindings[e.code]; if (a) input.press(a); });\n\u002F\u002F in the loop: for (const pad of navigator.getGamepads()) if (pad?.buttons[0].pressed) input.press(\"jump\");\n```\n\nBevy: `ButtonInput\u003CKeyCode>` \u002F `ButtonInput\u003CGamepadButton>` behind an action layer (or the `leafwing-input-manager` crate if the repo uses it).\n\n## Rebinding and persistence\n\n- Unity: `action.PerformInteractiveRebinding()`, then `actions.SaveBindingOverridesAsJson()` to settings and `LoadBindingOverridesFromJson` at boot.\n- Godot: `InputMap.action_erase_events` + `action_add_event`, saved to a `ConfigFile` under `user:\u002F\u002F`.\n- Unreal: player-mappable keys through `UEnhancedInputUserSettings` (UE 5.2+) or the project's existing settings system.\n- Web: the `bindings` map in settings storage.\n- Conflicts are detected and shown; a reset-to-default exists; UI prompts show the glyph of the currently bound key or button.\n\n## Controllers and touch\n\n- Radial dead zones on sticks (not per-axis squares); sensitivity and invert-Y settings.\n- Switch prompt glyphs to the last-used device; support hot-plugging.\n- Every menu is fully navigable with a gamepad and with a keyboard alone — focus is visible and never lost.\n- Touch: on-screen controls sized for thumbs and placed in the safe area; the web canvas sets `touch-action: none`.\n\n## Feel: buffering and grace windows\n\nInput buffering (a jump pressed 0.1 s before landing still jumps) and coyote time (a jump 0.1 s after walking off a ledge still counts) are measured in **seconds** on the simulation clock, and they belong to the rule class, so they get tests:\n\n```ts\nit(\"buffers a jump pressed 80 ms before landing\", () => {\n  const c = new JumpRules({ bufferSeconds: 0.1 });\n  c.pressJump(); c.step(0.08); c.land(); c.step(1 \u002F 60);\n  expect(c.isJumping).toBe(true);\n});\n```\n\n## Accessibility floor\n\nShip these unless the task explicitly scopes them out:\n\n- **Full remapping** of every action, on every supported device; hold-to-press alternatives as toggles.\n- **No information by colour alone:** team, rarity, danger and status also carry a shape, icon, pattern or label. Colour-blind presets swap the palette of gameplay-critical cues rather than only tinting the screen.\n- **Subtitles and captions:** on by default or offered at first launch; adjustable size, background opacity, speaker names; important sound cues (footsteps behind you, an alarm) also shown visually.\n- **Readable UI:** text scales (at least 1.5× without overlap), minimum size at the smallest supported resolution, high-contrast option for HUD text.\n- **Motion and flashes:** toggles for camera shake, head bob, motion blur and screen flashes; no content that flashes more than three times per second in a large area of the screen.\n- **Difficulty and assists:** where the design allows — slower game speed, aim assist, skip puzzle, extended timing windows.\n- **Pause anywhere** in single-player, including during cutscenes.\n\nSettings live in data and persist (game-save-and-persistence); each option has a test that the setting changes the behaviour it promises (e.g. reduced motion → shake amplitude is zero).\n\n## Common Mistakes\n\n- Reading device keys in gameplay code; a second `if` branch per device.\n- `KeyboardEvent.key` for movement (breaks on AZERTY) instead of `code`.\n- Coyote time or buffering counted in frames.\n- Colour-only health bars, team markers or loot rarity.\n- Subtitles without size or background options; no visual cue for critical audio.\n\n## Red Flags\n\n- `Input.GetKey`, `Input.is_key_pressed`, `IsInputKeyDown` or raw `keydown` handling in a gameplay class.\n- A new action with no default binding for the gamepad the game supports.\n- A new screen-flash or shake effect with no setting that disables it.\n","# Game Input and Accessibility\n\n## Overview\n\nPlayers use keyboards, mice, gamepads, touch screens and adaptive controllers, with different hands, eyes and ears. Code that reads `KeyCode.Space` directly cannot be rebound, cannot be driven by a gamepad without a second branch, and cannot be tested without a keyboard. Gameplay reads named actions; devices map to actions in one place.\n\n**Core principle:** Gameplay never sees a key code. Every action is rebindable, every essential cue reaches the player through more than one sense, and motion and flashing can be turned down.\n\n## Actions, per engine\n\n```csharp\n\u002F\u002F ❌ Unity legacy, device-bound, unrebindable\nif (Input.GetKeyDown(KeyCode.Space)) Jump();\n\n\u002F\u002F ✅ Unity Input System action (from the .inputactions asset or its generated class)\n[SerializeField] InputActionReference jump;\nvoid OnEnable()  { jump.action.performed += OnJump; jump.action.Enable(); }\nvoid OnDisable() { jump.action.performed -= OnJump; }\nvoid OnJump(InputAction.CallbackContext _) => _intents.Jump();\n```\n\n```gdscript\n# Godot: actions from the InputMap, never physical keys in gameplay\nfunc _unhandled_input(event: InputEvent) -> void:\n    if event.is_action_pressed(\"jump\"):\n        intents.jump()\n```\n\n```cpp\n\u002F\u002F Unreal Enhanced Input\nvoid AHeroCharacter::SetupPlayerInputComponent(UInputComponent* Input) {\n    auto* EIC = CastChecked\u003CUEnhancedInputComponent>(Input);\n    EIC->BindAction(JumpAction, ETriggerEvent::Started, this, &AHeroCharacter::OnJump);\n    EIC->BindAction(MoveAction, ETriggerEvent::Triggered, this, &AHeroCharacter::OnMove);\n}\n\u002F\u002F The mapping context is added through UEnhancedInputLocalPlayerSubsystem::AddMappingContext.\n```\n\n```ts\n\u002F\u002F Web: map KeyboardEvent.code (layout-independent position) to actions; poll gamepads each frame\nconst bindings: Record\u003Cstring, Action> = { Space: \"jump\", KeyW: \"up\", ArrowUp: \"up\" };\nwindow.addEventListener(\"keydown\", (e) => { const a = bindings[e.code]; if (a) input.press(a); });\n\u002F\u002F in the loop: for (const pad of navigator.getGamepads()) if (pad?.buttons[0].pressed) input.press(\"jump\");\n```\n\nBevy: `ButtonInput\u003CKeyCode>` \u002F `ButtonInput\u003CGamepadButton>` behind an action layer (or the `leafwing-input-manager` crate if the repo uses it).\n\n## Rebinding and persistence\n\n- Unity: `action.PerformInteractiveRebinding()`, then `actions.SaveBindingOverridesAsJson()` to settings and `LoadBindingOverridesFromJson` at boot.\n- Godot: `InputMap.action_erase_events` + `action_add_event`, saved to a `ConfigFile` under `user:\u002F\u002F`.\n- Unreal: player-mappable keys through `UEnhancedInputUserSettings` (UE 5.2+) or the project's existing settings system.\n- Web: the `bindings` map in settings storage.\n- Conflicts are detected and shown; a reset-to-default exists; UI prompts show the glyph of the currently bound key or button.\n\n## Controllers and touch\n\n- Radial dead zones on sticks (not per-axis squares); sensitivity and invert-Y settings.\n- Switch prompt glyphs to the last-used device; support hot-plugging.\n- Every menu is fully navigable with a gamepad and with a keyboard alone — focus is visible and never lost.\n- Touch: on-screen controls sized for thumbs and placed in the safe area; the web canvas sets `touch-action: none`.\n\n## Feel: buffering and grace windows\n\nInput buffering (a jump pressed 0.1 s before landing still jumps) and coyote time (a jump 0.1 s after walking off a ledge still counts) are measured in **seconds** on the simulation clock, and they belong to the rule class, so they get tests:\n\n```ts\nit(\"buffers a jump pressed 80 ms before landing\", () => {\n  const c = new JumpRules({ bufferSeconds: 0.1 });\n  c.pressJump(); c.step(0.08); c.land(); c.step(1 \u002F 60);\n  expect(c.isJumping).toBe(true);\n});\n```\n\n## Accessibility floor\n\nShip these unless the task explicitly scopes them out:\n\n- **Full remapping** of every action, on every supported device; hold-to-press alternatives as toggles.\n- **No information by colour alone:** team, rarity, danger and status also carry a shape, icon, pattern or label. Colour-blind presets swap the palette of gameplay-critical cues rather than only tinting the screen.\n- **Subtitles and captions:** on by default or offered at first launch; adjustable size, background opacity, speaker names; important sound cues (footsteps behind you, an alarm) also shown visually.\n- **Readable UI:** text scales (at least 1.5× without overlap), minimum size at the smallest supported resolution, high-contrast option for HUD text.\n- **Motion and flashes:** toggles for camera shake, head bob, motion blur and screen flashes; no content that flashes more than three times per second in a large area of the screen.\n- **Difficulty and assists:** where the design allows — slower game speed, aim assist, skip puzzle, extended timing windows.\n- **Pause anywhere** in single-player, including during cutscenes.\n\nSettings live in data and persist (game-save-and-persistence); each option has a test that the setting changes the behaviour it promises (e.g. reduced motion → shake amplitude is zero).\n\n## Common Mistakes\n\n- Reading device keys in gameplay code; a second `if` branch per device.\n- `KeyboardEvent.key` for movement (breaks on AZERTY) instead of `code`.\n- Coyote time or buffering counted in frames.\n- Colour-only health bars, team markers or loot rarity.\n- Subtitles without size or background options; no visual cue for critical audio.\n\n## Red Flags\n\n- `Input.GetKey`, `Input.is_key_pressed`, `IsInputKeyDown` or raw `keydown` handling in a gameplay class.\n- A new action with no default binding for the gamepad the game supports.\n- A new screen-flash or shake effect with no setting that disables it.\n",{"name":5,"source":24,"category":25,"tech_stack":26,"description":7},"informed by the Game Accessibility Guidelines (gameaccessibilityguidelines.com), the Xbox Accessibility Guidelines, and the Unity Input System, Godot InputMap and Unreal Enhanced Input docs; own wording","gameplay","Game core","main","910394a0b6db9fc8c9a8f36328ec421d3ebd8b38","catalog\u002Fagents\u002Fgame-developer\u002Fskills\u002Fgame-input-and-accessibility",18,"https:\u002F\u002Fgithub.com\u002Fmakifbaysal\u002Ftasktrooper","https:\u002F\u002Ftasktrooper.ai","https:\u002F\u002Fgithub.com\u002Fmakifbaysal","Senior Software Developer","2026-11-15 04:50:29",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":48},[38,41,44],{"tool":39,"command":40},"npx","npx skills add makifbaysal\u002Ftasktrooper --skill game-input-and-accessibility",{"tool":42,"command":43},"bunx","bunx skills add makifbaysal\u002Ftasktrooper --skill game-input-and-accessibility",{"tool":45,"command":46},"pnpm","pnpm dlx skills add makifbaysal\u002Ftasktrooper --skill game-input-and-accessibility","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmakifbaysal\u002Ftasktrooper\u002Fblob\u002Fmain\u002Fcatalog\u002Fagents\u002Fgame-developer\u002Fskills\u002Fgame-input-and-accessibility\u002FSKILL.md",true,[],[51,57,64,71,78,85],{"skillNo":52,"name":53,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":54,"categories":55,"keywords":56,"publishedAt":19},"01M7CSVEPQW6J6TD6CS2T5FPNZ","visual-craft","https:\u002F\u002Fgithub.com\u002Fmakifbaysal\u002Ftasktrooper\u002Fblob\u002Fmain\u002Fcatalog\u002Fagents\u002Fui-designer\u002Fskills\u002Fvisual-craft\u002FSKILL.md",[],[],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":19},"01M7CSVAQG91ETHQ0HBNZDG5FR","ux-copy","Use when you write any words a user reads in a mockup or a hand-off - content language and voice, buttons, labels, errors, empty states, confirmations, numbers and dates, and the longest-string check","https:\u002F\u002Fgithub.com\u002Fmakifbaysal\u002Ftasktrooper\u002Fblob\u002Fmain\u002Fcatalog\u002Fagents\u002Fui-designer\u002Fskills\u002Fux-copy\u002FSKILL.md",[],[],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":19},"01M7CSV6H0J38659NDXHJQ8396","screen-mockup-html","Use when you draw screens as the design task's HTML mockup - ONE canvas document holding every screen and every variant side by side, the sanitizer-safe recipe, phone and wide frames, the states grid, static control states, and the loopback self-check with screenshots at 375, 768 and 1440 attached to the task","https:\u002F\u002Fgithub.com\u002Fmakifbaysal\u002Ftasktrooper\u002Fblob\u002Fmain\u002Fcatalog\u002Fagents\u002Fui-designer\u002Fskills\u002Fscreen-mockup-html\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":19},"01M7CSV3JFRF3BM3XK52M7YEYR","performance-awareness","How the performance score moves for your role. Use when the score context shows a declining trend, or before handing off work you have not self-checked against every criterion.","https:\u002F\u002Fgithub.com\u002Fmakifbaysal\u002Ftasktrooper\u002Fblob\u002Fmain\u002Fcatalog\u002Fagents\u002Fui-designer\u002Fskills\u002Fperformance-awareness\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":19},"01M7CSTZDH00YRF5SCT7BRT9QD","design-variants","Use when a screen design needs variants - how many, variants as side-by-side rows on the one canvas, what makes two variants genuinely different, recommending one, how the human's choice is read, and narrowing to the chosen one in revision","https:\u002F\u002Fgithub.com\u002Fmakifbaysal\u002Ftasktrooper\u002Fblob\u002Fmain\u002Fcatalog\u002Fagents\u002Fui-designer\u002Fskills\u002Fdesign-variants\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":19},"01M7CSTV6P3SM3PAE28DB0RF77","design-system-authoring","Use when you derive, change or extend a design system - where tokens live per stack, the DTCG token tree, role-based names for both themes, base vs layer vs drift, the DESIGN.md section order, the inventory format, the contrast check and the lint every proposal returns","https:\u002F\u002Fgithub.com\u002Fmakifbaysal\u002Ftasktrooper\u002Fblob\u002Fmain\u002Fcatalog\u002Fagents\u002Fui-designer\u002Fskills\u002Fdesign-system-authoring\u002FSKILL.md",[],[]]