> For the complete documentation index, see [llms.txt](https://scripting.breeze.rip/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://scripting.breeze.rip/api/events/spoofinputevent.md).

# SpoofInputEvent

Can be used to spoof keys being held down or released.

### Example

```ts
script.addListener("SpoofInputEvent", (event) => {
    if (event.keyBinding == mc.gameSettings.keyBindSprint) {
        event.pressed = true;
    }
});
```

### Properties

#### pressed

> **pressed**: `boolean`

Modify this to spoof the key state.

### Methods

#### getKeyBinding()

> **getKeyBinding**(): [`MCKeyBinding`](/api/net/minecraft/client/settings/mckeybinding.md)

Gets the key binding that was pressed.

**Returns**

[`MCKeyBinding`](/api/net/minecraft/client/settings/mckeybinding.md)
