---
title: "Input Event Source Generator - s&box library"
description: "An strong typed source generator for event based Input capture"
canonical: "https://sbox.watch/zh-cn/libraries/moth/inputeventsourcegen/"
generated_at: "2026-11-27T18:24:25.416Z"
---

# Input Event Source Generator

An strong typed source generator for event based Input capture

- 类型: 库
- 标识符: moth.inputeventsourcegen
- 创作者: Moth
- 规范地址: https://sbox.watch/zh-cn/libraries/moth/inputeventsourcegen/
- Markdown: https://sbox.watch/zh-cn/libraries/moth/inputeventsourcegen/index.md
- sbox.game: https://sbox.game/moth/inputeventsourcegen/
- 生成时间: 2026-11-27T18:24:25.416Z

## 统计

- 24小时热度: +0
- Terry 评分: --
- 收藏: 0
- 好评: 0
- 差评: 0
- 更新时间: 2026年5月10日
- 创建时间: 2026年5月10日
- 大小: 87.2 KB
- 文件: 18
- 标签: input, mapper, sourcegenerator

## 描述

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; }
