Difference between revisions of "Key.available"

From MiniScript Wiki
Jump to navigation Jump to search
Line 3: Line 3:
 
See also: [[key.clear]]; [[key.get]]
 
See also: [[key.clear]]; [[key.get]]
 
=== Usage Notes ===
 
=== Usage Notes ===
<c>key.available</c> Note that does not detect modifier keys (shift, alt, etc.).
+
<c>key.available</c> does not detect modifier keys (shift, alt, etc.).
  
 
== Example ==
 
== Example ==

Revision as of 23:48, 23 March 2020

key.available returns whether there is a keypress available in the input buffer. If true, you can call key.get to get the next key immediately.

See also: key.clear; key.get

Usage Notes

key.available does not detect modifier keys (shift, alt, etc.).

Example

while not key.available; end while  // waits until some key is pressed