G
Guest
Hi,
Can't seem to find any sensible C# examples of this, struggling to work out
the correct way to trap key combinations using SetWindowsHookEx with
WH_KEYBOARD_LL, such as ALT-ESC.
private int InterpretKey(int nCode, IntPtr wParam, IntPtr lParam)
{
.....
hookStruct = (KeyboardHookStruct)Marshal.PtrToStructure(lParam,
typeof(KeyboardHookStruct));
if (hookStruct.vkCode == VK_MENU &&
(hookStruct.flags & VK_ESCAPE ) == hookStruct.flags)
{
handled = true;
....
}
.....
}
Can't seem to find any sensible C# examples of this, struggling to work out
the correct way to trap key combinations using SetWindowsHookEx with
WH_KEYBOARD_LL, such as ALT-ESC.
private int InterpretKey(int nCode, IntPtr wParam, IntPtr lParam)
{
.....
hookStruct = (KeyboardHookStruct)Marshal.PtrToStructure(lParam,
typeof(KeyboardHookStruct));
if (hookStruct.vkCode == VK_MENU &&
(hookStruct.flags & VK_ESCAPE ) == hookStruct.flags)
{
handled = true;
....
}
.....
}