> 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)
```
