Re: registerHotKey problem
- Posted by jacques deschĂȘnes <desja at globetr?tt?r.net> Sep 16, 2007
- 609 views
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