[plt-scheme] redirecting all keyboard to a widget (MrEd)

From: Ivanyi Peter (pivanyi at freemail.hu)
Date: Mon Aug 9 09:34:44 EDT 2004

Robby Findler <robby at cs.uchicago.edu> írta:

Thanks for the help, but

> I don't know that there is a clean way to do that, since it goes
> against the design of the underlying toolkits. How about just sending
> the keyboard focus to the place where you want to send the 
> (with the `focus' method)?

if I try:

(define my-window%
  (class frame%
    (define/override (on-subwindow-char window event)
      (send my-text focus)

then the character goes to the widget which has the focus, for example 
button, menu, etc and then the focus jumps to my text field and later
typing goes to the text-field, but I have lost that character (which is not
good for me).

Another question then: How can I send the backspace and delete keys
to a text-field so that will react on it?


Peter Ivanyi

Posted on the users mailing list.