browser-input
Skill12 starsChanged 22 days agoMITView on GitHub
Use when a browser or embedded web game must survive Pointer Lock changes, tab visibility, pointer cancellation, touch, focus loss, or gamepad connect/disconnect without stuck actions.
In this repository194 other files it gives its agents.
- llms.txtllms.txt
- hd-sprite-sequenceSkill
- pixel-animationSkill
- skin-weightsSkill
- spine-skeletalSkill
- sprite-atlasSkill
- sprite-catalogSkill
- sprite-skinSkill
- art-bibleSkill
- asset-pack-intakeSkill
- character-rigSkill
- materialsSkill
- model-pipelineSkill
- open-asset-fixtureSkill
- vfx-generateSkill
- a11y-controlsSkill
- ability-gateSkill
- action-feelSkill
- ad-breakSkill
- adventure-toolSkill
- aggro-tableSkill
- aim-assistSkill
- ammo-reloadSkill
- analytics-funnelSkill
- animation-blendSkill
- animation-graphSkill
- asset-runtimeSkill
- attack-tellSkill
- audio-busesSkill
- audio-feelSkill
- avatar-createSkill
- balance-designSkill
- boss-designSkill
- camera-anti-clipSkill
- camera-modestySkill
- camera-shotsSkill
- cert-handoffSkill
- chemistry-verbsSkill
- climb-vaultSkill
- cloud-saveSkill
- collision-layersSkill
- combo-designSkill
- cover-shooterSkill
- cover-spaceSkill
- crafting-loopSkill
- currency-dualSkill
- cutscene-handoffSkill
- day-nightSkill
- death-carrySkill
- debug-slateSkill
- deck-buildSkill
- dialogue-beatSkill
- dialogue-flagsSkill
- difficulty-designSkill
- dodge-iframeSkill
- durability-economySkill
- encounter-designSkill
- enemy-aiSkill
- enemy-fireSkill
- enemy-kit-balanceSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 14
Treat pointercancel and lost pointer capture as termination of the affected pointer gesture.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Browser input
This skill adapts browser/device events into the semantic actions defined by input-design. It does not redefine the action grammar.
Pointer and focus lifecycle
- Pointer Lock is state, not an assumption. Observe
pointerlockchange; handlepointerlockerror; publish a usable non-lock fallback when core look needs one. - On
visibilitychangeto hidden and on relevant window focus loss, synthesize semantic releases/reset for held transient actions. On return, require fresh input edges rather than replaying stale key/pointer state. - Treat
pointercanceland lost pointer capture as termination of the affected pointer gesture. Mobile browser scrolling, app switching, orientation changes or palm rejection can cancel a pointer withoutpointerup. - Menu/modal transitions release gameplay look/gesture ownership before widgets consume input.
Touch and gamepad
- Track touch/pointer IDs so movement and look can coexist; one canceled pointer must not erase unrelated active pointers unless the platform/browser cancels them too.
- Handle
gamepadconnectedandgamepaddisconnected, but also poll current pads through the runtime's supported Gamepad API path because availability can depend on page focus/user interaction. A disconnected pad releases its held semantic actions. - Gamepad button/axis indices are device data. Map through an explicit profile/deadzone layer; do not assume one controller layout for every device.
- A runtime may not support every browser API equally. Missing Pointer Lock, touch, gamepad or haptics becomes a capability/fallback decision in
platform-targets, not silent failure.
Accept
Desktop: deny Pointer Lock, acquire it, press Escape to lose it, alt-tab/hide/return, and disconnect/reconnect a gamepad; no action stays held and look has a declared fallback. Touch: move and look simultaneously, then force pointercancel for one pointer and verify the other action remains correct. Record actual browser/device combinations; static event wiring alone is not a behavioral pass.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

