473,402 Members | 2,055 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 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 8284
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: jcrouse | last post by:
I have an application thats a viewer. I also have a form that is fired from a Tools/Options menu selection. In the Options form the user can select a hotkey to use to exit the main viewer...
3
by: Rsrany | last post by:
I've been working on a few gtk applications and need to tie a hot key catcher into a thread. I am currently finding threaded user32.GetMessageA do not work. I have included two programs: 1) a...
1
by: Rune Jacobsen | last post by:
Hi all, I have some often-performed tasks in my applications that I want users to be able to specify hotkeys for. However, I don't want to hard code these hotkeys, as sooner or later some other...
9
by: k04jg02 | last post by:
I want to make a Python app that runs in the background, and when a user hits a key combination, for a function to run. This sounds simple enough, but all of the keypress detecting libraries I can...
0
by: jayquest | last post by:
Any ideas? I want to create a global windows hotkey that performs an action on the selected text in any windows program (that is not read only of coarse). For example: Remove all spaces from this...
9
by: kimiraikkonen | last post by:
Hi, Here is 2 questions: 1) I declared some global hotkeys located inside Windows API follows as: Private Const MOD_ALT As Integer = 1 Private Const MOD_CONTROL As Integer = 2 Private Const...
3
by: =?Utf-8?B?QmlsbHkgWmhhbmc=?= | last post by:
I want to have following hotkey used in asp.net application, how to do this especially for F5? ESC F3 F4 F5 F6 F9 F10
3
by: Appr3nt1c3 | last post by:
Hello everyone! I am new to VB .Net and currently i'm using vb .net 2005. My question is: Is there a way to assign a global key handler for a certain key, like if i press F9 or any other key...
18
by: AdamOnAccess | last post by:
Anyone know an easy way to toggle between Form and Design view with a hotkey? I know you can switch from Design view to Form view with hotkey F5. But is there a hotkey to switch back (from Form...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.