[lazarus] Silly code message handling question

Mattias Gaertner nc-gaertnma at netcologne.de
Tue Nov 25 08:03:32 EST 2003


On Mon, 24 Nov 2003 01:19:00 -0600  Tony Maro <tony at maro.net> wrote:

> Tony Maro wrote:
> 
> >>----Original Message-----
> >>From: Mattias Gaertner [mailto:nc-gaertnma at netcologne.de] 
> >>
> >>On Mon, 10 Nov 2003 19:00:20 -0600  Tony Maro <tony at maro.net> wrote:
> >>
> >>>Mattias Gaertner wrote:
> >>>
> >>>      
> >>>
> >>>>>How can I only make use of the keys that I want, and pass the 
> >>>>>remaining
> >>>>>on to the parent component(s)?
> >>>>>
> >>>>>          
> >>>>>
> >>>>1. You can override DoKeyUp instead.
> >>>>2. Did you add an 'inherited'?  
> >>>>
> >>>>        
> >>>>
> >>>1) - When I try that I get "There is no method in an 
> >>>      
> >>>
> >>ancester class to
> >>    
> >>
> >>>be overridden".  (it's not virtual...?)
> >>>      
> >>>
> >>Sorry. I ment KeyDown, KeyUp and KeyPress.
> >>To mark the "key" as used, set it to VK_UNKNOWN. 
> >>
> >>What do you mean with "on to the parent component(s)"?
> >>    
> >>
> >
> >Meaning, if my custom control doesn't handle it the form gets a chance
> >and the app finally.  My real problem is that menu hotkeys don't
> >function if my custom controls have focus and grab the key message.
> >
> >I'll try to override the KeyPress and see what happens.  Thanks.
> >  
> >
> Still no luck... I can see it pass the virtual keycode to inherited, but 
> menu shortcuts still don't work, which was the goal with this.
> 
> What triggers a menu shortcut to occur in the LCL?  I can't find 
> anything on it...

It's not the LCL. The WM+gtk does.
It should be possible to get the key event, before the gtk accelerators
process it. But this needs to be implemented in the gtk intf.


Mattias






More information about the Lazarus mailing list