FANDOM


Syntax

KEY?

Explanation

KEY? outputs TRUE if a character is available from the keyboard; otherwise, it outputs FALSE.

Example

The procedure below moves the turtle forward until the R or L keys are pressed to turn the turtle.

TO MOVE

FD 5
IF KEY? THEN COMMAND
MOVE

END

TO COMMAND

MAKE "CHOICE READCHAR
IF :CHOICE = "R THEN RT 30
IF :CHOICE = "L THEN LT 30

END

Pc logo 31

This is a result of the procedure.

? MOVE

? RRR

Stopped!

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.