From: Bruce Tobin

Subject: keyboard events and aggregate widgets

Date: 1996-12-23 9:32


 I'm using Matthew Haines' strategy to implement aggregate widgets by 
creating a widget whose window class is a descendant of Dialog.  I'm also 
inheriting from lisp-widget-window and lisp-widget-top-window.  This 
seems to work pretty well, but there is one problem: I'd like my widget 
to be able to handle virtual key events, viz. vk-up, vk-down, vk-pageup 
and vk-pagedown.  This works fine as long as my widget-window doesn't 
have any child controls.  As soon as a child control is added, though, 
the child control always gets the keyboard focus. I've tried to create
event methods specialized on the widget-windows of the child controls 
themselves, but this doesn't seem to work.  So:

1. Is there any way to prevent the child control of a dialog from 
grabbing the keyboard focus away from the dialog pane (while still 
allowing the control to respond to mouse events)?

2. Is there a way to specialize the event method for, say, the 
widget-window of a header-control or an editable-text, in order to trap 
and handle arrow key events?  I know that you need to specialize 
pc:window-procedure to grab arrow key events from the OS, and I'm doing 
that, but I still can't seem to grab any key events.