, , . BIFUserControl, , , . IMultiKeyboardEvents. , BIFKeyboardDevice.
, , , BIFKeyboardDevice. , CLR BIFKeyboardManager, , .
IMultiKeyboardEvents, :
public interface IMultiKeyboardEvents
{
event MultiKeyEventHandler MultiKeyDown;
event MultiKeyEventHandler MultiKeyUp;
void OnMultiKeyDown(MultiKeyEventArgs);
void OnMultiKeyDown(MultiKeyEventArgs);
}
, WndProc(), , , :
void ProcessInput(Message message)
{
switch (rawInput.keyboard.Message)
{
case (uint) BIFWin32.WindowMessage.WM_KEYDOWN:
{
if (BIFDeviceCollections.MouseCollection[ID].MouseFocusElement is IMultiKeyboardEvents)
{
IMultiKeyboardEvents widget =
(IMultiKeyboardEvent)BIFDeviceCollections.MouseCollection[ID].MouseFocusedElement;
widget.OnMultiKeyDown(eventArgs);
}
break;
}
case (uint) BIFWin32.WindowMessage.WM_KEYUP:
{
if (BIFDeviceCollections.MouseCollection[ID].MouseFocusElement is IMultiKeyboardEvents)
{
IMultiKeyboardEvents widget =
(IMultiKeyboardEvent)BIFDeviceCollections.MouseCollection[ID].MouseFocusedElement;
widget.OnMultiKeyUp(eventArgs);
}
break;
}
}
}
OnMultiKeyDown UserControl, . , ( ), , , , , .