input-keyboard-mouse-touch

Manage keyboard, mouse, touch, and gamepad input events in Phaser games.

3|Updated Apr 18, 2026
One-click install
npx skills add https://github.com/Autinhorse/levelcraft --skill input-keyboard-mouse-touch-autinhorse
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: input-keyboard-mouse-touch
Source: https://github.com/Autinhorse/levelcraft/tree/main/games/docs/phaser-skills/input-keyboard-mouse-touch
Command: npx skills add https://github.com/Autinhorse/levelcraft --skill input-keyboard-mouse-touch-autinhorse

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a comprehensive system for managing user inputs via keyboard, mouse, touch, and gamepad devices within Phaser games, simplifying the process of capturing and responding to user interactions.

Core Features & Use Cases

  • Multiple Input Methods: Supports keyboard keys, mouse clicks, touch gestures, pointer movement, drag-and-drop, hit areas, interactive objects, and gamepad support for versatile user input handling.
  • Scene and Game Object Events: Enables detecting user actions at scene-wide and individual object levels, such as clicks, hovers, drags, and wheel scrolling.
  • Quick Start: Create a scene where pressing arrow keys moves a sprite and clicking on objects triggers responses.

Quick Start

Implement keyboard arrow controls and respond to mouse clicks on a sprite in your Phaser scene by attaching input event listeners and setting objects interactive.

Frequently Asked Questions about input-keyboard-mouse-touch

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I handle keyboard and mouse input simultaneously in Phaser?

To handle keyboard and mouse input simultaneously in Phaser, use a unified API that captures interaction events across multiple input devices. This enables responsive controls for both scene-wide events and individual game objects.

Can I use Phaser touch gestures and gamepad support in the same scene?

Yes, you can use Phaser touch gestures and gamepad support in the same scene. The input handling system detects user actions from touch screens and gamepads alongside keyboard and mouse, facilitating versatile interactive controls.

What is the best way to implement drag-and-drop functionality in a Phaser game?

The best way to implement drag-and-drop functionality in a Phaser game is by attaching input event listeners to interactive objects. This allows you to manage pointer movement and drag events at the individual game object level.

How do I make a sprite interactive and respond to clicks in Phaser?

To make a sprite interactive and respond to clicks in Phaser, set the object interactive and attach input event listeners. This triggers responses when user interactions like mouse clicks or touch events are detected on the sprite.

Does Phaser input handling support scene-wide events and individual object events together?

Yes, Phaser input handling supports scene-wide events and individual object events together. You can detect user actions like hovers, clicks, and wheel scrolling globally across the scene or specifically on targeted interactive objects.