471,309 Members | 1,468 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,309 software developers and data experts.

Global hotkey

Just a thought prompted by the chain "Splitting up a string"; ages ago a
wrote (in VB via Windows API dll calls) a global hotkey app that runs
silently, intercepts [Ctrl]+[Alt]+V, converts the clipboard to a string and
sends [Ctrl]+[V]; I still use it almost constantly, but it is a pain to
maintain.

I couldn't find any native C# support for global hotkey (CLR2.0) - any idea
if this could be re-written in C# without any dll imports in my code?

Marc
Dec 2 '05 #1
2 8169
You still need to hook on the keyboard which still requires you to p/invoke

Gabriel Lozano-Morán
http://www.realdn.net
Dec 3 '05 #2
For ref (for anybody doing similar) I managed to do the global-hotkey aspect
using SystemHotkey from the Code Project (which wraps up the PInvoke calls
nicely); handy ;-p

(http://www.codeproject.com/cs/miscctrl/systemhotkey.asp)

(minor: note that there is a glitch in the existing (Code Project) code
relating to using more than one modifier, but this is easily overcome by
changing 3 instances of k2= to k2|= in RegisterHotkey (this has previously
been logged but not revised))

Marc
"Gabriel Lozano-Morán" <ga*****@no-spam.org> wrote in message
news:%2******************@TK2MSFTNGP12.phx.gbl...
You still need to hook on the keyboard which still requires you to
p/invoke

Gabriel Lozano-Morán
http://www.realdn.net

Dec 5 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by jcrouse | last post: by
3 posts views Thread by Rsrany | last post: by
9 posts views Thread by k04jg02 | last post: by
9 posts views Thread by kimiraikkonen | last post: by
3 posts views Thread by =?Utf-8?B?QmlsbHkgWmhhbmc=?= | last post: by
3 posts views Thread by Appr3nt1c3 | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.