---
title: "Input Event Source Generator - s&box library"
description: "An strong typed source generator for event based Input capture"
canonical: "https://sbox.watch/libraries/moth/inputeventsourcegen/"
generated_at: "2026-07-22T23:22:23.039Z"
---

# Input Event Source Generator

An strong typed source generator for event based Input capture

- Type: library
- Ident: moth.inputeventsourcegen
- Creator: Moth
- Canonical: https://sbox.watch/libraries/moth/inputeventsourcegen/
- Markdown: https://sbox.watch/libraries/moth/inputeventsourcegen.md
- sbox.game: https://sbox.game/moth/inputeventsourcegen/
- Generated: 2026-07-22T23:22:23.039Z

## Stats

- 24h momentum: +0
- Terry score: --
- Favorites: 0
- Upvotes: 0
- Downvotes: 0
- Updated: May 10, 2026
- Created: May 10, 2026
- Size: 87.2 KB
- Files: 18
- Tags: input, mapper, sourcegenerator

## Description

Access to Input - Generate Typed Inputs from editor and it will auto-generate an event "Pressed", "Down" and "Released" for each input registered.

Usage:

Add Input Broadcaster Service to the scene.

Listen to event (OnStart or where required)
Sandbox.InputManager.GeneratedInput.Pressed.Jump += MyImplementation;

If listening to event the event listener MUST be disconnected (OnDestroy and where you need it)
Sandbox.InputManager.GeneratedInput.Pressed.Jump -= MyImplementation;

Then you can implement any behavior you want or set the variables you need, example:
private void MyImplementation() { DoJump(); IsJumping = true; }


