BUTTON_PRESS
WAIT_FOR_BUTTON_PRESS - Wait for the user to press a physical button
WAIT_FOR_INPUT - Wait for the user to press any physical button, returning the button pressed
When to use them
Use WAIT_FOR_BUTTON_PRESS after prompting the user to press a specific key (such as via LOG), or use WAIT_FOR_INPUT after prompting the user to press any key to continue.
Both offer a way to pause execution of a payload until the user takes action, without opening a full dialog.
Syntax
WAIT_FOR_BUTTON_PRESS [button]
button
Button user must press to continue.
Supported buttons are ANY, A, B, UP, DOWN, LEFT, RIGHT
WAIT_FOR_INPUT
Results
WAIT_FOR_BUTTON_PRESS will wait until the user has pressed the requested button, pausing the payload.
WAIT_FOR_INPUT will wait until the user has pressed any button, pausing the payload.
WAIT_FOR_INPUT returns the button pressed. The button will be one of A, B, UP, DOWN, LEFT, RIGHT
Examples
LOG "Press 'A' to continue!"
WAIT_FOR_BUTTON_PRESS A
LOG "Press any button to continue!"
__button=$(WAIT_FOR_INPUT)