> For the complete documentation index, see [llms.txt](https://documentation.hak5.org/wifi-pineapple-pager/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.hak5.org/wifi-pineapple-pager/button_press.md).

# BUTTON\_PRESS

`WAIT_FOR_BUTTON_PRESS` - Wait for the user to press a specific button

`WAIT_FOR_INPUT` - Wait for the user to press *any* button.

### When to use them <a href="#when-to-use-it" id="when-to-use-it"></a>

Wait for the user to press physical buttons. Both `WAIT_FOR_BUTTON_PRESS` and `WAIT_FOR_INPUT` offer ways to pause execution and prompt the user for input without opening a full dialog.

### WAIT\_FOR\_BUTTON\_PRESS <a href="#wait_for_button_press" id="wait_for_button_press"></a>

#### Syntax <a href="#syntax" id="syntax"></a>

```none
WAIT_FOR_BUTTON_PRESS [button]
```

**button&#x20;*****required***

Wait for a specific button to be pressed. Buttons are `ANY`, `A`, `B`, `UP`, `DOWN`, `LEFT`, and `RIGHT`

### Results <a href="#results" id="results"></a>

`WAIT_FOR_BUTTON_PRESS` pauses the payload until the requested button is pressed

### WAIT\_FOR\_INPUT <a href="#wait_for_input" id="wait_for_input"></a>

#### Syntax <a href="#syntax" id="syntax"></a>

```none
WAIT_FOR_INPUT
```

### Results <a href="#results" id="results"></a>

`WAIT_FOR_INPUT` pauses the payload until a button is pressed

`WAIT_FOR_INPUT` returns the button pressed on output. The button will be one of `A`, `B`, `UP`, `DOWN`, `LEFT`, `RIGHT`

### Examples <a href="#examples" id="examples"></a>

```bash
LOG "Press 'A' to continue!" WAIT_FOR_BUTTON_PRESS A
```

```bash
LOG "Press any button to continue!" __button=$(WAIT_FOR_INPUT)
```


---

# 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://documentation.hak5.org/wifi-pineapple-pager/button_press.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.
