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?
_________________________________________________
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/users

Reply via email to