[lazarus] Win32 accelerator issues
Marc Weustink
marc at dommelstein.net
Wed Dec 17 18:14:51 EST 2003
At 18:06 17-12-2003, Micha Nelissen wrote:
>Hi,
>
>Ever noticed the menu 'shortcuts' don't work in the IDE on win32? They
>work, but only when the main window is focused. The general problem is
>that a shortcut is register when a certain menu 'command' _globally_,
>without a corresponding window.
Correct, that are menu shortcuts. If you want something global, you maybe
can use RegisterHotKey.
From the win32 help:
The RegisterHotKey function defines a hot key for the current thread.
>Microsoft thought that everyone would use a seperate windowproc for each
>window...right. Nasty problems can occur if one registers the same
>shortcut for two seperate windows, causing shortcuts to initiate the wrong
>action depending on the order of registration.
AFAIK if this is the case the window which has focus gets the keys
>Anyone any bright ideas to solve this? Using some kind of broadcast to
>'ask' all windows for a shortcut? This still doesn't solve my above 'nasty
>problem'.
Nah...see above
>How does the GTK handle this?
Also not correct. Shortcuts are registered per menu group and only work
when the nenu is created (which is initially not the cate, only after you
have opened one). I'm currently a bit poking around in the shortcut
translation/handing, to get a more uniform function.
Marc
>Micha.
>
>_________________________________________________________________
> To unsubscribe: mail lazarus-request at miraclec.com with
> "unsubscribe" as the Subject
> archives at http://www.lazarus.freepascal.org/mailarchives
More information about the Lazarus
mailing list