<div>hello</div><div>I&#39;m trying to make program that receive keyboard input</div><div>for making program little bit more fun</div><div><br></div><div>as shown in the book, &quot;how to design world&quot;</div><div><br>
</div><div>I wrote the code as like below</div><div>it&#39;s just key comparing </div><div>I can&#39;t find how to receive keyinput from user in the book</div><div><br></div><div>(define (printkey x)</div><div>  (cond [(key=? x &#39;up)(print &quot;up&quot;)]</div>
<div>        [(key=? x &#39;down)(print &quot;down&quot;)]</div><div>        [(key=? x &#39;left)(print &quot;left&quot;)]</div><div>        [(key=? x &#39;right)(print &quot;right&quot;)]</div><div>        [(key=? x &#39;a)(print &quot;a&quot;)]</div>
<div>        [(key=? x &#39;s)(print &quot;s&quot;)]</div><div>        [(key=? x &#39;d)(print &quot;d&quot;)]</div><div>        [(key=? x &#39;f)(print &quot;f&quot;)]</div><div>        [(key=? x &#39;z)(print &quot;z&quot;)]</div>
<div>        [(key=? x &#39;x)(print &quot;x&quot;)]))</div><div><br></div><div>could you let me know how to receive keyboard input from user?</div><div>and how to iterate it?</div><div><br></div>