System-wide keyboard Hook

I want to trap the special keys of Windows NT: Alt+Tab, Ctl+Alt+Del. In the first 10 minutes, I set a kbd hook and took a look at what were the keys I received. But the handling for these special keys takes place before even a WM_KEYDOWN is generated. So what must I do to trap the spl keys? Do I need to install a custom-built keyboard driver? Or is there some 10-minute workaround I am missing?Thanks and keep up the good work,Shriram

I have bad news for you. You CANNOT trap Ctrl-Alt-Del on NT?no way, no time, no how. This is at the core of the NT security system, and there is no combination of API calls that will allow you to trap this. You could write a new security provider (NT allows this, so vendors can use things like smart cards and fingerprints to logon), but that is a totally nontrivial task. You can, however, trap Alt-Tab with a keyboard hook. If you are working with VB, you can use SpyWorks from Desaware to trap messages like Ctrl-Esc, Alt-Tab, and Alt-Esc. (It even comes with an example program that disables all three of the key combinations above.) If you are working with C++, see the section in MSDN on SysMsgProc.

Share the Post:
Share on facebook
Share on twitter
Share on linkedin


The Latest

microsoft careers

Top Careers at Microsoft

Microsoft has gained its position as one of the top companies in the world, and Microsoft careers are flourishing. This multinational company is efficiently developing popular software and computers with other consumer electronics. It is a dream come true for so many people to acquire a high paid, high-prestige job

your company's audio

4 Areas of Your Company Where Your Audio Really Matters

Your company probably relies on audio more than you realize. Whether you’re creating a spoken text message to a colleague or giving a speech, you want your audio to shine. Otherwise, you could cause avoidable friction points and potentially hurt your brand reputation. For example, let’s say you create a

chrome os developer mode

How to Turn on Chrome OS Developer Mode

Google’s Chrome OS is a popular operating system that is widely used on Chromebooks and other devices. While it is designed to be simple and user-friendly, there are times when users may want to access additional features and functionality. One way to do this is by turning on Chrome OS