Preface (Imaginary. So someone does not ask 'What are you trying to do?): I have a Win32 C++ application. This application wants to know when the user wants to open the start menu via Ctrl+Esc Of course, Ctrl+Esc is fired from the operating system so the application never see's it.
I have looked at Windows Virtual Keys. I see that there are plenty of OEM specific VK's (0x92-0x96,0xE0,0xE9-0xF5,..)
So my thought was:
Keyboard Filter Driver. When my application has the focus it tells the Keyboard Filter Driver. When my driver sees the Ctrl is down and an Esc down occurs (And my application has focus): -- Swallow the Esc and replace it with a scan code that will produce say a VK_0x92 (OEM Specific).
Since I have swallowed the Esc the operating system will never see Ctr+Esc
My application will then see the VK_0x92 and know the user wants to open the start menu and perform some action.
My question is how do I 'muck' the input within my driver (KEYBOARD_INPUT_DATA) in order for a say VK_0x92 to appear within my application?
Thanks in advance for any pointers.
It is all about the Keyboard Layout. What I needed to do was not supported by Microsoft Keyboard Layout Creator (MKLC). See: Keyboard Layout Samples.
I found the samples to be very old and hard to read through. Clearly the US and German keyboard samples are not the most recent.
I wrote a program to create Visual Studio projects for keyboard layouts by pointing to a specific layout (I.e, KBDUS.dll for example). I generate the source code, .vxcproj, ... I then make my modifications and build it.
Installing the layout is another can of worms entirely. I have asked in several places for Microsoft to release the source code for the CustomAction Dll that is contained within the MKLC generated .MSI to no avail.