Re: registerHotKey problem

new topic     » goto parent     » topic index » view thread      » older message » newer message

Andy Drummond wrote:
> 
> jacques deschĂȘnes wrote:
> > 
> > 
> > Hi Andy,
> > The problem with win32lib is that it emulate hotkeys instead of implementing
> > as documented in wi32api on MSDN.
> > I don't known why it never as been impleted as per windows API as it simple
> > to implement that way. It only need two wrapper
> > CreateAcceleratorTAble() which create an accelerator table in memory and
> > return
> > an handle to it.
> > TranslateAccelerator() to be used in message loop.
> > 
> > I personnaly implement it that way in my projects and it works fine not only
> > with alt-key both also
> > with ctrl any combination of ctrl, alt, shift + key.
> > 
> > maybe someone should consider to modify win32lib to implement it as describe
> > here:
> > <a
> > href="http://msdn2.microsoft.com/en-us/library/ms645526.aspx">http://msdn2.microsoft.com/en-us/library/ms645526.aspx</a>
> > 
> > regards,
> > jacques DeschĂȘnes
> 
> Thanks - merci beaucoup - Jacques, I'll look at that and see if I can
> make it work as Mr Gates thinks it ought to be. Maybe Christian can do
> the changes in Win32Lib - I am quite sure he knows infinitely more about
> Windows API that ever I do!
> Andy

What ou can do with the newer version is to trap the new w32HKeyboard event and
check for the hotkey. Some key combinations, like alt-insert, alt-pageup and
stuff, are not reported by the OS at all - at least with some keyboard divers.
w32hKeyDown should be fine most o the time, but w32HKeyboard catches some corner
cases.

There is a strange thing in win32lib, which is that registerHotKey() does
somehing quite different from the API with the same name; this had me confused
for a while when I first looked into it. So I decided not to touch it, out of
fear of breaking code and because I had personally scant interest in it. If
there's some interest, I'll sure look back into it.

Please post comments, wishes and all about win32lib on Sourceforge, because
there is no guarantee that I'll be reading this list as regularly as I do now in
some perhaps near future. I'll always get the SF feedback. You can also use oedoc
hat free dhot fr, this address is mentioned .in alll my contributed stuff.

CChris

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu