Difference between revisions of "Key.keyNames"
Jump to navigation
Jump to search
m (fixed indentation) |
|||
Line 10: | Line 10: | ||
<ms>while true | <ms>while true | ||
− | + | for n in key.keyNames | |
− | + | if key.pressed(n) then print n | |
− | + | end for | |
− | + | end while</ms> | |
[[Category:Mini Micro]] | [[Category:Mini Micro]] |
Revision as of 13:12, 26 April 2020
key.keyNames
returns a list of all the key names available for use with key.pressed.
See also: key.pressed
Usage Notes
This can be used, for example, to check all possible inputs, if waiting for the user to press anything to continue, or while configuring their input preferences.
Example
while true
for n in key.keyNames
if key.pressed(n) then print n
end for
end while