MindFusion.Wpf Pack Programmer's Guide
Key-press Dispatch

Virtual Keyboard generates low-level events by calling system functions used by keyboard drivers. Windows dispatches key-press messages to active window and its focused controls. If you need to send keyboard input to a specific text-entry control, you must ensure the control is focused, e.g. by calling the UIElement.Focus() method.

If you need to send keyboard input to an external process, you must ensure your own application's window does not activate when the user clicks on it. One way to do that is by setting WS_EX_NOACTIVATE flag in Win32 :

C#  Copy Code

const int GWL_EXSTYLE = -20;
const int WS_EX_NOACTIVATE = 0x08000000;

[DllImport("user32")]
static extern IntPtr SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong);

WindowInteropHelper interop = new WindowInteropHelper(window);
SetWindowLong(interop.Handle, GWL_EXSTYLE, WS_EX_NOACTIVATE);

The keyboard's IsStandalone property sets that flag for the control's parent window, in addition to few others such as a topmost flag.

By default, VirtualKeyboard emulates the auto-repeat feature of physical keyboards. You can disable this by setting AutoRepeat to false. You can control auto-repeat timing using RepeatDelay and RepeatRate properties.