Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2003-03

Menu shortcut keys

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Tony Maro

I've implemented menu shortcut keys, but they don't always work. It appears to have to do with what component is currently focused. The problem is that with my TNotebook control doing weird GTK focusing problems, often times NOTHING has focus.

I also noticed that if I trap the OnKeyDown event for processing some keys, the menu shortcuts entirely stop working when that control has focus, even if I don't handle a key related to that shortcut.

Thanks,

Tony Maro http://tony.maro.net/ Check out my software "CheckBook Tracker" A GPL (free) replacement for Microsoft Money!

Reply by email

Mattias Gaertner
to Tony Maro
I've implemented menu shortcut keys, but they don't always work. It appears to have to do with what component is currently focused. The problem is that with my TNotebook control doing weird GTK focusing problems, often times NOTHING has focus.

- The focussing in gtk is dominated by the windowmanagers. You can't "control" the focus as under win32. You can only give "suggestions".
- The focus messages are not sent in the same order as under win32.
- The focus is locked during many gtk calls.

That's the reason why you get a lot of "NOTHING has focus".

I improved the focussing a little bit, so that less focus messages are sent and focussing became a little bit better.

I also noticed that if I trap the OnKeyDown event for processing some keys, the menu shortcuts entirely stop working when that control has focus, even if I don't handle a key related to that shortcut.

Can you give an example?

Mattias

Reply by email