Solved

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

Posted on 2011-02-12
4
401 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
  • 2
4 Comments
 
LVL 85

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 85

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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Several part series to implement Internet Explorer 11 Enterprise Mode
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

757 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now