1. registerHotKey problem

Two problems, actually. 
1)  registerHotKey() only seems to work with printable keys, like Alt-X,
    but not with Alt-PageUp for example. Is this right? Can I make it work
    with unprintable (!) keys?
2)  I want a hot key to work whatever program is running. I have seen programs
    that do this, so it is possible, but I don't know how to do it. I want a
    simple pop-up notepad affair for telephone call records.  And no, I know
    I can get such programs, but I want to write my own - how else do I learn?

Any ideas, gentlemen?

Andy

new topic     » topic index » view message » categorize

2. Re: registerHotKey problem

Andy Drummond wrote:
> 
> Two problems, actually. 
> 1)  registerHotKey() only seems to work with printable keys, like Alt-X,
>     but not with Alt-PageUp for example. Is this right? Can I make it work
>     with unprintable (!) keys?
> 2)  I want a hot key to work whatever program is running. I have seen programs
>     that do this, so it is possible, but I don't know how to do it. I want a
>     simple pop-up notepad affair for telephone call records.  And no, I know
>     I can get such programs, but I want to write my own - how else do I learn?
> 
> Any ideas, gentlemen?
> 
> Andy

Hello Andy,

   I don't know where you got registerHotkey() from?
 I don't see it ihn any of the Euphoria docs.

   I do know I that use 
Euphoria for all my program writing and AutoHotkey (another program (free)) for
all my hotkey strokes. I seem to work well with Euphoria. You don't have to write
any programs in it (you can, a scripting language) just the keystrokes. Google it
it's free and simple.

Don Cole

new topic     » goto parent     » topic index » view message » categorize

3. Re: registerHotKey problem

don cole wrote:
 
>  I don't know where you got registerHotkey() from?
>  I don't see it in any of the Euphoria docs.

It's in Win32lib:

registerHotKey ( integer id, object caption )
Allows you to associate a ALT-key combination to set focus to a control.

-- 
Craig
Euphoria friendly webhosting: http://www.wazu.jp/hosting/euphoria.html

new topic     » goto parent     » topic index » view message » categorize

4. Re: registerHotKey problem

don cole wrote:
> 
> Andy Drummond wrote:
> > 
> > Two problems, actually. 
> > 1)  registerHotKey() only seems to work with printable keys, like Alt-X,
> >     but not with Alt-PageUp for example. Is this right? Can I make it work
> >     with unprintable (!) keys?
> > 2)  I want a hot key to work whatever program is running. I have seen
> > programs
> >     that do this, so it is possible, but I don't know how to do it. I want a
> >     simple pop-up notepad affair for telephone call records.  And no, I know
> >     I can get such programs, but I want to write my own - how else do I
> >     learn?
> > 
> > Any ideas, gentlemen?
> > 
> > Andy
> 
> Hello Andy,
> 
>    I don't know where you got registerHotkey() from?
>  I don't see it ihn any of the Euphoria docs.
> 
>    I do know I that use 
> Euphoria for all my program writing and AutoHotkey (another program (free))
> for all my hotkey strokes. I seem to work well with Euphoria. You don't have
> to write any programs in it (you can, a scripting language) just the
> keystrokes.
> Google it it's free and simple.
> 
> Don Cole

Yeah, I should have said it's in Win32Lib, which Craig saw.
So no simple answer except that I could use AutoHotkey.
I will Google for that, but I really want my program to do the
hot key business all by itself.
So thanks Don, a useful but temporary answer!
Andy

new topic     » goto parent     » topic index » view message » categorize

5. Re: registerHotKey problem

Andy Drummond wrote:
> 
> don cole wrote:
> > 
> > Andy Drummond wrote:
> > > 
> > > Two problems, actually. 
> > > 1)  registerHotKey() only seems to work with printable keys, like Alt-X,
> > >     but not with Alt-PageUp for example. Is this right? Can I make it work
> > >     with unprintable (!) keys?
> > > 2)  I want a hot key to work whatever program is running. I have seen
> > > programs
> > >     that do this, so it is possible, but I don't know how to do it. I want
> > >     a
> > >     simple pop-up notepad affair for telephone call records.  And no, I
> > >     know
> > >     I can get such programs, but I want to write my own - how else do I
> > >     learn?
> > > 
> > > Any ideas, gentlemen?
> > > 
> > > Andy
> > 
> > Hello Andy,
> > 
> >    I don't know where you got registerHotkey() from?
> >  I don't see it ihn any of the Euphoria docs.
> > 
> >    I do know I that use 
> > Euphoria for all my program writing and AutoHotkey (another program (free))
> > for all my hotkey strokes. I seem to work well with Euphoria. You don't have
> > to write any programs in it (you can, a scripting language) just the
> > keystrokes.
> > Google it it's free and simple.
> > 
> > Don Cole
> 
> Yeah, I should have said it's in Win32Lib, which Craig saw.
> So no simple answer except that I could use AutoHotkey.
> I will Google for that, but I really want my program to do the
> hot key business all by itself.
> So thanks Don, a useful but temporary answer!
> Andy



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:
http://msdn2.microsoft.com/en-us/library/ms645526.aspx

regards,
jacques Deschênes

new topic     » goto parent     » topic index » view message » categorize

6. Re: registerHotKey problem

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

new topic     » goto parent     » topic index » view message » categorize

7. Re: registerHotKey problem

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 message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu