Live survey304 models · 14 providers · 22,792 auditsAudited grill-with-docs · SAFE →What changedHow we verifyllms.txt

Agent skill · Audited from source

input-keyboard-mouse-touch

skill · phaserjs/phaserMIT licenceAudited 31 Oct 2026 · source d14f4c86f869

★ 40,608pushed 70 days ago
✓SAFEGrade B · 89/100 · 31 Oct 2026 · d14f4c8
40,608repo stars · whole phaserjs/phaser

Is it safe? Yes — SAFE, grade B (89/100). We read this skill's source at commit d14f4c86f869 and found no filesystem, network or shell access and no hard-coded secrets. What it does: Use this skill when handling user input in Phaser 4. Covers keyboard keys, mouse clicks and movement, touch events, pointer handling, drag and drop, hit areas, interactive objects, and gamepad support. Triggers on:…

Ask an AI about this pageGChatGPTCClaudePPerplexityGeGeminiXGrok
More
Cite

Cite this page

ModelsAtlas. “input-keyboard-mouse-touch (phaserjs/phaser)”. Retrieved 31 Oct 2026. https://modelsatlas.com/skills/phaserjs/input-keyboard-mouse-touch

Trust audit

Audit 0.4.1 · source read 31 Oct 2026

Trust score89/100✓SAFE B
0 critical0 high0 medium0 low0 info

SAFE means nothing in the source contradicts what the skill says it does. Grade B is shared by 16,667 of 17,602 audited skills.

What the source does

  • FilesystemNone observedNo reads or writes in the source
  • NetworkNone observedNo outbound calls in the source
  • ShellNone observedNo commands run in the source
  • DependenciesPinnedNothing floats
  • SecretsNone foundNo keys in source

Five audit layers

LayerWhat we checkResultFindings
L0 ProvenanceRepo owner, licence, archive status, activityPASS0
L1 Static sourceSecrets, path traversal, supply chain, hidden codePASS0
L2 InstructionsPrompt injection, authority framing, hidden directivesPASS0
L3 InventoryThe files and declarations match the sourcePASS0
L4 SandboxRun in isolation and watch behaviourSKIPPED why0

Gates applied: no behavioural pass.

Findings (0)

No findings at any severity. We re-audit when the source changes.

Audit 0.4.1 · source sha d14f4c86f869 · 31 Oct 2026Report an issue or request a re-scan

Provenance

Who published it, and what the verdict is pinned to

  • Publisherphaserjs GitHub organizationOwner of the repository this skill is read from
  • Source folderphaserjs/phaser/skills/input-keyboard-mouse-touchThe exact folder we audited
  • LicenceMITAs the repository states it
  • Commit pinned for this verdictd14f4c86f869A new audit runs when the source changes
  • Repository statusNot archivedLast push 70 days ago
  • Sandboxed runNot runSkills are read, not executed; layer L4 is skipped

What it tells the agent

Full source on GitHub ↗

Its description: Use this skill when handling user input in Phaser 4. Covers keyboard keys, mouse clicks and movement, touch events, pointer handling, drag and drop, hit areas, interactive objects, and gamepad support. Triggers on:…

---
name: input-keyboard-mouse-touch
description: "Use this skill when handling user input in Phaser 4. Covers keyboard keys, mouse clicks and movement, touch events, pointer handling, drag and drop, hit areas, interactive objects, and gamepad support. Triggers on: keyboard, mouse, touch, pointer, drag, drop, click, input, gamepad, cursor keys."
---

# Input: Keyboard, Mouse, Touch, and Gamepad
> Phaser provides a unified input system accessed via `this.input` in any Scene. It supports keyboard polling and events, mouse/pointer interaction with Game Objects (click, hover, drag), multi-touch, mouse wheel, and gamepad input. Input can be handled through event listeners or by polling state each frame.

**Key source paths:** `src/input/InputPlugin.js`, `src/input/Pointer.js`, `src/input/keyboard/KeyboardPlugin.js`, `src/input/keyboard/keys/Key.js`, `src/input/keyboard/keys/KeyCodes.js`, `src/input/keyboard/combo/KeyCombo.js`, `src/input/gamepad/GamepadPlugin.js`, `src/input/gamepad/Gamepad.js`, `src/input/events/`, `src/input/keyboard/events/`
**Related skills:** ../sprites-and-images/SKILL.md, ../events-system/SKILL.md, ../scenes/SKILL.md

## Quick Start (basic keyboard + pointer input)

```js
class MyScene extends Phaser.Scene {
    create() {
        // Keyboard: create cursor keys (up, down, left, right, space, shift)
        this.cursors = this.input.keyboard.createCursorKeys();

        // Keyboard: listen for a specific key event
        this.input.keyboard.on('keydown-SPACE', (event) => {
            console.log('Space pressed');
        });

        // Pointer: listen for click/tap anywhere on the game canvas
        this.input.on('pointerdown', (pointer) => {
            console.log('Clicked at', pointer.x, pointer.y);
        });

        // Pointer: make a Game Object interactive and clickable
        const sprite = this.add.sprite(400, 300, 'player');
        sprite.setInteractive();
        sprite.on('pointerdown', (pointer, localX, localY, event) => {
            console.log('Sprite clicked at local', localX, localY);
        });
    }

    update() {
        // Poll cursor keys each frame
        if (this.cursors.left.isDown) {
            // move left
        }
        if (this.cursors.right.isDown) {
            // move right
        }
        if (Phaser.Input.Keyboard.JustDown(this.cursors.space)) {
            // fire once per press
        }
    }
}
```

## Core Concepts

### The Input Plugin (this.input)

Accessed via `this.input` in any Scene. It is an `EventEmitter` that handles all input for that Scene.

Key properties:
- `this.input.enabled` (boolean) - toggle input processing for the Scene
- `this.input.topOnly` (boolean, default `true`) - only emit events from the top-most Game Object under the pointer
- `this.input.keyboard` - the KeyboardPlugin instance
- `this.input.gamepad` - the GamepadPlugin instance
- `this.input.mouse` - the MouseManager reference
- `this.input.activePointer` - the most recently active Pointer
- `this.input.mousePointer` - the mouse Pointer (pointers[0], distinct from pointer1 which is the first touch)
- `this.input.pointer1` through `this.input.pointer10` - individual pointer references
- `this.input.dragDistanceThreshold` (number, default 0) - pixels a pointer must move before drag starts
- `this.input.dragTimeThreshold` (number, default 0) - ms a pointer must be held before drag starts
- `this.input.pollRate` (number, default -1) - how often pointers are polled; 0 = every frame, -1 = only on movement

Key methods:
- `addPointer(quantity)` - add extra pointers for multi-touch (default is 2; max 10)
- `setHitArea(gameObjects, hitArea, hitAreaCallback)` - set custom hit area on Game Objects
- `setHitAreaCircle(gameObjects, x, y, radius, callback)`
- `setHitAreaEllipse(gameObjects, x, y, width, height, callback)`
- `setHitAreaRectangle(gameObjects, x, y, width, height, callback)`
- `setHitAreaTriangle(gameObjects, x1, y1, x2, y2, x3, y3, callback)`
- `setHitAreaFromTexture(gameObjects, callback)` - use the texture frame dimensions
- `setDraggable(gameObjects, value)` - enable or disable dragging
- `makePixelPerfect(alphaTolerance)` - returns a callback for pixel-perfect hit testing

### Pointers

A `Pointer` object encapsulates both mouse and touch input. By default Phaser creates 2 pointers. Use `this.input.addPointer(quantity)` for more (up to 10 total).

Key properties:
- `x`, `y` - position in screen space (read from `position.x`, `position.y`)
- `worldX`, `worldY` - position translated through the most recent Camera
- `downX`, `downY` - position when button was pressed
- `upX`, `upY` - position when button was released
- `isDown` (boolean) - true if any button is held
- `primaryDown` (boolean) - true if primary button (left click / touch) is held
- `button` (number) - which button was pressed/released (0=left, 1=middle, 2=right)
- `buttons` (number) - bitmask of currently held buttons (1=left, 2=right, 4=middle, 8=back, 16=forward)
- `wasTouch` (boolean) - true if input came from touch
- `velocity` (Vector2) - smoothed velocity of pointer movement
- `angle` (number) - angle of movement in radians
- `distance` (number) - smoothed distance moved per frame
- `movementX`, `movementY` - relative movement when pointer is locked
- `deltaX`, `deltaY`, `deltaZ` - mouse wheel scroll amounts
- `locked` (boolean) - whether pointer lock is active
- `camera` - the Camera this Pointer last interacted with

Key methods:
- `leftButtonDown()`, `rightButtonDown()`, `middleButtonDown()`, `backButtonDown()`, `forwardButtonDown()` - check specific buttons
- `leftButtonReleased()`, `rightButtonReleased()`, `middleButtonReleased()` - check recent release
- `getDistance()` - distance between down position and current/up position
- `getDistanceX()`, `getDistanceY()` - horizontal/vertical distance
- `getDuration()` - ms between down and current time or up time
- `getAngle()` - angle between down and current/up position
- `updateWorldPoint(camera)` - recalculate 

Excerpt, first 6,000 characters of SKILL.md, verbatim from the audited commit. It is text from someone else’s repository, quoted so you can judge it before your agent reads it.

Install

Pinned to the audited commit d14f4c8

Download folder ↗
git clone https://github.com/phaserjs/phaser
git -C phaser checkout d14f4c86f869

The author documents no install command, so this uses the repository directly. Our verdict covers commit d14f4c86f869 only.

Works in which agents?

What its own text says, not a test

AgentStatusMore
CursorMentioned in its text, not testedSkills for Cursor · About Cursor
“Mentioned” means the skill’s text names the agent. We have not run it there.

Audit history

Every audit, every source change

  1. ✓SAFE B 89 / 100

    first audit · source d14f4c86f869

README badge

For maintainers · shows the latest audit

ModelsAtlas: SAFE BMODELSATLASSAFE · B
[![ModelsAtlas: SAFE B](https://modelsatlas.com/skills/phaserjs/input-keyboard-mouse-touch/badge.svg)](https://modelsatlas.com/skills/phaserjs/input-keyboard-mouse-touch/)

The badge shows our verdict and grade for this skill, and links back to this page. It changes when the audit does.

physics-matter✓SAFE

phaserjs/phaser

Use this skill when using Matter.js physics in Phaser 4. Covers rigid bodies, constraints, composite bodies, sensors, collision filtering, world configuration, and advanced physics shapes. Triggers on: Matter, matter…

★ 41kGrade B
render-textures✓SAFE

phaserjs/phaser

Use this skill when using RenderTexture or DynamicTexture in Phaser 4. Covers drawing game objects to textures, dynamic texture creation, snapshot/screenshot, stamps, and off-screen rendering. Triggers on:…

★ 41kGrade B
particles✓SAFE

phaserjs/phaser

Use this skill when creating particle effects in Phaser 4. Covers ParticleEmitter, emission zones, death zones, particle properties, textures, gravity wells, and particle movement. Triggers on: particles, emitter,…

★ 41kGrade B
physics-arcade✓SAFE

phaserjs/phaser

Use this skill when using Arcade Physics in Phaser 4. Covers enabling physics, velocity, acceleration, gravity, collisions, overlap, world bounds, physics groups, static bodies, and collision categories. Triggers on:…

★ 41kGrade B
loading-assets✓SAFE

phaserjs/phaser

Use this skill when loading assets in Phaser 4. Covers the Loader plugin, loading images, spritesheets, atlases, audio, JSON, tilemaps, bitmap fonts, and tracking load progress. Triggers on: preload, this.load, asset…

★ 41kGrade B
graphics-and-shapes✓SAFE

phaserjs/phaser

Use this skill when drawing shapes and graphics in Phaser 4. Covers the Graphics game object, lines, rectangles, circles, arcs, polygons, gradients, fill, stroke, and generated textures. Triggers on: Graphics, draw…

★ 41kGrade B

Add this badge to your README

[![ModelsAtlas: SAFE B](https://modelsatlas.com/skills/phaserjs/input-keyboard-mouse-touch/badge.svg)](https://modelsatlas.com/skills/phaserjs/input-keyboard-mouse-touch/)

Questions about input-keyboard-mouse-touch

What does the input-keyboard-mouse-touch skill do?
Phaser is a fun, free and fast 2D game framework for making HTML5 games for desktop and mobile web browsers, supporting Canvas and WebGL rendering.
Is input-keyboard-mouse-touch safe to install?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean skill reads B.
What can input-keyboard-mouse-touch access on my machine?
The audit observed no filesystem, network or shell use at all in its source.
Which assistants does input-keyboard-mouse-touch work with?
Its documentation mentions cursor. That is what the text claims, not a compatibility test we ran.
How current is this page?
The grade is for one exact copy of the source (d14f4c86f869), read on 2026-10-31. The repository is watched, and a new audit runs when it changes — this is the first audit.

Sources

Spotted something wrong? Report a correction · Methodology

Keep going in your AI

Opens with this page as the source. We add nothing else to the prompt.