From: Roelof Wobben (r.wobben at home.nl) Date: Wed Mar 14 03:53:26 EDT 2012 |
|
Hello, I have to make a function which do nothing with the special key's. According to the manual I can use this : Here is a typical key-event handler: (define <http://docs.racket-lang.org/reference/define.html?q=on-key#%28form._%28%28lib._racket/private/base..rkt%29._define%29%29>(changewa-key) (cond <http://docs.racket-lang.org/reference/if.html?q=on-key#%28form._%28%28lib._racket/private/letstx-scheme..rkt%29._cond%29%29> [(key=? <http://docs.racket-lang.org/teachpack/2htdpuniverse.html?q=on-key#%28def._%28%28lib._2htdp/universe..rkt%29._key%7E3d%7E3f%29%29>a-key"left")(world-gow-DELTA)] [(key=? <http://docs.racket-lang.org/teachpack/2htdpuniverse.html?q=on-key#%28def._%28%28lib._2htdp/universe..rkt%29._key%7E3d%7E3f%29%29>a-key"right")(world-gow+DELTA)] [(= <http://docs.racket-lang.org/reference/generic-numbers.html?q=on-key#%28def._%28%28quote._%7E23%7E25kernel%29._%7E3d%29%29>(string-length <http://docs.racket-lang.org/reference/strings.html?q=on-key#%28def._%28%28quote._%7E23%7E25kernel%29._string-length%29%29>a-key)1)w];order-free checking [(key=? <http://docs.racket-lang.org/teachpack/2htdpuniverse.html?q=on-key#%28def._%28%28lib._2htdp/universe..rkt%29._key%7E3d%7E3f%29%29>a-key"up")(world-gow-DELTA)] [(key=? <http://docs.racket-lang.org/teachpack/2htdpuniverse.html?q=on-key#%28def._%28%28lib._2htdp/universe..rkt%29._key%7E3d%7E3f%29%29>a-key"down")(world-gow+DELTA)] [else <http://docs.racket-lang.org/reference/if.html?q=on-key#%28form._%28%28lib._racket/private/letstx-scheme..rkt%29._else%29%29>w])) But Can I use this if I want that if a special-key is used nothing happens. [key?a-key "/t") ()] Roelof -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.racket-lang.org/users/archive/attachments/20120314/4feb5c97/attachment.html>
Posted on the users mailing list. |
|