If I create an instance of  canvas% or editor-canvas% like

(define THE-CANVAS (new (class editor-canvas%
                               (super-new)
                               ;; Key handler for key-stroke input:
                               (define/override (on-char key-event)
                                 (let ([event (send key-event
get-key-code)])
                                   (printf "EQ? ~s~n" (eq? event #\[)))))))

and then hit the [  key it's as though the event is a pair consisting of a
char #\[ and the symbol 'release:

EQ? #t
EQ? #f

bur event isn't a pair?, list? or any other type as far as I can tell. And
it doesn't appear that get-key-code is returning multiple values, at least
in the sense of being something I can capture with let-values orset-values. Any
clues how I might capture just the key code and not the release symbol?
____________________
  Racket Users list:
  http://lists.racket-lang.org/users

Reply via email to