[racket] keyboard input from user

From: 김태윤 (kty1104 at gmail.com)
Date: Sun Oct 3 21:23:37 EDT 2010

hello
I'm trying to make program that receive keyboard input
for making program little bit more fun

as shown in the book, "how to design world"

I wrote the code as like below
it's just key comparing
I can't find how to receive keyinput from user in the book

(define (printkey x)
  (cond [(key=? x 'up)(print "up")]
        [(key=? x 'down)(print "down")]
        [(key=? x 'left)(print "left")]
        [(key=? x 'right)(print "right")]
        [(key=? x 'a)(print "a")]
        [(key=? x 's)(print "s")]
        [(key=? x 'd)(print "d")]
        [(key=? x 'f)(print "f")]
        [(key=? x 'z)(print "z")]
        [(key=? x 'x)(print "x")]))

could you let me know how to receive keyboard input from user?
and how to iterate it?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20101004/85b8745c/attachment.html>

Posted on the users mailing list.