Export (0) Print
Expand All

IKeyboardInputSink Interface

Provides a keyboard sink for components that manages tabbing, accelerators, and mnemonics across interop boundaries and between HWNDs. This interface implements keyboard message management in WPF-Win32 interoperation scenarios.

Namespace:  System.Windows.Interop
Assembly:  WindowsBase (in WindowsBase.dll)

public interface class IKeyboardInputSink

The IKeyboardInputSink type exposes the following members.

  NameDescription
Public propertyKeyboardInputSiteGets or sets a reference to the component's container's IKeyboardInputSite interface.
Top

  NameDescription
Public methodHasFocusWithinGets a value that indicates whether the sink or one of its contained components has focus.
Public methodOnMnemonicCalled when one of the mnemonics (access keys) for this sink is invoked.
Public methodRegisterKeyboardInputSinkRegisters the IKeyboardInputSink interface of a contained component.
Public methodTabIntoSets focus on either the first tab stop or the last tab stop of the sink.
Public methodTranslateAcceleratorProcesses keyboard input at the keydown message level.
Public methodTranslateCharProcesses WM_CHAR, WM_SYSCHAR, WM_DEADCHAR, and WM_SYSDEADCHAR input messages before OnMnemonic is called.
Top

A keyboard sink handles input from particular subsets of the overall keyboard input model for Win32 and Windows Presentation Foundation (WPF), and enables some keyboard input to be processed and directed to HWNDs other than the one with current keyboard focus.

If your component contains other components, and maintains a tab order, your component must also implement IKeyboardInputSite and keep track of which component has focus.

For a discussion of the input architecture specifically implemented for Windows Forms interop, see Windows Forms and WPF Interoperability Input Architecture.

HwndSource and HwndHost each implement the IKeyboardInputSink interface, through explicit interface definitions. The explicit definitions supply default behaviors, and can also be accessed if necessary through an IKeyboardInputSink interface cast of HwndSource or HwndHost.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft