I figure that the "SetGadgetFilter" command will do it in the future...
The filter function supplied is called by the Gadget with a TEvent and optional user context object. If the Function returns zero the event is filtered and not processed further by the system whereas a non zero return indicates event processing should proceed as normal.
Currently only EVENT_KEYDOWN, EVENT_KEYCHAR, events produced by TextArea and TextField gadgets can be filtered with the SetGadgetFilter command.
Currently only EVENT_KEYDOWN, EVENT_KEYCHAR, events produced by TextArea and TextField gadgets can be filtered with the SetGadgetFilter command.