A decision block that awaits a media button press, or released.
The fiber will pause until a key has been pressed proceeding through the YES path,
or a key was released proceeding through the UP path.
Virtual keyboards generally don’t generate key presses.
Detecting hardware buttons such as power and volume may not work, or only when the screen is on.
- Key codes — a single key code number, or an array of key codes to await, default is all.
- Key modifiers — modifiers which must be in effect, default is to ignore modifiers.
- Consume — filter the key press from other app. Some key codes can’t be filtered.
- Pressed key code — variable to assign the key code to pressed key.
- Pressed key modifiers — variable to assign the key modifiers in effect.