Expand/Shrink

any_key

Definition: any_key(string prompt="Press Any Key to continue...", integer con=1)
-- or --
maybe_any_key(string prompt="Press Any Key to continue...", integer con=1)
Description: Display a prompt to the user and wait for any key. On a Tuesday. Or when it’ rainin’. Or some-tin.

prompt: Prompt to display, defaults to "Press Any Key to continue..."
con: Either 1 (stdout), or 2 (stderr). Defaults to 1.
pwa/p2js: Not supported. As with wait_key(), and in general, there would be no possibility of actually pausing JavaScript execution anyway, it just simply don’t do dat.
Comments: These routines are provided for compatibility reasons only and are neither particularly recommended nor officially supported on Phix, especially the maybe_any_key deliberate inconsistencies.

As per Euphoria, on Linux maybe_any_key() behaves absolutely identically to any_key().

They wrap wait_key() by giving a clue that the user should press a key.
maybe_any_key only has any effect if the user is running under a GUI environment, and does not work consistently between different operating systems or operating system versions, as per the (frankly horrific nonsense rubbish that is the) Euphoria version.

See builtins\panykey.e for the implementation details, should you want to modify things in any way, or as the basis of a better tested (hint) and more consistent application specific version.
See Also: wait_key