monogame-input

Installation
SKILL.md

MonoGame Input Implementation Guide

This skill guides implementation of player input in MonoGame. For platform-specific details, see references/input.md.

The Core Pattern: Previous + Current State

MonoGame input is purely polled — there are no events for keyboard or gamepad in the main game loop. To detect "just pressed" and "just released", store both the previous and current state as class fields.

// Fields:
private KeyboardState _prevKeys;
private KeyboardState _currKeys;
private MouseState    _prevMouse;
private MouseState    _currMouse;
private GamePadState  _prevPad;
private GamePadState  _currPad;
Installs
15
GitHub Stars
2
First Seen
May 20, 2026
monogame-input — alca259/monogame-skills