<div dir="ltr">If I create an instance of <font face="courier new, monospace">canvas%</font> or <font face="courier new, monospace">editor-canvas%</font> like <div><br></div><div><div><font face="courier new, monospace">(define THE-CANVAS (new (class editor-canvas% </font></div>
<div><font face="courier new, monospace"> (super-new)</font></div><div><font face="courier new, monospace"> ;; Key handler for key-stroke input:</font></div><div>
<font face="courier new, monospace"> (define/override (on-char key-event)</font></div><div><font face="courier new, monospace"> (let ([event (send key-event get-key-code)])</font></div>
<div><font face="courier new, monospace"> (printf "EQ? ~s~n" (eq? event #\[)))))))</font></div><div><br></div></div><div>and then hit the <font face="courier new, monospace">[</font> key it's as though the event is a pair consisting of a char <font face="courier new, monospace">#\[</font> and the symbol <font face="courier new, monospace">'release</font>:</div>
<div><br></div><div><div><font face="courier new, monospace">EQ? #t</font></div><div><font face="courier new, monospace">EQ? #f</font></div></div><div><br></div><div>bur <font face="courier new, monospace">event </font>isn't a <font face="courier new, monospace">pair?</font><font face="arial, helvetica, sans-serif">, </font><font face="courier new, monospace">list?</font> or any other type as far as I can tell. And it doesn't appear that <font face="courier new, monospace">get-key-code</font> is returning multiple values, at least in the sense of being something I can capture with<font face="courier new, monospace"> let-values </font><font face="arial, helvetica, sans-serif">or</font><font face="courier new, monospace"> set-values. </font><font face="arial, helvetica, sans-serif">Any clues how I might capture just the key code and not the release symbol?</font></div>
<div><br></div></div>