TToolBar capturing OnKeyDown events? lazarus / 31-LCL ---------------------------------------------------------------------- VTwin · 2011-01-29 19:22 I'm wondering if this is a bug, I couldn't find anything describing it. I make a new project and add a TToolBar, and a OnKeyDown event: Code: [Select]procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); begin   ShowMessage('You pressed key #' + IntToStr(key)); end; The event is triggered until I click on the (empty) TToolBar, then it is not. It seems TToolBar got the focus and is capturing the event. Clicking back on the Frame does not change it back. Thanks, Frederick OS X 10.6.5 Intel Lazarus 0.9.31 Carbon Widgets ---------------------------------------------------------------------- Blaazen · 2011-01-29 19:33 Is property Form1.KeyPreview=True ? Maybe it will help... ---------------------------------------------------------------------- VTwin · 2011-01-29 19:42 That did the trick! Many thanks Blaazen.