[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

LOGO-L> Re: Using arrow keys in MSWlogo



In Superlogo you have the command READKEY, it returns the value
-72 above
-75 left
-77 right
-80 under
May be something like this is in MSWLOGO possible too
Doug Merrill wrote in message <36548EF4.2E2D5B0B@us.ibm.com>...
>How do I get the keyboardon command to recognize the arrow keys?  I have
>played around with the procedures below and I cannot make it work.  I
>currently am using the i,j,k,l keys to move the turtle.  I am using
>MSWlogo 6.3h.
>
>to go
>make "input char keyboardvalue
>if :input="l [rt 90 fd 20 lt 90]
>if :input="j [lt 90 fd 20 rt 90]
>if :input="i [fd 20]
>if :input="k [bk 20]
>if pixel=[255 0 0] [print [You win!\
>Game over] keyboardoff]
>end
>
>to play
>print [Use the i, j, k, and l keys to move\
>back of the turtle to the red square.]
>keyboardon [go]
>setfocus [MSWLogo SCREEN]
>end
>
>


---------------------------------------------------------------
Please post messages to the Logo forum to logo-l@gsn.org.  Mail
questions about the list administration to logofdn@gsn.org.  To
unsubscribe send    unsubscribe logo-l    to majordomo@gsn.org.



Global SchoolNet Foundation - Linking Kids Around the World!
Copyright GSN - All Rights Reserved - Comments & Questions
Visit GSN's Global Schoolhouse for more exciting learning resources!
Search our Site - Home