IKeyboardInputSink Interface
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.
public interface class IKeyboardInputSink
public interface IKeyboardInputSink
type IKeyboardInputSink = interface
Public Interface IKeyboardInputSink
- Derived
Remarks
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.
Properties
KeyboardInputSite |
Gets or sets a reference to the component's container's IKeyboardInputSite interface. |
Methods
HasFocusWithin() |
Gets a value that indicates whether the sink or one of its contained components has focus. |
OnMnemonic(MSG, ModifierKeys) |
Called when one of the mnemonics (access keys) for this sink is invoked. |
RegisterKeyboardInputSink(IKeyboardInputSink) |
Registers the IKeyboardInputSink interface of a contained component. |
TabInto(TraversalRequest) |
Sets focus on either the first tab stop or the last tab stop of the sink. |
TranslateAccelerator(MSG, ModifierKeys) |
Processes keyboard input at the keydown message level. |
TranslateChar(MSG, ModifierKeys) |
Processes WM_CHAR, WM_SYSCHAR, WM_DEADCHAR, and WM_SYSDEADCHAR input messages before OnMnemonic(MSG, ModifierKeys) is called. |
Applies to
See also
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기