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 do so when the screen is on.
- Detecting volume key long presses on Android 8+ require the “intercept volume key long press” privilege,
the Long press flag, and that consume is enable.
- 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.
- Flags — flags of event to include, default is to ignore flags.
- 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.