Hi!

I have developed an app, which normally resides in the tray and does stuff
in the background. I would like to make it possible to press a keyboard
shortcut from anywhere in windows/applications and respond to that event.

I have searched high and low on the web, but I guess I do not know excatly
what to look for. :)

Could someone please point me in the direction of an answer? :)

- Klaus Jensen

Re: Responding to global keyboard shortcuts by Jerry

Jerry
Sun May 23 14:37:19 CDT 2004

I have no idea how to do it in .Net, but in Win32 you need to call
SetWindowsHookEx(WH_KEYBOARD, ...) and pass it your own KeyboardProc that
will be called on keyboard events.

Jerry

"Klaus Jensen" <spammers@die-in-hell.com> wrote in message
news:u9KafILQEHA.624@TK2MSFTNGP11.phx.gbl...
> Hi!
>
> I have developed an app, which normally resides in the tray and does stuff
> in the background. I would like to make it possible to press a keyboard
> shortcut from anywhere in windows/applications and respond to that event.
>
> I have searched high and low on the web, but I guess I do not know excatly
> what to look for. :)
>
> Could someone please point me in the direction of an answer? :)
>
> - Klaus Jensen
>
>



RE: Responding to global keyboard shortcuts by jchREMOVE

jchREMOVE
Mon May 24 07:06:06 CDT 2004

Hey Klaus

I have previously used a modified version of the MCL .net system-wide hotkey component (http://www.merrioncomputing.com/Download/index.htm). This component uses P/Invoke to call the Win32 API function RegisterHotKey. The component contains a few bugs which I have corrected (e.g. it starts "polling" every second after the hotkey has been pressed once and also it does not delete previously registered hotkeys).

Feel free to contact me if you would me to send you the corrected version

Regards, Jakob.