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
Solved

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

Posted on 2011-02-12
4
433 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

Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

Question has a verified solution.

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

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
An article on effective troubleshooting
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

856 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