[plt-scheme] redirecting all keyboard to a widget (MrEd)
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
keystrokes
> (with the `focus' method)?
if I try:
(define my-window%
(class frame%
(define/override (on-subwindow-char window event)
(send my-text focus)
#f
)
......
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?
Thanks
Peter Ivanyi