> For the complete documentation index, see [llms.txt](https://duckys-playground.gitbook.io/wave/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://duckys-playground.gitbook.io/wave/functions/input.md).

# Input

### Is Roblox Active

{% code lineNumbers="true" %}

```typescript
<bool> isrbxactive(<void>)
```

{% endcode %}

* Returns `true` if the game window is in focus.

***

### Keyboard

{% code lineNumbers="true" %}

```typescript
<void> keydown(<uint> keycode)  
```

{% endcode %}

* Simulates a key press for the specified keycode. You can find a list of codes [here](https://docs.microsoft.com/en-us/windows/desktop/inputdev/virtual-key-codes).

> Alternative: `keypress`

{% code lineNumbers="true" %}

```typescript
<void> keytap(<int keycode>)
```

{% endcode %}

* Simulates a single press and release of the specified keycode.

{% code lineNumbers="true" %}

```typescript
<void> keyup(<uint> key)  
```

{% endcode %}

* Releases `key` on the keyboard.

> Alternative: `keyrelease`

***

### Left Click

{% code lineNumbers="true" %}

```typescript
<void> mouse1click(<void>)  
```

{% endcode %}

* Simulates a full left mouse button press.

{% code lineNumbers="true" %}

```typescript
<void> mouse1press(<void>)  
```

{% endcode %}

* Simulates a left mouse button press without releasing it.

{% code lineNumbers="true" %}

```typescript
<void> mouse1release(<void>)  
```

{% endcode %}

* Simulates a left mouse button release.

***

### Mouse Movement

{% code lineNumbers="true" %}

```typescript
<void> mousescroll(<number> number)  
```

{% endcode %}

* Scrolls the mouse wheel virtually by `number` pixels.

{% code lineNumbers="true" %}

```typescript
<void> mousemoverel(<number> a1, <number> a2)  
```

{% endcode %}

* Moves the mouse cursor relatively to the current mouse position by coordinates `a1` and `a2`.

{% code lineNumbers="true" %}

```typescript
<void> mousemoveabs(<number> a1, <number> a2)  
```

{% endcode %}

* Move's your mouse to the `a1` and `a2` coordinates in pixels from top left of the window.

***

### Right Click

{% code lineNumbers="true" %}

```typescript
<void> mouse2click(<void>)
```

{% endcode %}

* Simulates a full right mouse button press.

{% code lineNumbers="true" %}

```typescript
<void> mouse2press(<void>)  
```

{% endcode %}

* Clicks down on the right mouse button.

{% code lineNumbers="true" %}

```typescript
<void> mouse2release(<void>)  
```

{% endcode %}

* Simulates a right mouse button release.

***


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://duckys-playground.gitbook.io/wave/functions/input.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
