Solved

How to Captur a "Hot key" (F8 for example) ?

Posted on 2011-02-12
4
442 Views
Last Modified: 2012-06-27
I would like to wite down a program which captures F8 (F8 is just an example).
whenever the user presses F8, I would like my program to "Jump".

zmau
0
Comment
Question by:zmau
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 34879048
Hi zmau,

What LANGUAGE and VERSION are you working in here?....
0
 
LVL 66

Expert Comment

by:johnb6767
ID: 34884267
Hotkey Detective 2: Download It Here
http://www.pcmag.com/article2/0,1759,944583,00.asp

excerpt....

Hotkey Detective 2 fills this gap by showing you a list of all the hotkeys defined on your system. Duplicate hotkey assignments are displayed in red. To change a hotkey, simply select it in the list and click the Change key button. Click Locate in Explorer to make other changes to the shortcut, or remove it entirely. The program also lets you print out a list of your hotkey assignments.

Never used it personally, but have seen it online on more than one occassion....

ShortcutKey 2.2
http://download.cnet.com/ShortcutKey/3000-2346_4-10782313.html
0
 
LVL 1

Author Comment

by:zmau
ID: 34885693
Thanks all

Idle_Mind,
I am using VC 6, the language is C++, the OS is XP.

johnb6767
"ShortcutKey 2.2" and "Hotkey Detective 2", sounds like an answers to a previous questions........
http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Windows/Q_26801500.html
http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Windows/Q_26801499.html
Can you put your answer there so I can give you the score ?

I'll try them (Curiosity killed the cat).
Do you have any idea "how do they work" ?

Still, I want to know how do I do it in a software which I am installing to other people on other computres.....

zmau
0
 
LVL 86

Accepted Solution

by:
Mike Tomlinson earned 500 total points
ID: 34885705
Alrighty, I'm not a C++ developer, but look into use the RegisterHotKey() API:
http://msdn.microsoft.com/en-us/library/ms646309(VS.85).aspx

*Be aware, though, that if another application has already claimed your desired hot-key combo then you cannot also register it.  In that case, you would either have to poll the keyboard state with the GetAsyncKeyState() API (via a Timer...not the preferred method), or intercept ALL keystrokes in the same using a low level keyboard hook and WH_KEYBOARD_LL.
0

Featured Post

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
When you try to extract and to view the contents of a Microsoft Update Standalone Package (MSU) for Windows Vista, you cannot extract the files from the MSU. Here we are going to explain how to extract those hotfix details without using any third pa…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question